diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-09-05 17:36:42 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-09-05 17:36:42 -0400 |
commit | 048f99752550c6e03d1990a03cad78f3ac7d73aa (patch) | |
tree | c238ac29b1b526e86bcbc4989036df981c860187 /src/listeners/guild-custom | |
parent | 6f8a4d13a490eda7a195d14833c83810f7b5a789 (diff) | |
download | tanzanite-048f99752550c6e03d1990a03cad78f3ac7d73aa.tar.gz tanzanite-048f99752550c6e03d1990a03cad78f3ac7d73aa.tar.bz2 tanzanite-048f99752550c6e03d1990a03cad78f3ac7d73aa.zip |
revamp command permissions, fix permission exploit for some command when used in forum channels, use enums more
Diffstat (limited to 'src/listeners/guild-custom')
-rw-r--r-- | src/listeners/guild-custom/lockdown.ts | 8 | ||||
-rw-r--r-- | src/listeners/guild-custom/unlockdown.ts | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/listeners/guild-custom/lockdown.ts b/src/listeners/guild-custom/lockdown.ts index bf3ee7c..1551377 100644 --- a/src/listeners/guild-custom/lockdown.ts +++ b/src/listeners/guild-custom/lockdown.ts @@ -1,15 +1,15 @@ -import { BotListener, colors, emojis, type BotClientEvents } from '#lib'; +import { BotListener, colors, Emitter, emojis, TanzaniteEvent, type BotClientEvents } from '#lib'; import { EmbedBuilder } from 'discord.js'; export default class LockdownListener extends BotListener { public constructor() { super('lockdown', { - emitter: 'client', - event: 'lockdown' + emitter: Emitter.Client, + event: TanzaniteEvent.Lockdown }); } - public async exec(...[moderator, reason, channelsSuccessMap, _all]: BotClientEvents['lockdown']) { + public async exec(...[moderator, reason, channelsSuccessMap, _all]: BotClientEvents[TanzaniteEvent.Lockdown]) { const logChannel = await moderator.guild.getLogChannel('moderation'); if (!logChannel) return; diff --git a/src/listeners/guild-custom/unlockdown.ts b/src/listeners/guild-custom/unlockdown.ts index e08a42b..6b6e16e 100644 --- a/src/listeners/guild-custom/unlockdown.ts +++ b/src/listeners/guild-custom/unlockdown.ts @@ -1,15 +1,15 @@ -import { BotListener, colors, emojis, type BotClientEvents } from '#lib'; +import { BotListener, colors, Emitter, emojis, TanzaniteEvent, type BotClientEvents } from '#lib'; import { EmbedBuilder } from 'discord.js'; export default class UnlockdownListener extends BotListener { public constructor() { - super('unlockdown', { - emitter: 'client', - event: 'unlockdown' + super(TanzaniteEvent.Unlockdown, { + emitter: Emitter.Client, + event: TanzaniteEvent.Unlockdown }); } - public async exec(...[moderator, reason, channelsSuccessMap, _all]: BotClientEvents['unlockdown']) { + public async exec(...[moderator, reason, channelsSuccessMap, _all]: BotClientEvents[TanzaniteEvent.Unlockdown]) { const logChannel = await moderator.guild.getLogChannel('moderation'); if (!logChannel) return; |