mirror of
https://github.com/HugeFrog24/go-telegram-bot.git
synced 2026-03-02 08:24:34 +00:00
Fix some lint errors
This commit is contained in:
8
bot.go
8
bot.go
@@ -304,7 +304,9 @@ func (b *Bot) sendStats(ctx context.Context, chatID int64, userID int64, usernam
|
||||
totalUsers, totalMessages, err := b.getStats()
|
||||
if err != nil {
|
||||
fmt.Printf("Error fetching stats: %v\n", err)
|
||||
b.sendResponse(ctx, chatID, "Sorry, I couldn't retrieve the stats at this time.", businessConnectionID)
|
||||
if err := b.sendResponse(ctx, chatID, "Sorry, I couldn't retrieve the stats at this time.", businessConnectionID); err != nil {
|
||||
log.Printf("Error sending response: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -372,7 +374,9 @@ func (b *Bot) sendWhoAmI(ctx context.Context, chatID int64, userID int64, userna
|
||||
user, err := b.getOrCreateUser(userID, username, false)
|
||||
if err != nil {
|
||||
log.Printf("Error getting or creating user: %v", err)
|
||||
b.sendResponse(ctx, chatID, "Sorry, I couldn't retrieve your information.", businessConnectionID)
|
||||
if err := b.sendResponse(ctx, chatID, "Sorry, I couldn't retrieve your information.", businessConnectionID); err != nil {
|
||||
log.Printf("Error sending response: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,9 @@ func (b *Bot) handleStickerMessage(ctx context.Context, chatID, userID int64, me
|
||||
userMessage.StickerPNGFile = message.Sticker.Thumbnail.FileID
|
||||
}
|
||||
|
||||
b.storeMessage(userMessage)
|
||||
if err := b.storeMessage(userMessage); err != nil {
|
||||
log.Printf("Error storing user message: %v", err)
|
||||
}
|
||||
|
||||
// Update chat memory
|
||||
chatMemory := b.getOrCreateChatMemory(chatID)
|
||||
|
||||
Reference in New Issue
Block a user