diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-29 18:30:04 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-29 18:30:04 -0400 |
commit | a51dc607be54e600248c8c3c86f9881470ff4158 (patch) | |
tree | 6a3c6f5132fca493639790fb68b3368bc700990b /src/lib/extensions/discord-akairo | |
parent | 0d71ac0234f7e71d60ae727a9f1db9ad66a47bde (diff) | |
download | tanzanite-a51dc607be54e600248c8c3c86f9881470ff4158.tar.gz tanzanite-a51dc607be54e600248c8c3c86f9881470ff4158.tar.bz2 tanzanite-a51dc607be54e600248c8c3c86f9881470ff4158.zip |
level image, fixes, revamped role command (still broken), continued working on settings command
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/BushClientUtil.ts | 4 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushCommand.ts | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index ca5f325..2eaf3d3 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -26,6 +26,7 @@ import { contentWithDurationTypeCaster } from '../../../arguments/contentWithDur import { discordEmojiTypeCaster } from '../../../arguments/discordEmoji'; import { durationTypeCaster } from '../../../arguments/duration'; import { permissionTypeCaster } from '../../../arguments/permission'; +import { roleWithDurationTypeCaster } from '../../../arguments/roleWithDuation'; import { snowflakeTypeCaster } from '../../../arguments/snowflake'; import { UpdateCacheTask } from '../../../tasks/updateCache'; import { ActivePunishment } from '../../models/ActivePunishment'; @@ -264,7 +265,8 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re contentWithDuration: contentWithDurationTypeCaster, permission: permissionTypeCaster, snowflake: snowflakeTypeCaster, - discordEmoji: discordEmojiTypeCaster + discordEmoji: discordEmojiTypeCaster, + roleWithDuration: roleWithDurationTypeCaster }); // loads all the handlers const loaders = { diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index 9ed890a..ef51b63 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -1354,10 +1354,6 @@ export class BushClientUtil extends ClientUtil { return new Promise((resolve) => setTimeout(resolve, s * 1000)); } - camelToSnakeCase(str: string) { - return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`); - } - //~ modified from https://stackoverflow.com/questions/31054910/get-functions-methods-of-a-class //~ answer by Bruno Grieder //~ public getMethods(obj: any): string { diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index 7ecb679..3a2c619 100644 --- a/src/lib/extensions/discord-akairo/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -63,7 +63,8 @@ export type BaseBushArgumentType = | 'contentWithDuration' | 'permission' | 'snowflake' - | 'discordEmoji'; + | 'discordEmoji' + | 'roleWithDuration'; export type BushArgumentType = BaseBushArgumentType | RegExp; @@ -180,8 +181,7 @@ export class BushCommand extends Command { } super(id, options); this.options = options; - // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - this.hidden = options.hidden || false; + this.hidden = options.hidden ?? false; this.restrictedChannels = options.restrictedChannels!; this.restrictedGuilds = options.restrictedGuilds!; this.completelyHide = options.completelyHide!; |