2018-07-24 11:59:36 +02:00
|
|
|
/*
|
|
|
|
* @Author: Bartuccio Antoine
|
|
|
|
* @Date: 2018-07-24 11:52:11
|
2019-01-04 10:55:51 +01:00
|
|
|
* @Last Modified by: Bartuccio Antoine
|
|
|
|
* @Last Modified time: 2019-01-04 10:40:38
|
2018-07-24 11:59:36 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
2019-01-04 10:55:51 +01:00
|
|
|
|
|
|
|
"git.klmp200.net/ALFRED/ALFRED/shared"
|
|
|
|
|
|
|
|
tb "gopkg.in/tucnak/telebot.v2"
|
2018-07-24 11:59:36 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
}
|