diff --git a/commands/sponge.go b/commands/sponge.go index 5ba5461..8d65bd4 100644 --- a/commands/sponge.go +++ b/commands/sponge.go @@ -15,24 +15,25 @@ import ( tb "gopkg.in/tucnak/telebot.v2" ) -func Spongify(input_message string) string { - spongified_message := "" - for i, char := range input_message { +func spongify(inputMessage string) string { + spongifiedMessage := "" + for i, char := range inputMessage { if i%2 == 0 { - spongified_message += strings.ToLower(string(char)) + spongifiedMessage += strings.ToLower(string(char)) } else { - spongified_message += strings.ToUpper(string(char)) + spongifiedMessage += strings.ToUpper(string(char)) } } - return spongified_message + return spongifiedMessage } func Sponge(m *tb.Message) { message := "" if m.IsReply() { - message = Spongify(m.ReplyTo.Text) + message = spongify(m.ReplyTo.Text) } else { - message = Spongify(shared.History.LastMessage(m.Chat.ID)) + message = spongify(shared.History.LastMessage(m.Chat.ID)) } shared.Bot.Send(m.Chat, message) } +