diff options
| author | Anhgelus Morhtuuzh <anhgelus@anhgelus.world> | 2025-05-21 17:28:18 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus@anhgelus.world> | 2025-05-21 17:28:18 +0200 |
| commit | 642025681befa35f67cc7c25383eb782ac01feac (patch) | |
| tree | 6c2b1fdb2712300cdd4615de8d8cae06e8b382af /commands/config.go | |
| parent | 24f0db37218c4050e01edaa031410382aa252324 (diff) | |
build(gokord): upgrade to 0.7.0
Diffstat (limited to 'commands/config.go')
| -rw-r--r-- | commands/config.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/commands/config.go b/commands/config.go index a3857c6..8df8664 100644 --- a/commands/config.go +++ b/commands/config.go @@ -12,7 +12,7 @@ import ( func ConfigShow(s *discordgo.Session, i *discordgo.InteractionCreate) { cfg := config.GetGuildConfig(i.GuildID) - resp := utils.ResponseBuilder{C: s, I: i} + resp := utils.NewResponseBuilder(s, i) roles := "" l := len(cfg.XpRoles) - 1 for i, r := range cfg.XpRoles { @@ -80,8 +80,7 @@ func ConfigShow(s *discordgo.Session, i *discordgo.InteractionCreate) { func ConfigXP(s *discordgo.Session, i *discordgo.InteractionCreate) { optMap := utils.GenerateOptionMapForSubcommand(i) - resp := utils.ResponseBuilder{C: s, I: i} - resp.IsEphemeral() + resp := utils.NewResponseBuilder(s, i).IsEphemeral() // verify every args t, ok := optMap["type"] if !ok { @@ -214,8 +213,7 @@ func ConfigXP(s *discordgo.Session, i *discordgo.InteractionCreate) { func ConfigChannel(s *discordgo.Session, i *discordgo.InteractionCreate) { optMap := utils.GenerateOptionMapForSubcommand(i) - resp := utils.ResponseBuilder{C: s, I: i} - resp.IsEphemeral() + resp := utils.NewResponseBuilder(s, i).IsEphemeral() // verify every args t, ok := optMap["type"] if !ok { @@ -286,8 +284,7 @@ func ConfigChannel(s *discordgo.Session, i *discordgo.InteractionCreate) { func ConfigFallbackChannel(s *discordgo.Session, i *discordgo.InteractionCreate) { optMap := utils.GenerateOptionMapForSubcommand(i) - resp := utils.ResponseBuilder{C: s, I: i} - resp.IsEphemeral() + resp := utils.NewResponseBuilder(s, i).IsEphemeral() // verify every args salon, ok := optMap["channel"] if !ok { @@ -329,8 +326,7 @@ func ConfigFallbackChannel(s *discordgo.Session, i *discordgo.InteractionCreate) func ConfigPeriodBeforeReduce(s *discordgo.Session, i *discordgo.InteractionCreate) { optMap := utils.GenerateOptionMapForSubcommand(i) - resp := utils.ResponseBuilder{C: s, I: i} - resp.IsEphemeral() + resp := utils.NewResponseBuilder(s, i).IsEphemeral() // verify every args days, ok := optMap["days"] if !ok { |
