From 3e9ac3389aa90c8fcf15812beadde3e4a6fe3718 Mon Sep 17 00:00:00 2001 From: RandomChars <random@chars.jp> Date: Tue, 4 Jan 2022 22:21:15 +0900 Subject: [PATCH] escape . as well --- discord.go | 1 + 1 file changed, 1 insertion(+) diff --git a/discord.go b/discord.go index cfd42a3..cf1a8cb 100644 --- a/discord.go +++ b/discord.go @@ -152,6 +152,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 if m, err := botAPI.Send(msg); err != nil { -- GitLab