protect against smol trollings with echo commmand

This commit is contained in:
lyx0 2021-10-31 12:59:29 +01:00
parent d64272306d
commit 1f651f6058
2 changed files with 9 additions and 3 deletions

View file

@ -21,9 +21,9 @@ func (b *Bot) Send(target, text string) {
return
}
// if text[0] == '.' || text[0] == '/' {
// text = ". " + text
// }
if text[0] == '.' || text[0] == '/' || text[0] == '!' {
text = ":tf: " + text
}
// If a message is too long for a single twitch
// message, split it into two messages.

View file

@ -3,5 +3,11 @@ package commands
import "github.com/lyx0/nourybot/cmd/bot"
func Echo(channel, message string, nb *bot.Bot) {
// if message[0] == '.' || message[0] == '/' || message[0] == '!' {
// nb.Send(channel, ":tf:")
// return
// }
nb.Send(channel, message)
}