forked from git.klmp200.net/ALFRED
28 lines
494 B
Go
28 lines
494 B
Go
/*
|
|
* @Author: Bartuccio Antoine
|
|
* @Date: 2018-07-24 11:52:11
|
|
* @Last Modified by: klmp200
|
|
* @Last Modified time: 2018-07-24 11:58:42
|
|
*/
|
|
|
|
package commands
|
|
|
|
import (
|
|
"../shared"
|
|
tb "gopkg.in/tucnak/telebot.v2"
|
|
"strings"
|
|
)
|
|
|
|
func Sponge(m *tb.Message) {
|
|
message := ""
|
|
for i, char := range shared.History.LastMessage(m.Chat.ID) {
|
|
if i%2 == 0 {
|
|
message += strings.ToLower(string(char))
|
|
} else {
|
|
message += strings.ToUpper(string(char))
|
|
}
|
|
}
|
|
shared.Bot.Send(m.Chat, message)
|
|
|
|
}
|