add error logging
This commit is contained in:
parent
51596f8d41
commit
6ebfb59599
1 changed files with 2 additions and 0 deletions
2
main.go
2
main.go
|
|
@ -186,6 +186,7 @@ func (bot *Bot) handleCallbackQuery(query *api.CallbackQuery) {
|
|||
}
|
||||
_, e := bot.API.Send(r)
|
||||
if e != nil {
|
||||
log.Println(e.Error())
|
||||
edit := api.NewEditMessageText(bot.Config.AdminChatId, user.JoinRequestMessageID,
|
||||
fmt.Sprintf(AdminFailedMsg, userString, user.From.ID, user.JoinReason, "User not found in requests."))
|
||||
edit.ParseMode = api.ModeHTML
|
||||
|
|
@ -226,6 +227,7 @@ func (bot *Bot) handleCallbackQuery(query *api.CallbackQuery) {
|
|||
}
|
||||
_, e := bot.API.Send(r)
|
||||
if e != nil {
|
||||
log.Println(e.Error())
|
||||
edit := api.NewEditMessageText(bot.Config.AdminChatId, user.JoinRequestMessageID,
|
||||
fmt.Sprintf(AdminFailedMsg, userString, user.From.ID, user.JoinReason, "User not found in requests."))
|
||||
edit.ParseMode = api.ModeHTML
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue