From 50e904c5e01fcf92e841201d15b911a82f0ac68d Mon Sep 17 00:00:00 2001
From: RandomChars <random@chars.jp>
Date: Fri, 7 Jan 2022 07:37:57 +0900
Subject: [PATCH] escape ~

---
 discord.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/discord.go b/discord.go
index 77fbd39..009662b 100644
--- a/discord.go
+++ b/discord.go
@@ -161,6 +161,7 @@ func discordHandleCreate(session *discordgo.Session, create *discordgo.MessageCr
 	msg.Text = strings.ReplaceAll(msg.Text, "`", "\\`")
 	msg.Text = strings.ReplaceAll(msg.Text, ".", "\\.")
 	msg.Text = strings.ReplaceAll(msg.Text, "!", "\\!")
+	msg.Text = strings.ReplaceAll(msg.Text, "~", "\\~")
 	msg.Text = discordMakeHeader(create.Author) + msg.Text
 
 	for i, attachment := range create.Message.Attachments {
-- 
GitLab