From b489caee2e20e030254ed1227612c82ebd913e62 Mon Sep 17 00:00:00 2001 From: mlnrDev Date: Tue, 19 Mar 2024 13:54:44 +0100 Subject: [PATCH] I do not take responsibility for this proof: https://i.imgur.com/7t1FPtJ.png --- discord/application_command.go | 2 +- discord/component.go | 2 +- handler/mux.go | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/discord/application_command.go b/discord/application_command.go index a0e06b78f..1f149bec7 100644 --- a/discord/application_command.go +++ b/discord/application_command.go @@ -11,7 +11,7 @@ import ( type ApplicationCommandType int const ( - ApplicationCommandTypeSlash = iota + 1 + ApplicationCommandTypeSlash ApplicationCommandType = iota + 1 ApplicationCommandTypeUser ApplicationCommandTypeMessage ) diff --git a/discord/component.go b/discord/component.go index 33400f5fe..b8c0dd3e8 100644 --- a/discord/component.go +++ b/discord/component.go @@ -12,7 +12,7 @@ type ComponentType int // Supported ComponentType(s) const ( - ComponentTypeActionRow = iota + 1 + ComponentTypeActionRow ComponentType = iota + 1 ComponentTypeButton ComponentTypeStringSelectMenu ComponentTypeTextInput diff --git a/handler/mux.go b/handler/mux.go index 5887d4022..90e78781f 100644 --- a/handler/mux.go +++ b/handler/mux.go @@ -205,7 +205,7 @@ func (r *Mux) SlashCommand(pattern string, h SlashCommandHandler) { pattern: pattern, handler: h, t: discord.InteractionTypeApplicationCommand, - t2: []int{discord.ApplicationCommandTypeSlash}, + t2: []int{int(discord.ApplicationCommandTypeSlash)}, }) } @@ -216,7 +216,7 @@ func (r *Mux) UserCommand(pattern string, h UserCommandHandler) { pattern: pattern, handler: h, t: discord.InteractionTypeApplicationCommand, - t2: []int{discord.ApplicationCommandTypeUser}, + t2: []int{int(discord.ApplicationCommandTypeUser)}, }) } @@ -227,7 +227,7 @@ func (r *Mux) MessageCommand(pattern string, h MessageCommandHandler) { pattern: pattern, handler: h, t: discord.InteractionTypeApplicationCommand, - t2: []int{discord.ApplicationCommandTypeMessage}, + t2: []int{int(discord.ApplicationCommandTypeMessage)}, }) } @@ -258,7 +258,7 @@ func (r *Mux) ButtonComponent(pattern string, h ButtonComponentHandler) { pattern: pattern, handler: h, t: discord.InteractionTypeComponent, - t2: []int{discord.ComponentTypeButton}, + t2: []int{int(discord.ComponentTypeButton)}, }) } @@ -270,11 +270,11 @@ func (r *Mux) SelectMenuComponent(pattern string, h SelectMenuComponentHandler) handler: h, t: discord.InteractionTypeComponent, t2: []int{ - discord.ComponentTypeStringSelectMenu, - discord.ComponentTypeUserSelectMenu, - discord.ComponentTypeRoleSelectMenu, - discord.ComponentTypeMentionableSelectMenu, - discord.ComponentTypeChannelSelectMenu, + int(discord.ComponentTypeStringSelectMenu), + int(discord.ComponentTypeUserSelectMenu), + int(discord.ComponentTypeRoleSelectMenu), + int(discord.ComponentTypeMentionableSelectMenu), + int(discord.ComponentTypeChannelSelectMenu), }, }) }