diff --git a/cmd/createcommands/main.go b/cmd/createcommands/main.go index b8820fb..b84c632 100644 --- a/cmd/createcommands/main.go +++ b/cmd/createcommands/main.go @@ -15,13 +15,13 @@ var commands = []rest.CreateCommandData{ Description: "Look up information about a user's subscription", Options: []interaction.ApplicationCommandOption{ { - Type: interaction.OptionTypeString, + Type: interaction.ApplicationCommandOptionTypeString, Name: "email", Description: "The Patreon email address of the user to lookup", Required: false, }, { - Type: interaction.OptionTypeUser, + Type: interaction.ApplicationCommandOptionTypeUser, Name: "user", Description: "The Discord Id of the user to lookup", Required: false, diff --git a/go.mod b/go.mod index 1d50270..d8b4cd2 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.22.0 toolchain go1.24.2 +replace github.com/TicketsBot-cloud/gdl => ../gdl + require ( github.com/TicketsBot-cloud/gdl v0.0.0-20250509054940-2045fbe19c06 github.com/caarlos0/env/v9 v9.0.0 diff --git a/internal/server/handler.go b/internal/server/handler.go index 9fc1f8f..d732095 100644 --- a/internal/server/handler.go +++ b/internal/server/handler.go @@ -140,8 +140,8 @@ func handleCommand(s *Server, data interaction.ApplicationCommandInteraction) in } var user user.User - if data.Member != nil { - user = data.Member.User + if data.Member != nil && data.Member.User != nil { + user = *data.Member.User } else if data.User != nil { user = *data.User } // Other should be infallible