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:
parent
5e91a9fed3
commit
5de35f711d
11 changed files with 36 additions and 55 deletions
|
@ -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) +
|
||||
"```",
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue