aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-03 20:07:53 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-03 20:07:53 -0400
commit51c12ba592736fa4d10c62be479c5dbafdeef7c5 (patch)
treedf96473b9a220ffa0d3914fedeceab73f4a75fc2 /src
parent13eac4e0f525b4adc31a1d9c4bae626dc3e9f618 (diff)
downloadtanzanite-51c12ba592736fa4d10c62be479c5dbafdeef7c5.tar.gz
tanzanite-51c12ba592736fa4d10c62be479c5dbafdeef7c5.tar.bz2
tanzanite-51c12ba592736fa4d10c62be479c5dbafdeef7c5.zip
prevent codeblock ecape
Diffstat (limited to 'src')
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index 498b9cb..a50cd61 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -870,6 +870,7 @@ export class BushClientUtil extends ClientUtil {
*/
public async codeblock(code: string, length: number, language?: CodeBlockLang, substr = false): Promise<string> {
let hasteOut = '';
+ code = util.discord.escapeCodeBlock(code);
const prefix = `\`\`\`${language}\n`;
const suffix = '\n```';
language = language ?? 'txt';