logging improvements
This commit is contained in:
parent
c63dbc666d
commit
6a31972ad0
8 changed files with 35 additions and 15 deletions
|
@ -2,6 +2,8 @@ package commands
|
|||
|
||||
import (
|
||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"watn3y/bloaterbotv3/botIO"
|
||||
|
@ -12,6 +14,9 @@ func Commands(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
|||
if strings.ToLower(update.Message.Command()) == "shutup" || strings.ToLower(update.Message.Command()) == "shut" {
|
||||
config.BotConfig.Shutup[update.Message.Chat.ID] = time.Now().UTC()
|
||||
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "Shutting up")
|
||||
|
||||
log.Println("Shutting up for Chat: " + strconv.FormatInt(update.Message.Chat.ID, 10))
|
||||
|
||||
botIO.SendMessage(msg, bot)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue