diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/common/AutoMod.ts | 2 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClientUtil.ts | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts index 2633e1a..784085d 100644 --- a/src/lib/common/AutoMod.ts +++ b/src/lib/common/AutoMod.ts @@ -52,7 +52,7 @@ export class AutoMod { const badLinks: BadWordDetails[] = uniqueLinks.map((link) => ({ match: link, severity: Severity.PERM_MUTE, - ignoreSpaces: true, + ignoreSpaces: false, ignoreCapitalization: true, reason: 'malicious link', regex: false diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index a3ddfed..c4a5e79 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -17,6 +17,7 @@ import { type PronounCode } from '#lib'; import { humanizeDuration } from '@notenoughupdates/humanize-duration'; +import assert from 'assert'; import { exec } from 'child_process'; import deepLock from 'deep-lock'; import { ClientUtil, Util as AkairoUtil } from 'discord-akairo'; @@ -231,7 +232,7 @@ export class BushClientUtil extends ClientUtil { const haste = await this.haste(code, substr); hasteOut = `Too large to display. ${ haste.url - ? `Hastebin: ${haste.url}${haste.error ? ` - ${haste.error}` : ''}` + ? `Hastebin: ${haste.url}${language ? `.${language}` : ''}${haste.error ? ` - ${haste.error}` : ''}` : `${this.emojis.error} Hastebin: ${haste.error}` }`; } @@ -911,6 +912,12 @@ export class BushClientUtil extends ClientUtil { ).toString()}&permissions=${PermissionsBitField.All}&scope=bot%20applications.commands`; } + public assertAll(...args: any[]): void { + for (let i = 0; i < args.length; i++) { + assert(args[i], `assertAll index ${i} failed`); + } + } + /** * A wrapper for the Argument class that adds custom typings. */ |