aboutsummaryrefslogtreecommitdiff
path: root/commands/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/config.go')
-rw-r--r--commands/config.go36
1 files changed, 1 insertions, 35 deletions
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())
}