Skip to content

Commit

Permalink
Merge branch 'master' into patch/team-roles
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Mar 19, 2024
2 parents 3d89a2d + b370d23 commit 5426da8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 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/application_command_permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ApplicationCommandPermissionType int

// types of ApplicationCommandPermissionType
const (
ApplicationCommandPermissionTypeRole = iota + 1
ApplicationCommandPermissionTypeRole ApplicationCommandPermissionType = iota + 1
ApplicationCommandPermissionTypeUser
ApplicationCommandPermissionTypeChannel
)
Expand Down
2 changes: 1 addition & 1 deletion discord/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ type PartialChannel struct {
type VideoQualityMode int

const (
VideoQualityModeAuto = iota + 1
VideoQualityModeAuto VideoQualityMode = iota + 1
VideoQualityModeFull
)

Expand Down
6 changes: 3 additions & 3 deletions 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 Expand Up @@ -229,7 +229,7 @@ type ButtonStyle int

// Supported ButtonStyle(s)
const (
ButtonStylePrimary = iota + 1
ButtonStylePrimary ButtonStyle = iota + 1
ButtonStyleSecondary
ButtonStyleSuccess
ButtonStyleDanger
Expand Down Expand Up @@ -459,6 +459,6 @@ func (c TextInputComponent) WithValue(value string) TextInputComponent {
type TextInputStyle int

const (
TextInputStyleShort = iota + 1
TextInputStyleShort TextInputStyle = iota + 1
TextInputStyleParagraph
)
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 5426da8

Please sign in to comment.