mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-21 16:55:03 +00:00
use Util methods for escaping inline code and code blocks
This commit is contained in:
parent
29887bce2d
commit
5569e023fd
11 changed files with 36 additions and 55 deletions
|
@ -1,9 +1,9 @@
|
|||
import { Permissions, TextChannel, ThreadChannel } from "discord.js";
|
||||
import { Permissions, TextChannel, ThreadChannel, Util } from "discord.js";
|
||||
import humanizeDuration from "humanize-duration";
|
||||
import { ChannelTypeStrings } from "src/types";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { asSingleLine, DAYS, disableInlineCode, HOURS, MINUTES } from "../../../utils";
|
||||
import { asSingleLine, DAYS, HOURS, MINUTES } from "../../../utils";
|
||||
import { getMissingPermissions } from "../../../utils/getMissingPermissions";
|
||||
import { missingPermissionError } from "../../../utils/missingPermissionError";
|
||||
import { BOT_SLOWMODE_PERMISSIONS, NATIVE_SLOWMODE_PERMISSIONS } from "../requiredPermissions";
|
||||
|
@ -133,7 +133,7 @@ export const SlowmodeSetCmd = slowmodeCmd({
|
|||
rateLimitPerUser: rateLimitSeconds,
|
||||
});
|
||||
} catch (e) {
|
||||
sendErrorMessage(pluginData, msg.channel, `Failed to set native slowmode: ${disableInlineCode(e.message)}`);
|
||||
sendErrorMessage(pluginData, msg.channel, `Failed to set native slowmode: ${Util.escapeInlineCode(e.message)}`);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue