Sanitize input on adding tags and say

master v0.0.5
DustyP 6 years ago
parent 4236915c5b
commit 30065b313f

@ -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")
} }

Loading…
Cancel
Save