Mercurial > public > pacobot
view bot/bot.go @ 12:aaf85ae1f942
add very simple html template
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Thu, 20 Mar 2025 11:12:21 +0000 |
parents | 5c124578fed2 |
children |
line wrap: on
line source
package bot import ( "log" "strconv" ) func HandleCmd(cmd []string) { cmdReceived := cmd[0] log.Printf("bot: %s command received", cmdReceived) switch cmdReceived { case "timer": seconds, err := strconv.Atoi(cmd[1]) if err != nil { log.Fatal("bot: invalid command arguments") } startTimer(seconds) } }