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/commands/dev | |
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/commands/dev')
-rw-r--r-- | src/commands/dev/__template.ts | 2 | ||||
-rw-r--r-- | src/commands/dev/_testDB.ts | 25 | ||||
-rw-r--r-- | src/commands/dev/eval.ts | 2 | ||||
-rw-r--r-- | src/commands/dev/reload.ts | 2 | ||||
-rw-r--r-- | src/commands/dev/say.ts | 4 | ||||
-rw-r--r-- | src/commands/dev/servers.ts | 2 | ||||
-rw-r--r-- | src/commands/dev/setLevel.ts | 5 | ||||
-rw-r--r-- | src/commands/dev/sh.ts | 2 | ||||
-rw-r--r-- | src/commands/dev/superUser.ts | 5 | ||||
-rw-r--r-- | src/commands/dev/test.ts | 2 |
10 files changed, 41 insertions, 10 deletions
diff --git a/src/commands/dev/__template.ts b/src/commands/dev/__template.ts index 35c57db..949e04e 100644 --- a/src/commands/dev/__template.ts +++ b/src/commands/dev/__template.ts @@ -55,7 +55,7 @@ export default class TemplateCommand extends BushCommand { userPermissions: ['SEND_MESSAGES'] }); } - public async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { return await message.util.reply(`${util.emojis.error} Do not use the template command.`); } } diff --git a/src/commands/dev/_testDB.ts b/src/commands/dev/_testDB.ts new file mode 100644 index 0000000..e1fddb4 --- /dev/null +++ b/src/commands/dev/_testDB.ts @@ -0,0 +1,25 @@ +// import { BushCommand, BushSlashMessage, Global } from '@lib'; +// import { Message } from 'discord.js'; +// import { inspect } from 'util'; + +// export default class TestDurationCommand extends BushCommand { +// public constructor() { +// super('db', { +// aliases: ['db'], +// category: 'dev', +// description: { +// content: '', +// usage: '', +// examples: [''] +// }, +// slash: false, +// hidden: true, +// ownerOnly: true, +// completelyHide: true +// }); +// } + +// override async exec(message: Message | BushSlashMessage): Promise<unknown> { +// return await message.util.reply(await util.codeblock(inspect((await Global.findOne()).environment), 2000, 'js')); +// } +// } diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index dbdfc4b..1475173 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -43,7 +43,7 @@ export default class EvalCommand extends BushCommand { }); } - public async exec( + public override async exec( message: BushMessage | BushSlashMessage, args: { sel_depth: number; diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index de12e34..4f11a81 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -31,7 +31,7 @@ export default class ReloadCommand extends BushCommand { }); } - public async exec(message: BushMessage | BushSlashMessage /* { fast }: { fast: boolean } */): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage /* { fast }: { fast: boolean } */): Promise<unknown> { if (!message.author.isOwner()) return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`); diff --git a/src/commands/dev/say.ts b/src/commands/dev/say.ts index 0776f1b..f0a7cbf 100644 --- a/src/commands/dev/say.ts +++ b/src/commands/dev/say.ts @@ -26,7 +26,7 @@ export default class SayCommand extends BushCommand { }); } - public async exec(message: BushMessage, { say }: { say: string }): Promise<unknown> { + public override async exec(message: BushMessage, { say }: { say: string }): Promise<unknown> { if (!message.author.isOwner()) return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`); @@ -34,7 +34,7 @@ export default class SayCommand extends BushCommand { await message.util.send({ content: say, allowedMentions: AllowedMentions.none() }); } - public async execSlash(message: AkairoMessage, { content }: { content: string }): Promise<unknown> { + public override async execSlash(message: AkairoMessage, { content }: { content: string }): Promise<unknown> { if (!client.config.owners.includes(message.author.id)) { return await message.interaction.reply({ content: `${util.emojis.error} Only my developers can run this command.`, diff --git a/src/commands/dev/servers.ts b/src/commands/dev/servers.ts index 7b147b9..d8799f5 100644 --- a/src/commands/dev/servers.ts +++ b/src/commands/dev/servers.ts @@ -17,7 +17,7 @@ export default class ServersCommand extends BushCommand { }); } - public async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { const maxLength = 10; const guilds = [...client.guilds.cache.sort((a, b) => (a.memberCount < b.memberCount ? 1 : -1)).values()]; const chunkedGuilds: Guild[][] = []; diff --git a/src/commands/dev/setLevel.ts b/src/commands/dev/setLevel.ts index 4d08345..6603fcf 100644 --- a/src/commands/dev/setLevel.ts +++ b/src/commands/dev/setLevel.ts @@ -48,7 +48,10 @@ export default class SetLevelCommand extends BushCommand { }); } - async exec(message: BushMessage | BushSlashMessage, { user, level }: { user: User; level: number }): Promise<unknown> { + override async exec( + message: BushMessage | BushSlashMessage, + { user, level }: { user: User; level: number } + ): Promise<unknown> { if (!message.author.isOwner()) return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`); diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts index b8c8379..7f048c0 100644 --- a/src/commands/dev/sh.ts +++ b/src/commands/dev/sh.ts @@ -36,7 +36,7 @@ export default class ShCommand extends BushCommand { }); } - public async exec(message: BushMessage | BushSlashMessage, { command }: { command: string }): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage, { command }: { command: string }): Promise<unknown> { if (!client.config.owners.includes(message.author.id)) return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`); const input = clean(command); diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index eade861..22fa53f 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -37,7 +37,10 @@ export default class SuperUserCommand extends BushCommand { }; return { action, user }; } - public async exec(message: BushMessage | BushSlashMessage, args: { action: 'add' | 'remove'; user: User }): Promise<unknown> { + public override async exec( + message: BushMessage | BushSlashMessage, + args: { action: 'add' | 'remove'; user: User } + ): Promise<unknown> { if (!message.author.isOwner()) return await message.util.reply(`${util.emojis.error} Only my developers can run this command.`); diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts index 6b49dce..0029a3a 100644 --- a/src/commands/dev/test.ts +++ b/src/commands/dev/test.ts @@ -30,7 +30,7 @@ export default class TestCommand extends BushCommand { } // eslint-disable-next-line require-await - public async exec(message: BushMessage, args: { feature: string }): Promise<unknown> { + public override async exec(message: BushMessage, args: { feature: string }): Promise<unknown> { const responses = [ 'Yes master.', 'Test it your self bitch, I am hungry.', |