3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

use Util methods for escaping inline code and code blocks

This commit is contained in:
almeidx 2021-07-29 17:35:27 +01:00
parent 5e91a9fed3
commit 5de35f711d
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664
11 changed files with 36 additions and 55 deletions

View file

@ -7,7 +7,6 @@ import { GuildSavedMessages } from "../../data/GuildSavedMessages";
import { LogType } from "../../data/LogType";
import { logger } from "../../logger";
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
import { disableCodeBlocks } from "../../utils";
import { CasesPlugin } from "../Cases/CasesPlugin";
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
@ -37,6 +36,7 @@ import { log } from "./util/log";
import { onMessageDelete } from "./util/onMessageDelete";
import { onMessageDeleteBulk } from "./util/onMessageDeleteBulk";
import { onMessageUpdate } from "./util/onMessageUpdate";
import { Util } from "discord.js";
const defaultOptions: PluginOptions<LogsPluginType> = {
config: {
@ -147,7 +147,7 @@ export const LogsPlugin = zeppelinGuildPlugin<LogsPluginType>()({
The following regex has taken longer than ${timeoutMs}ms for ${failedTimes} times and has been temporarily disabled:
`.trim() +
"\n```" +
disableCodeBlocks(regexSource) +
Util.escapeCodeBlock(regexSource) +
"```",
});
};