added SnowflakeUtil
This commit is contained in:
parent
40d8a79002
commit
9b164ce7be
@ -1,5 +1,11 @@
|
||||
import { ArgsOf, Discord, On } from 'discordx'
|
||||
import { EmbedBuilder, channelMention, userMention, User } from 'discord.js'
|
||||
import {
|
||||
EmbedBuilder,
|
||||
channelMention,
|
||||
userMention,
|
||||
User,
|
||||
SnowflakeUtil,
|
||||
} from 'discord.js'
|
||||
import { db, DBTableEnum } from '../db'
|
||||
import { logger } from '../lib'
|
||||
|
||||
@ -40,6 +46,8 @@ export class GuildMemberAdd {
|
||||
)
|
||||
.setImage(imageURL)
|
||||
|
||||
const nonce = SnowflakeUtil.generate().toString()
|
||||
|
||||
const channel = await member.guild.channels.fetch(welcomeChannelID)
|
||||
const role = await member.guild.roles.fetch(roleID)
|
||||
|
||||
@ -48,6 +56,8 @@ export class GuildMemberAdd {
|
||||
.send({
|
||||
embeds: [embed],
|
||||
content: `What's up, ${userMention(member.id)}`,
|
||||
enforceNonce: true,
|
||||
nonce,
|
||||
})
|
||||
.then(() => {
|
||||
lastJoinedUser = {
|
||||
|
Loading…
Reference in New Issue
Block a user