diff options
| author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-31 13:46:27 -0400 |
|---|---|---|
| committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-31 13:46:27 -0400 |
| commit | edcc0dd0a9228192ff6c4f6d6797dd6238e98f92 (patch) | |
| tree | 70c3f5436342d7f6b0e81222467d2773a3bb0b33 /src | |
| parent | b63a6b0cb61f0abf8a946a7f0f04a2a19a31e690 (diff) | |
| download | tanzanite-edcc0dd0a9228192ff6c4f6d6797dd6238e98f92.tar.gz tanzanite-edcc0dd0a9228192ff6c4f6d6797dd6238e98f92.tar.bz2 tanzanite-edcc0dd0a9228192ff6c4f6d6797dd6238e98f92.zip | |
upgraded to typescript 4.3.5
The reason I had to use getters and setters for the db models is because in the newer version of typescript the properties would be defined at runtime and override the getter and setters that sequalize uses later, causing all the values to be undefined and not being able to save any information.
Diffstat (limited to 'src')
111 files changed, 521 insertions, 158 deletions
diff --git a/src/commands/_fake-command/ironmoon.ts b/src/commands/_fake-command/ironmoon.ts index 500b384..8ca1f5b 100644 --- a/src/commands/_fake-command/ironmoon.ts +++ b/src/commands/_fake-command/ironmoon.ts @@ -8,13 +8,13 @@ export default class IronmoonCommand extends BushCommand { completelyHide: true }); } - public condition(message: BushMessage): boolean { + public override condition(message: BushMessage): boolean { return false; if (message.content.toLowerCase().includes('ironmoon')) return true; else return false; } - public async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { return await message.util.reply('Your message included the word ironmoon.'); } } diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index 851e2ed..a13f07a 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -50,7 +50,7 @@ export default class ChannelPermissionsCommand extends BushCommand { }); } - public async exec( + public override async exec( message: BushMessage, { target, diff --git a/src/commands/config/autoPublishChannel.ts b/src/commands/config/autoPublishChannel.ts index 8fa987b..3381dc2 100644 --- a/src/commands/config/autoPublishChannel.ts +++ b/src/commands/config/autoPublishChannel.ts @@ -38,7 +38,7 @@ export default class AutoPublishChannelCommand extends BushCommand { }); } - public async exec(message: BushMessage, { channel }: { channel: Channel }): Promise<unknown> { + public override async exec(message: BushMessage, { channel }: { channel: Channel }): Promise<unknown> { const autoPublishChannels = await message.guild.getSetting('autoPublishChannels'); const newValue = util.addOrRemoveFromArray( autoPublishChannels.includes(channel.id) ? 'remove' : 'add', diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts index 150a1b7..78b0446 100644 --- a/src/commands/config/blacklist.ts +++ b/src/commands/config/blacklist.ts @@ -60,7 +60,7 @@ export default class BlacklistCommand extends BushCommand { }); } - public async exec( + public override async exec( message: BushMessage | BushSlashMessage, args: { action: 'blacklist' | 'unblacklist'; target: Channel | User | string; global: boolean } ): Promise<unknown> { diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts index 5d2e4dd..a9318a5 100644 --- a/src/commands/config/disable.ts +++ b/src/commands/config/disable.ts @@ -59,7 +59,7 @@ export default class DisableCommand extends BushCommand { blacklistedCommands = ['eval', 'disable']; - public async exec( + public override async exec( message: BushMessage | BushSlashMessage, args: { action: 'enable' | 'disable'; command: BushCommand | string; global: boolean } ): Promise<unknown> { diff --git a/src/commands/config/muteRole.ts b/src/commands/config/muteRole.ts index b6e8a81..dee5322 100644 --- a/src/commands/config/muteRole.ts +++ b/src/commands/config/muteRole.ts @@ -37,7 +37,7 @@ export default class MuteRoleCommand extends BushCommand { }); } - async exec(message: BushMessage | BushSlashMessage, args: { role: Role }): Promise<void> { + override async exec(message: BushMessage | BushSlashMessage, args: { role: Role }): Promise<void> { await message.guild.setSetting('muteRole', args.role.id); await message.util.send({ content: `${util.emojis.success} Changed the server's mute role to <@&${args.role.id}>.`, diff --git a/src/commands/config/prefix.ts b/src/commands/config/prefix.ts index 9c1ce92..9f80633 100644 --- a/src/commands/config/prefix.ts +++ b/src/commands/config/prefix.ts @@ -36,7 +36,7 @@ export default class PrefixCommand extends BushCommand { }); } - async exec(message: BushMessage | BushSlashMessage, args: { prefix?: string }): Promise<unknown> { + override async exec(message: BushMessage | BushSlashMessage, args: { prefix?: string }): Promise<unknown> { const oldPrefix = await message.guild.getSetting('prefix'); await message.guild.setSetting('prefix', args.prefix ?? client.config.prefix); if (args.prefix) { diff --git a/src/commands/config/punishmentFooter.ts b/src/commands/config/punishmentFooter.ts index eeac6c1..d8daf77 100644 --- a/src/commands/config/punishmentFooter.ts +++ b/src/commands/config/punishmentFooter.ts @@ -38,7 +38,7 @@ export default class PunishmentFooterCommand extends BushCommand { }); } - async exec(message: BushMessage | BushSlashMessage, args: { ending: string }): Promise<unknown> { + override async exec(message: BushMessage | BushSlashMessage, args: { ending: string }): Promise<unknown> { await message.guild.setSetting('punishmentEnding', args.ending || null); if (args.ending) return await message.util.send({ diff --git a/src/commands/config/welcomeChannel.ts b/src/commands/config/welcomeChannel.ts index 3db9e74..a662802 100644 --- a/src/commands/config/welcomeChannel.ts +++ b/src/commands/config/welcomeChannel.ts @@ -36,7 +36,7 @@ export default class WelcomeChannelCommand extends BushCommand { userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'] });< |
