Sanitize input on adding tags and say

This commit is contained in:
Dustin Pianalto 2020-05-18 22:57:30 -08:00
parent 4236915c5b
commit 30065b313f

View File

@ -126,7 +126,7 @@ func (c *CommandManager) OnMessage(session *discordgo.Session, m *discordgo.Mess
} }
if command.SanitizeEveryone { if command.SanitizeEveryone {
for i := 1; i < len(cmd[1:]); i++ { for i := 1; i < len(cmd); i++ {
cmd[i] = strings.ReplaceAll(cmd[i], "@everyone", "@\ufff0everyone") cmd[i] = strings.ReplaceAll(cmd[i], "@everyone", "@\ufff0everyone")
cmd[i] = strings.ReplaceAll(cmd[i], "@here", "@\ufff0here") cmd[i] = strings.ReplaceAll(cmd[i], "@here", "@\ufff0here")
} }