Skip to content

Commit

Permalink
remove namelistener
Browse files Browse the repository at this point in the history
  • Loading branch information
bemoty committed Oct 20, 2023
1 parent a45f66e commit 6b420af
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/listener/NameListener.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { GuildMember, PartialGuildMember } from 'discord.js'

const CLIENT_ID = '155046312411267072'
const CLIENT_ID = '275342581821603842'

const MIN_TIME_MIN = 120
const MAX_TIME_MIN = 2500

const onEvent = async (oldMember: PartialGuildMember | GuildMember, newMember: GuildMember) => {
if (newMember.id !== CLIENT_ID) {
return
}
if (newMember.displayName !== '!Josh') {
await newMember.setNickname('!Josh')
if (newMember.displayName !== 'nicolaus') {
setTimeout(async () => {
await newMember.setNickname('nicolaus')
}, Math.floor(Math.random() * (MAX_TIME_MIN - MIN_TIME_MIN + 1) + MIN_TIME_MIN) * 60 * 1000)
}
}

Expand Down

0 comments on commit 6b420af

Please sign in to comment.