Skip to content

Commit

Permalink
aggiunta stats
Browse files Browse the repository at this point in the history
  • Loading branch information
viac92 committed Jul 1, 2021
1 parent 52865b5 commit e7a258c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kaffeBot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,17 @@ func main() {
bot := tbot.New(os.Getenv("TELEGRAM_TOKEN2"))
c := bot.Client()

var kaffe int

bot.HandleMessage("kaffe .+", func(m *tbot.Message) {
text := strings.TrimPrefix(m.Text, "kaffe ")
nuovaFrase := moltiplica(sostituisciCconK(cammello(text)))
c.SendChatAction(m.Chat.ID, tbot.ActionTyping)
time.Sleep(1 * time.Second)

c.SendMessage(m.Chat.ID, nuovaFrase)
kaffe++
fmt.Printf("Kaffe bevuti: %d", kaffe)
})

err := bot.Start()
Expand Down

0 comments on commit e7a258c

Please sign in to comment.