From 8885566932c965926ee64fad6404e6f26bc13220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sat, 13 Sep 2025 13:32:01 +0200 Subject: build(gokord): upgrade to latest version --- commands/config.go | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'commands/config.go') diff --git a/commands/config.go b/commands/config.go index c4644bc..838f7e9 100644 --- a/commands/config.go +++ b/commands/config.go @@ -7,7 +7,6 @@ import ( "git.anhgelus.world/anhgelus/les-copaings-bot/config" "git.anhgelus.world/anhgelus/les-copaings-bot/exp" "github.com/anhgelus/gokord/cmd" - "github.com/anhgelus/gokord/component" "github.com/anhgelus/gokord/logger" discordgo "github.com/nyttikord/gokord" ) @@ -50,14 +49,6 @@ func Config(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMa defaultChan = fmt.Sprintf("<#%s>", cfg.FallbackChannel) } //comp := component.New(). - // Add(component.NewTextDisplay("# Config")). - // Add(component.NewTextDisplay("**Salon par défaut**\n" + defaultChan)). - // Add(component.NewSeparator()). - // Add(component.NewTextDisplay("**Rôles liés aux niveaux**\n" + roles)). - // Add(component.NewSeparator()). - // Add(component.NewTextDisplay("**Salons désactivés**\n" + chans)). - // Add(component.NewSeparator()). - // Add(component.NewTextDisplay(fmt.Sprintf("**%s**\n%d", "Jours avant la réduction", cfg.DaysXPRemains))). // Add(component.NewActionRow().Add(component.NewStringSelect(ConfigModify). // SetPlaceholder("Modifier..."). // AddOption( @@ -82,31 +73,6 @@ func Config(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMa // SetEmoji(&discordgo.ComponentEmoji{Name: "⌛"}), // ), // )) - comp := component.New(). - Add(component.NewActionRow().Add(component.NewStringSelect(ConfigModify). - SetPlaceholder("Modifier..."). - AddOption( - component.NewSelectOption("Rôles liés à l'XP", config.ModifyXpRole). - SetDescription("Gère les rôles liés à l'XP"). - SetEmoji(&discordgo.ComponentEmoji{Name: "🏅"}), - ). - AddOption( - component.NewSelectOption("Salons désactivés", config.ModifyDisChannel). - SetDescription("Gère les salons désactivés"). - SetEmoji(&discordgo.ComponentEmoji{Name: "❌"}), - ). - AddOption( - // I don't have a better idea for this... - component.NewSelectOption("Salons par défaut", config.ModifyFallbackChannel). - SetDescription("Spécifie le salon par défaut"). - SetEmoji(&discordgo.ComponentEmoji{Name: "💾"}), - ). - AddOption( - component.NewSelectOption("Temps avec la réduction", config.ModifyTimeReduce). - SetDescription("Gère le temps avant la réduction d'XP"). - SetEmoji(&discordgo.ComponentEmoji{Name: "⌛"}), - ), - )) msg := fmt.Sprintf( "# Config\n**Salon par défaut**\n%s\n\n**Rôles liés aux niveaux**\n%s\n\n**Salons désactivés**\n%s\n\n**Jours avant la réduction**\n%d", defaultChan, @@ -114,7 +80,7 @@ func Config(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMa chans, cfg.DaysXPRemains, ) - err := resp.SetComponents(comp).SetMessage(msg).IsEphemeral().Send() + err := resp.SetMessage(msg).IsEphemeral().Send() if err != nil { logger.Alert("config/guild.go - Sending config", err.Error()) } -- cgit v1.2.3 From e42ecdd7154d740800ef392c6318220944b55a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sat, 13 Sep 2025 21:31:16 +0200 Subject: build(gokord): use latest version --- commands/config.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'commands/config.go') diff --git a/commands/config.go b/commands/config.go index 838f7e9..cc1e942 100644 --- a/commands/config.go +++ b/commands/config.go @@ -7,7 +7,6 @@ import ( "git.anhgelus.world/anhgelus/les-copaings-bot/config" "git.anhgelus.world/anhgelus/les-copaings-bot/exp" "github.com/anhgelus/gokord/cmd" - "github.com/anhgelus/gokord/logger" discordgo "github.com/nyttikord/gokord" ) @@ -15,7 +14,7 @@ const ( ConfigModify = "config_modify" ) -func Config(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) { +func Config(s *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) { cfg := config.GetGuildConfig(i.GuildID) roles := "" l := len(cfg.XpRoles) - 1 @@ -82,6 +81,6 @@ func Config(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMa ) err := resp.SetMessage(msg).IsEphemeral().Send() if err != nil { - logger.Alert("config/guild.go - Sending config", err.Error()) + s.LogError(err, "sending config") } } -- cgit v1.2.3 From 24519b76b48f521f1ef4c7e5e038574eaa66ebcd Mon Sep 17 00:00:00 2001 From: ascpial Date: Sat, 13 Sep 2025 21:40:24 +0200 Subject: feat(config): improve /config look and xp_role usability --- commands/config.go | 120 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 85 insertions(+), 35 deletions(-) (limited to 'commands/config.go') diff --git a/commands/config.go b/commands/config.go index cc1e942..1c2db8c 100644 --- a/commands/config.go +++ b/commands/config.go @@ -8,13 +8,19 @@ import ( "git.anhgelus.world/anhgelus/les-copaings-bot/exp" "github.com/anhgelus/gokord/cmd" discordgo "github.com/nyttikord/gokord" + "github.com/nyttikord/gokord/channel" + "github.com/nyttikord/gokord/component" + "github.com/nyttikord/gokord/discord/types" + "github.com/nyttikord/gokord/emoji" + "github.com/nyttikord/gokord/interaction" ) const ( ConfigModify = "config_modify" + OpenConfig = "config" ) -func Config(s *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) { +func ConfigResponse(i *discordgo.InteractionCreate) *interaction.Response { cfg := config.GetGuildConfig(i.GuildID) roles := "" l := len(cfg.XpRoles) - 1 @@ -47,40 +53,84 @@ func Config(s *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMa } else { defaultChan = fmt.Sprintf("<#%s>", cfg.FallbackChannel) } - //comp := component.New(). - // Add(component.NewActionRow().Add(component.NewStringSelect(ConfigModify). - // SetPlaceholder("Modifier..."). - // AddOption( - // component.NewSelectOption("Rôles liés à l'XP", config.ModifyXpRole). - // SetDescription("Gère les rôles liés à l'XP"). - // SetEmoji(&discordgo.ComponentEmoji{Name: "🏅"}), - // ). - // AddOption( - // component.NewSelectOption("Salons désactivés", config.ModifyDisChannel). - // SetDescription("Gère les salons désactivés"). - // SetEmoji(&discordgo.ComponentEmoji{Name: "❌"}), - // ). - // AddOption( - // // I don't have a better idea for this... - // component.NewSelectOption("Salons par défaut", config.ModifyFallbackChannel). - // SetDescription("Spécifie le salon par défaut"). - // SetEmoji(&discordgo.ComponentEmoji{Name: "💾"}), - // ). - // AddOption( - // component.NewSelectOption("Temps avec la réduction", config.ModifyTimeReduce). - // SetDescription("Gère le temps avant la réduction d'XP"). - // SetEmoji(&discordgo.ComponentEmoji{Name: "⌛"}), - // ), - // )) - msg := fmt.Sprintf( - "# Config\n**Salon par défaut**\n%s\n\n**Rôles liés aux niveaux**\n%s\n\n**Salons désactivés**\n%s\n\n**Jours avant la réduction**\n%d", - defaultChan, - roles, - chans, - cfg.DaysXPRemains, - ) - err := resp.SetMessage(msg).IsEphemeral().Send() + content := []component.Component{ + &component.Container{ + Components: []component.Message{ + &component.TextDisplay{Content: "## Configuration"}, + &component.Separator{}, + &component.TextDisplay{Content: "**Salon par défaut**\n" + defaultChan}, + &component.TextDisplay{Content: "**Rôles de niveau**\n" + roles}, + &component.TextDisplay{Content: "**Salons ignorés**\n" + chans}, + &component.TextDisplay{ + Content: fmt.Sprintf("**Jours avant la réduction**\n%d jours", cfg.DaysXPRemains), + }, + &component.ActionsRow{ + Components: []component.Message{ + &component.SelectMenu{ + MenuType: types.SelectMenuString, + Placeholder: "Gestion des paramètres", + CustomID: ConfigModify, + Options: []component.SelectMenuOption{ + { + Label: "Salons par défaut", + Value: config.ModifyFallbackChannel, + Emoji: &emoji.Component{Name: "📣"}, + }, + { + Label: "Rôles de niveaux", + Value: config.ModifyXpRole, + Emoji: &emoji.Component{Name: "🏅"}, + }, + { + Label: "Salons ignorés", + Value: config.ModifyDisChannel, + Emoji: &emoji.Component{Name: "🫣"}, + }, + { + Label: "Temps avant la réduction d'expérience", + Value: config.ModifyTimeReduce, + Emoji: &emoji.Component{Name: "📉"}, + }, + }, + }, + }, + }, + }, + }, + } + return &interaction.Response{ + Type: types.InteractionResponseChannelMessageWithSource, + Data: &interaction.ResponseData{ + Components: content, + Flags: channel.MessageFlagsEphemeral | channel.MessageFlagsIsComponentsV2, + }, + } +} + +func ConfigCommand( + session *discordgo.Session, + i *discordgo.InteractionCreate, + _ cmd.OptionMap, + resp *cmd.ResponseBuilder, +) { + err := session.InteractionAPI().Respond(i.Interaction, ConfigResponse(i)) + + if err != nil { + session.LogError(err, "config/guild.go - Sending config") + } +} + +func ConfigMessageComponent( + session *discordgo.Session, + i *discordgo.InteractionCreate, + _ interaction.MessageComponentData, + resp *cmd.ResponseBuilder, +) { + response := ConfigResponse(i) + response.Type = types.InteractionResponseUpdateMessage + err := session.InteractionAPI().Respond(i.Interaction, response) + if err != nil { - s.LogError(err, "sending config") + session.LogError(err, "sending config") } } -- cgit v1.2.3 From 398213f2088b775787d4c022b5704366fdfe1aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 19 Sep 2025 18:42:07 +0200 Subject: build(gokord): bump to latest nightly --- commands/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands/config.go') diff --git a/commands/config.go b/commands/config.go index 1c2db8c..d1e144d 100644 --- a/commands/config.go +++ b/commands/config.go @@ -123,8 +123,8 @@ func ConfigCommand( func ConfigMessageComponent( session *discordgo.Session, i *discordgo.InteractionCreate, - _ interaction.MessageComponentData, - resp *cmd.ResponseBuilder, + _ *interaction.MessageComponentData, + _ *cmd.ResponseBuilder, ) { response := ConfigResponse(i) response.Type = types.InteractionResponseUpdateMessage -- cgit v1.2.3 From 8a7189c3835a431b7fc16b189162f6f343e80b84 Mon Sep 17 00:00:00 2001 From: ascpial Date: Sat, 20 Sep 2025 23:33:29 +0200 Subject: feat(config): finish upgrading config --- commands/config.go | 128 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 50 deletions(-) (limited to 'commands/config.go') diff --git a/commands/config.go b/commands/config.go index d1e144d..5a2f763 100644 --- a/commands/config.go +++ b/commands/config.go @@ -2,6 +2,7 @@ package commands import ( "fmt" + "sort" "strings" "git.anhgelus.world/anhgelus/les-copaings-bot/config" @@ -11,7 +12,6 @@ import ( "github.com/nyttikord/gokord/channel" "github.com/nyttikord/gokord/component" "github.com/nyttikord/gokord/discord/types" - "github.com/nyttikord/gokord/emoji" "github.com/nyttikord/gokord/interaction" ) @@ -24,6 +24,9 @@ func ConfigResponse(i *discordgo.InteractionCreate) *interaction.Response { cfg := config.GetGuildConfig(i.GuildID) roles := "" l := len(cfg.XpRoles) - 1 + sort.Slice(cfg.XpRoles, func(i, j int) bool { + return cfg.XpRoles[i].XP > cfg.XpRoles[j].XP + }) for i, r := range cfg.XpRoles { if i == l { roles += fmt.Sprintf("> Niveau %d - <@&%s>", exp.Level(r.XP), r.RoleID) @@ -32,68 +35,78 @@ func ConfigResponse(i *discordgo.InteractionCreate) *interaction.Response { } } if len(roles) == 0 { - roles = "Aucun rôle configuré :(" + roles = "Aucun rôle configuré" } disChans := strings.Split(cfg.DisabledChannels, ";") - l = len(disChans) - 1 - chans := "" - for i, c := range disChans { - if i == l-1 { - chans += fmt.Sprintf("> <#%s>", c) - } else if i != l { - chans += fmt.Sprintf("> <#%s>\n", c) + disChansDefault := []component.SelectMenuDefaultValue{} + for _, c := range disChans { + if c != "" { + disChansDefault = append(disChansDefault, component.SelectMenuDefaultValue{ + ID: c, + Type: types.SelectMenuDefaultValueChannel, + }) } } - if len(chans) == 0 { - chans = "Aucun salon désactivé :)" - } - var defaultChan string - if len(cfg.FallbackChannel) == 0 { - defaultChan = "Pas de valeur" - } else { - defaultChan = fmt.Sprintf("<#%s>", cfg.FallbackChannel) + defaultChan := []component.SelectMenuDefaultValue{} + if len(cfg.FallbackChannel) > 0 { + defaultChan = append(defaultChan, component.SelectMenuDefaultValue{ + ID: cfg.FallbackChannel, + Type: types.SelectMenuDefaultValueChannel, + }) } + zero := 0 content := []component.Component{ &component.Container{ Components: []component.Message{ &component.TextDisplay{Content: "## Configuration"}, &component.Separator{}, - &component.TextDisplay{Content: "**Salon par défaut**\n" + defaultChan}, - &component.TextDisplay{Content: "**Rôles de niveau**\n" + roles}, - &component.TextDisplay{Content: "**Salons ignorés**\n" + chans}, - &component.TextDisplay{ - Content: fmt.Sprintf("**Jours avant la réduction**\n%d jours", cfg.DaysXPRemains), + &component.TextDisplay{Content: "**Salons par défaut**\n-# Les niveaux obtenue grâce à un appel sont affichés ici"}, + &component.ActionsRow{ + Components: []component.Message{ + &component.SelectMenu{ + MenuType: types.SelectMenuChannel, + CustomID: config.ModifyFallbackChannel, + Placeholder: "Pas de salon par défaut", + MinValues: &zero, + MaxValues: 1, + DefaultValues: defaultChan, + }, + }, }, + &component.TextDisplay{Content: "**Salons désactivé**\n-# Les messages ne donneront pas d'expérience dans ces salons"}, &component.ActionsRow{ Components: []component.Message{ &component.SelectMenu{ - MenuType: types.SelectMenuString, - Placeholder: "Gestion des paramètres", - CustomID: ConfigModify, - Options: []component.SelectMenuOption{ - { - Label: "Salons par défaut", - Value: config.ModifyFallbackChannel, - Emoji: &emoji.Component{Name: "📣"}, - }, - { - Label: "Rôles de niveaux", - Value: config.ModifyXpRole, - Emoji: &emoji.Component{Name: "🏅"}, - }, - { - Label: "Salons ignorés", - Value: config.ModifyDisChannel, - Emoji: &emoji.Component{Name: "🫣"}, - }, - { - Label: "Temps avant la réduction d'expérience", - Value: config.ModifyTimeReduce, - Emoji: &emoji.Component{Name: "📉"}, - }, - }, + MenuType: types.SelectMenuChannel, + CustomID: config.ModifyDisChannel, + Placeholder: "Pas de salons désactivé", + MinValues: &zero, + MaxValues: 25, + DefaultValues: disChansDefault, + }, + }, + }, + &component.Section{ + Components: []component.Message{ + &component.TextDisplay{Content: "**Rôles de niveau**\n" + roles}, + }, + Accessory: &component.Button{ + Label: "Modifier", + Style: component.ButtonStyleSecondary, + CustomID: config.ModifyXpRole, + }, + }, + &component.Section{ + Components: []component.Message{ + &component.TextDisplay{ + Content: fmt.Sprintf("**Jours avant la réduction**\n-# Seule l'expérience gagnée les x derniers jours est comptabilisée dans le niveau par défaut\n%d jours", cfg.DaysXPRemains), }, }, + Accessory: &component.Button{ + Label: "Modifier", + Style: component.ButtonStyleSecondary, + CustomID: config.ModifyTimeReduce, + }, }, }, }, @@ -121,16 +134,31 @@ func ConfigCommand( } func ConfigMessageComponent( - session *discordgo.Session, + s *discordgo.Session, i *discordgo.InteractionCreate, _ *interaction.MessageComponentData, _ *cmd.ResponseBuilder, ) { response := ConfigResponse(i) response.Type = types.InteractionResponseUpdateMessage - err := session.InteractionAPI().Respond(i.Interaction, response) + err := s.InteractionAPI().Respond(i.Interaction, response) + + if err != nil { + s.LogError(err, "sending config") + } +} + +func ConfigModal( + s *discordgo.Session, + i *discordgo.InteractionCreate, + _ *interaction.ModalSubmitData, + resp *cmd.ResponseBuilder, +) { + response := ConfigResponse(i) + response.Type = types.InteractionResponseUpdateMessage + err := s.InteractionAPI().Respond(i.Interaction, response) if err != nil { - session.LogError(err, "sending config") + s.LogError(err, "sending config") } } -- cgit v1.2.3 From beaea94172f16c350515cb28941f3d5a2101b690 Mon Sep 17 00:00:00 2001 From: ascpial Date: Sun, 21 Sep 2025 00:18:15 +0200 Subject: perf(config): use more modern slices.SortFunc --- commands/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'commands/config.go') diff --git a/commands/config.go b/commands/config.go index 5a2f763..fc15a5c 100644 --- a/commands/config.go +++ b/commands/config.go @@ -2,7 +2,7 @@ package commands import ( "fmt" - "sort" + "slices" "strings" "git.anhgelus.world/anhgelus/les-copaings-bot/config" @@ -24,8 +24,8 @@ func ConfigResponse(i *discordgo.InteractionCreate) *interaction.Response { cfg := config.GetGuildConfig(i.GuildID) roles := "" l := len(cfg.XpRoles) - 1 - sort.Slice(cfg.XpRoles, func(i, j int) bool { - return cfg.XpRoles[i].XP > cfg.XpRoles[j].XP + slices.SortFunc(cfg.XpRoles, func(xp1, xp2 config.XpRole) int { + return int(xp2.XP) - int(xp1.XP) }) for i, r := range cfg.XpRoles { if i == l { -- cgit v1.2.3 From b61a834b608df3d5e617912eefb28924ef3a46df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 26 Sep 2025 18:30:57 +0200 Subject: build(gokord): bump to latest nightly --- commands/config.go | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'commands/config.go') diff --git a/commands/config.go b/commands/config.go index fc15a5c..7ffd4af 100644 --- a/commands/config.go +++ b/commands/config.go @@ -8,10 +8,11 @@ import ( "git.anhgelus.world/anhgelus/les-copaings-bot/config" "git.anhgelus.world/anhgelus/les-copaings-bot/exp" "github.com/anhgelus/gokord/cmd" - discordgo "github.com/nyttikord/gokord" + "github.com/nyttikord/gokord/bot" "github.com/nyttikord/gokord/channel" "github.com/nyttikord/gokord/component" "github.com/nyttikord/gokord/discord/types" + "github.com/nyttikord/gokord/event" "github.com/nyttikord/gokord/interaction" ) @@ -20,7 +21,7 @@ const ( OpenConfig = "config" ) -func ConfigResponse(i *discordgo.InteractionCreate) *interaction.Response { +func ConfigResponse(i *event.InteractionCreate) *interaction.Response { cfg := config.GetGuildConfig(i.GuildID) roles := "" l := len(cfg.XpRoles) - 1 @@ -38,7 +39,7 @@ func ConfigResponse(i *discordgo.InteractionCreate) *interaction.Response { roles = "Aucun rôle configuré" } disChans := strings.Split(cfg.DisabledChannels, ";") - disChansDefault := []component.SelectMenuDefaultValue{} + var disChansDefault []component.SelectMenuDefaultValue for _, c := range disChans { if c != "" { disChansDefault = append(disChansDefault, component.SelectMenuDefaultValue{ @@ -47,7 +48,7 @@ func ConfigResponse(i *discordgo.InteractionCreate) *interaction.Response { }) } } - defaultChan := []component.SelectMenuDefaultValue{} + var defaultChan []component.SelectMenuDefaultValue if len(cfg.FallbackChannel) > 0 { defaultChan = append(defaultChan, component.SelectMenuDefaultValue{ ID: cfg.FallbackChannel, @@ -121,21 +122,21 @@ func ConfigResponse(i *discordgo.InteractionCreate) *interaction.Response { } func ConfigCommand( - session *discordgo.Session, - i *discordgo.InteractionCreate, + s bot.Session, + i *event.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder, ) { - err := session.InteractionAPI().Respond(i.Interaction, ConfigResponse(i)) + err := s.InteractionAPI().Respond(i.Interaction, ConfigResponse(i)) if err != nil { - session.LogError(err, "config/guild.go - Sending config") + s.LogError(err, "config/guild.go - Sending config") } } func ConfigMessageComponent( - s *discordgo.Session, - i *discordgo.InteractionCreate, + s bot.Session, + i *event.InteractionCreate, _ *interaction.MessageComponentData, _ *cmd.ResponseBuilder, ) { @@ -149,10 +150,10 @@ func ConfigMessageComponent( } func ConfigModal( - s *discordgo.Session, - i *discordgo.InteractionCreate, + s bot.Session, + i *event.InteractionCreate, _ *interaction.ModalSubmitData, - resp *cmd.ResponseBuilder, + _ *cmd.ResponseBuilder, ) { response := ConfigResponse(i) response.Type = types.InteractionResponseUpdateMessage -- cgit v1.2.3 From cfdba5f417bb31aac564d13becc09874f17d075d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Sat, 27 Sep 2025 17:34:38 +0200 Subject: build(gokord): bump to latest nightly --- commands/config.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'commands/config.go') diff --git a/commands/config.go b/commands/config.go index 7ffd4af..336e66a 100644 --- a/commands/config.go +++ b/commands/config.go @@ -130,7 +130,7 @@ func ConfigCommand( err := s.InteractionAPI().Respond(i.Interaction, ConfigResponse(i)) if err != nil { - s.LogError(err, "config/guild.go - Sending config") + s.Logger().Error("sending config", "error", err) } } @@ -145,7 +145,7 @@ func ConfigMessageComponent( err := s.InteractionAPI().Respond(i.Interaction, response) if err != nil { - s.LogError(err, "sending config") + s.Logger().Error("sending config", "error", err) } } @@ -160,6 +160,6 @@ func ConfigModal( err := s.InteractionAPI().Respond(i.Interaction, response) if err != nil { - s.LogError(err, "sending config") + s.Logger().Error("sending config", "error", err) } } -- cgit v1.2.3