Compare commits

...

2 Commits

Author SHA1 Message Date
madahin 30397b9207 Fix formating with `go fmt` 2020-11-09 19:14:21 +01:00
madahin e786b77f62 Fix identation 2020-11-09 19:12:14 +01:00
1 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@ import (
)
func Spongify(input_message string) string {
spongified_message := ""
spongified_message := ""
for i, char := range input_message {
if i%2 == 0 {
spongified_message += strings.ToLower(string(char))
@ -24,15 +24,15 @@ func Spongify(input_message string) string {
spongified_message += strings.ToUpper(string(char))
}
}
return spongified_message
return spongified_message
}
func Sponge(m *tb.Message) {
message := ""
if m.IsReply() {
message = Spongify(m.ReplyTo.Text)
} else {
message = Spongify(shared.History.LastMessage(m.Chat.ID))
}
shared.Bot.Send(m.Chat, message)
if m.IsReply() {
message = Spongify(m.ReplyTo.Text)
} else {
message = Spongify(shared.History.LastMessage(m.Chat.ID))
}
shared.Bot.Send(m.Chat, message)
}