Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/createcommands/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions internal/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down