diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/common/util/Format.ts | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/common/util/Format.ts b/src/lib/common/util/Format.ts index 5188c2b..ff34745 100644 --- a/src/lib/common/util/Format.ts +++ b/src/lib/common/util/Format.ts @@ -6,8 +6,7 @@ import { escapeCodeBlock as discordEscapeCodeBlock, escapeInlineCode as discordEscapeInlineCode, escapeItalic as discordEscapeItalic, - escapeMarkdown as discordEscapeMarkdown, - EscapeMarkdownOptions, + escapeMarkdown, escapeSpoiler as discordEscapeSpoiler, escapeStrikethrough as discordEscapeStrikethrough, escapeUnderline as discordEscapeUnderline, @@ -85,15 +84,6 @@ export function spoiler(content: string): string { } /** - * Escapes any Discord-flavour markdown in a string. - * @param text Content to escape - * @param options Options for escaping the markdown - */ -export function escapeMarkdown(text: string, options?: EscapeMarkdownOptions): string { - return discordEscapeMarkdown(`${text}`, options); -} - -/** * Formats input: makes it bold and escapes any other markdown * @param text The input */ @@ -117,3 +107,5 @@ export function sanitizeWtlAndControl(str: string) { // eslint-disable-next-line no-control-regex return `${str}`.replace(/[\u0000-\u001F\u007F-\u009F\u200B]/g, ''); } + +export { escapeMarkdown } from 'discord.js'; |