diff options
author | TymanWasTaken <tyman@tyman.tech> | 2021-05-16 22:03:18 -0400 |
---|---|---|
committer | TymanWasTaken <tyman@tyman.tech> | 2021-05-16 22:03:18 -0400 |
commit | 759e93bec4e9e2eb86db7434007345c24b0a0252 (patch) | |
tree | 193c47e5dfc6bcce0f4923ea0d2f8f7ce2e5894a /src/listeners | |
parent | 284e1d1d693486f6c50cdb8b38f01cdf74eb63d2 (diff) | |
download | tanzanite-759e93bec4e9e2eb86db7434007345c24b0a0252.tar.gz tanzanite-759e93bec4e9e2eb86db7434007345c24b0a0252.tar.bz2 tanzanite-759e93bec4e9e2eb86db7434007345c24b0a0252.zip |
fix logging for slash command syncing v2, delete BotMessage and BotGuild because useless, add prefix slash command
Diffstat (limited to 'src/listeners')
-rw-r--r-- | src/listeners/client/syncslashcommands.ts | 8 | ||||
-rw-r--r-- | src/listeners/guild/syncunban.ts | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/listeners/client/syncslashcommands.ts b/src/listeners/client/syncslashcommands.ts index 2388104..eb65b97 100644 --- a/src/listeners/client/syncslashcommands.ts +++ b/src/listeners/client/syncslashcommands.ts @@ -19,7 +19,7 @@ export default class CreateSlashCommands extends BotListener { ) { await this.client.application.commands.delete(registeredCommand.id); this.client.logger.verbose( - `{red Deleted slash command ${registeredCommand.name}}` + chalk`{red Deleted slash command ${registeredCommand.name}}` ); } } @@ -38,13 +38,13 @@ export default class CreateSlashCommands extends BotListener { if (slashdata.description !== found.description) { await this.client.application.commands.edit(found.id, slashdata); this.client.logger.verbose( - `{orange Edited slash command ${botCommand.id}}` + chalk`{orange Edited slash command ${botCommand.id}}` ); } } else { await this.client.application.commands.create(slashdata); this.client.logger.verbose( - `{green Created slash command ${botCommand.id}}` + chalk`{green Created slash command ${botCommand.id}}` ); } } @@ -54,7 +54,7 @@ export default class CreateSlashCommands extends BotListener { } catch (e) { console.log(chalk.red(e)); return this.client.logger.error( - '{red Slash commands not registered, see above error.}' + chalk`{red Slash commands not registered, see above error.}` ); } } diff --git a/src/listeners/guild/syncunban.ts b/src/listeners/guild/syncunban.ts index 63267bd..14f8820 100644 --- a/src/listeners/guild/syncunban.ts +++ b/src/listeners/guild/syncunban.ts @@ -1,5 +1,4 @@ -import { User } from 'discord.js'; -import { BotGuild } from '../../lib/extensions/BotGuild'; +import { User, Guild } from 'discord.js'; import { BotListener } from '../../lib/extensions/BotListener'; import { Ban } from '../../lib/models'; @@ -11,7 +10,7 @@ export default class CommandBlockedListener extends BotListener { }); } - public async exec(guild: BotGuild, user: User): Promise<void> { + public async exec(guild: Guild, user: User): Promise<void> { const bans = await Ban.findAll({ where: { user: user.id, |