diff options
Diffstat (limited to 'commands/config.go')
| -rw-r--r-- | commands/config.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/commands/config.go b/commands/config.go index 37aa953..f2dcf60 100644 --- a/commands/config.go +++ b/commands/config.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "slices" + "strconv" "strings" "git.anhgelus.world/anhgelus/les-copaings-bot/config" @@ -20,7 +21,7 @@ const ( OpenConfig = "config" ) -func ConfigResponse(ctx context.Context, guildID string) *interaction.Response { +func ConfigResponse(ctx context.Context, guildID uint64) *interaction.Response { cfg := config.GetGuildConfig(ctx, guildID) roles := "" l := len(cfg.XpRoles) - 1 @@ -41,14 +42,15 @@ func ConfigResponse(ctx context.Context, guildID string) *interaction.Response { var disChansDefault []component.SelectMenuDefaultValue for _, c := range disChans { if c != "" { + v, _ := strconv.ParseUint(c, 10, 64) disChansDefault = append(disChansDefault, component.SelectMenuDefaultValue{ - ID: c, + ID: v, Type: types.SelectMenuDefaultValueChannel, }) } } var defaultChan []component.SelectMenuDefaultValue - if len(cfg.FallbackChannel) > 0 { + if cfg.FallbackChannel != 0 { defaultChan = append(defaultChan, component.SelectMenuDefaultValue{ ID: cfg.FallbackChannel, Type: types.SelectMenuDefaultValueChannel, |
