From 25158efd5ad8319e56463ef5402fc9663f55d975 Mon Sep 17 00:00:00 2001 From: Xevion Date: Wed, 20 Dec 2023 08:26:30 -0600 Subject: [PATCH] Improve logs, remove messageID ref --- commands.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/commands.go b/commands.go index 3e3943e..00b4294 100644 --- a/commands.go +++ b/commands.go @@ -35,7 +35,6 @@ var CodeCommandDefinition = &discordgo.ApplicationCommand{ func CodeCommandHandler(session *discordgo.Session, interaction *discordgo.InteractionCreate) { log := logrus.WithFields(logrus.Fields{ "interaction": interaction.ID, - "message": interaction.Message.Reference(), "user": interaction.Member.User.ID, "command": "code", }) @@ -143,7 +142,6 @@ var RegisterCommandDefinition = &discordgo.ApplicationCommand{ func RegisterCommandHandler(session *discordgo.Session, interaction *discordgo.InteractionCreate) { log := logrus.WithFields(logrus.Fields{ "interaction": interaction.ID, - "message": interaction.Message.Reference(), "user": interaction.Member.User.ID, "command": "code", }) @@ -181,7 +179,7 @@ func RegisterCommandHandler(session *discordgo.Session, interaction *discordgo.I // Circumstane under which error is certain if !guestCodeProvided && guestCodeCondition == GuestCodeNotRequired { // A guest code could be stored, so check for it. - log.Debugf("No guest code provided for location %d, but one is required. Checking for stored code.", location_id) + log.WithField("location", location_id).Debug("No guest code provided for location, but one is not required. Checking for stored code.") code = GetCode(int64(location_id), int(userId)) if code == "" {