Skip to content

Commit

Permalink
Use native discord method for markdown escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinty1 committed Jul 9, 2024
1 parent 582d37c commit 2bea030
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/StringUtil.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { escapeMarkdown } from "discord.js";
import timestring from "timestring";

export default class StringUtil {
Expand All @@ -6,7 +7,7 @@ export default class StringUtil {
}

static escapeMarkdown(string) {
return string.replace("_", "\\_").replace("*", "\\*").replace("~", "\\~");
return escapeMarkdown(string);
}

static parseTime(string) {
Expand Down

0 comments on commit 2bea030

Please sign in to comment.