Skip to content

Commit

Permalink
I do not take responsibility for this
Browse files Browse the repository at this point in the history
  • Loading branch information
mlnrDev committed Mar 19, 2024
1 parent 0af8c36 commit b489cae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion discord/application_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
type ApplicationCommandType int

const (
ApplicationCommandTypeSlash = iota + 1
ApplicationCommandTypeSlash ApplicationCommandType = iota + 1
ApplicationCommandTypeUser
ApplicationCommandTypeMessage
)
Expand Down
2 changes: 1 addition & 1 deletion discord/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ComponentType int

// Supported ComponentType(s)
const (
ComponentTypeActionRow = iota + 1
ComponentTypeActionRow ComponentType = iota + 1
ComponentTypeButton
ComponentTypeStringSelectMenu
ComponentTypeTextInput
Expand Down
18 changes: 9 additions & 9 deletions handler/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)},
})
}

Expand All @@ -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)},
})
}

Expand All @@ -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)},
})
}

Expand Down Expand Up @@ -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)},
})
}

Expand All @@ -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),
},
})
}
Expand Down

0 comments on commit b489cae

Please sign in to comment.