diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-07 09:25:13 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-07 09:25:13 -0500 |
commit | a39aa8c11a3fd5dd5f007865960ef5429744f057 (patch) | |
tree | ee5b25025f07cd5ae2718ab251f1471847eb5cb8 /src/lib/extensions/discord-akairo | |
parent | c501d4c45e19b47f6fb358253c7ff3a1413da222 (diff) | |
download | tanzanite-a39aa8c11a3fd5dd5f007865960ef5429744f057.tar.gz tanzanite-a39aa8c11a3fd5dd5f007865960ef5429744f057.tar.bz2 tanzanite-a39aa8c11a3fd5dd5f007865960ef5429744f057.zip |
made some constants enums and fixed perm check overriding inhibitors
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClient.ts | 4 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushCommand.ts | 56 |
2 files changed, 5 insertions, 55 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 6b25aaa..0fb84f3 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -224,7 +224,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re makeCache: Options.cacheWithLimits({}) }); - this.token = config.token; + this.token = config.token as If<Ready, string, string | null>; this.config = config; // Create listener handler this.listenerHandler = new BushListenerHandler(this, { @@ -274,7 +274,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re }, automateCategories: false, autoRegisterSlashCommands: true, - skipBuiltInPostInhibitors: false, + skipBuiltInPostInhibitors: true, useSlashPermissions: true, aliasReplacement: /-/g }); diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index b079649..03f6606 100644 --- a/src/lib/extensions/discord-akairo/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -1,60 +1,10 @@ import { type BushClient, type BushCommandHandler, type BushMessage, type BushSlashMessage } from '#lib'; import { Command, type ArgumentOptions, type ArgumentPromptOptions, type ArgumentTypeCaster, type CommandOptions } from 'discord-akairo'; +import { BaseArgumentType } from 'discord-akairo/dist/src/struct/commands/arguments/Argument'; import { type PermissionResolvable, type Snowflake } from 'discord.js'; -export type BaseBushArgumentType = - | 'string' - | 'lowercase' - | 'uppercase' - | 'charCodes' - | 'number' - | 'integer' - | 'bigint' - | 'emojint' - | 'url' - | 'date' - | 'color' - | 'user' - | 'users' - | 'member' - | 'members' - | 'relevant' - | 'relevants' - | 'channel' - | 'channels' - | 'textChannel' - | 'textChannels' - | 'voiceChannel' - | 'voiceChannels' - | 'categoryChannel' - | 'categoryChannels' - | 'newsChannel' - | 'newsChannels' - | 'storeChannel' - | 'storeChannels' - | 'stageChannel' - | 'stageChannels' - | 'threadChannel' - | 'threadChannels' - | 'role' - | 'roles' - | 'emoji' - | 'emojis' - | 'guild' - | 'guilds' - | 'message' - | 'guildMessage' - | 'relevantMessage' - | 'invite' - | 'userMention' - | 'memberMention' - | 'channelMention' - | 'roleMention' - | 'emojiMention' - | 'commandAlias' - | 'command' - | 'inhibitor' - | 'listener' +export type BaseBushArgumentType = + | BaseArgumentType | 'duration' | 'contentWithDuration' | 'permission' |