Skip to content

Commit

Permalink
fix: debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
tyzbit committed Apr 22, 2022
1 parent c48b79e commit e22b7bd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bot/message_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,17 @@ func (bot *ArchiverBot) handleArchiveRequest(s *discordgo.Session, r *discordgo.
Description: strings.Join(archivedLinks, "\n"),
}

username := ""
user, err := s.User(r.UserID)
if err != nil {
log.Errorf("unable to look up user with ID %v, err: %v", r.UserID, err)
username = "unknown"
} else {
username = user.Username
}
log.Debug("sending archive message response in ",
guild.Name, "(", guild.ID, "), calling user: ",
message.Author.Username, "(", message.Author.ID, ")")
username, "(", r.UserID, ")")
bot.sendMessage(s, ServerConfig.UseEmbed, ServerConfig.ReplyToOriginalMessage, message, embed)

// Create a call to Archiver API event
Expand Down

0 comments on commit e22b7bd

Please sign in to comment.