Commit a41884f8 authored by Thomas Bella's avatar Thomas Bella

Add command log

parent c94dad02
Pipeline #1066 passed with stages
in 2 minutes and 1 second
......@@ -115,6 +115,12 @@ func processMessage(bot *tgbotapi.BotAPI, update tgbotapi.Update) {
// Send message that something went wrong
go bot.Send(tgbotapi.NewMessage(update.Message.Chat.ID, "Sorry!\nSomething went really wrong at this end and a bug report was created. :-/"))
}
// Log executed command
go func(update tgbotapi.Update) {
log.Println("Executed /" + strings.ToLower(update.Message.Command()) + " " + update.Message.CommandArguments() + " for User " + update.Message.From.UserName)
}(update)
} else {
stats.AddRecord(update)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment