Update the command to parse the new return type and escape Discord markdown
This commit is contained in:
parent
256bce6abc
commit
7951484514
2 changed files with 40 additions and 3 deletions
8
src/utils/markdown.ts
Normal file
8
src/utils/markdown.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export function escapeDiscordMarkdown(message: string) {
|
||||
let m = message;
|
||||
m = m.replace(/_/gi, `\_`);
|
||||
m = m.replace(/\*/gi, `\*`);
|
||||
m = m.replace(/~/gi, `\~`);
|
||||
m = m.replace(/||/gi, `\||`);
|
||||
return m;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue