Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bot/button/handlers/addadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,13 @@ func (h *AddAdminHandler) Execute(ctx *context.ButtonContext) {
Deny: 0,
})

pos := 0
if ch.Position != nil {
pos = *ch.Position
}
data := rest.ModifyChannelData{
PermissionOverwrites: overwrites,
Position: ch.Position,
Position: pos,
}

ticketAuditReason := fmt.Sprintf("Added admin to ticket %d", ticket.Id)
Expand Down
6 changes: 5 additions & 1 deletion bot/button/handlers/addsupport.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,13 @@ func updateChannelPermissions(ctx cmdregistry.CommandContext, id uint64, mention
Deny: 0,
})

pos := 0
if ch.Position != nil {
pos = *ch.Position
}
data := rest.ModifyChannelData{
PermissionOverwrites: overwrites,
Position: ch.Position,
Position: pos,
}

ticketAuditReason := fmt.Sprintf("Added support to ticket %d", ticket.Id)
Expand Down
2 changes: 1 addition & 1 deletion bot/button/handlers/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (h *FormHandler) Execute(ctx *context.ModalContext) {
answer := ""

switch actionRow.Component.Type {
case component.ComponentSelectMenu:
case component.ComponentStringSelect:
answer = strings.Join(actionRow.Component.Values, ", ")
case component.ComponentInputText:
answer = actionRow.Component.Value
Expand Down
2 changes: 1 addition & 1 deletion bot/button/handlers/panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func buildForm(panel database.Panel, form database.Form, inputs []database.FormI

switch input.Type {
// String Select
case int(component.ComponentSelectMenu):
case int(component.ComponentStringSelect):
opts := make([]component.SelectOption, len(options))
for j, option := range options {
opts[j] = component.SelectOption{
Expand Down
2 changes: 1 addition & 1 deletion bot/button/handlers/tickets/edit/editlabelsbutton.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (h *EditLabelsButtonHandler) Execute(ctx *context.ButtonContext) {
Label: labels[i].Name,
Value: fmt.Sprintf("%d", labels[i].LabelId),
Default: utils.Contains(ticketLabelIds, labels[i].LabelId),
Emoji: &emoji.Emoji{Name: colourEmoji},
Emoji: &emoji.Emoji{Name: utils.Ptr(colourEmoji)},
})
}

Expand Down
2 changes: 1 addition & 1 deletion bot/button/handlers/unclaim.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (h *UnclaimHandler) Execute(ctx *context.ButtonContext) {
// Always update the name to match the new panel's naming scheme
shouldUpdateName := true
claimedChannelName, _ := logic.GenerateChannelName(ctx.Context, ctx.Worker(), panel, ticket.GuildId, ticket.Id, ticket.UserId, &whoClaimed)
if ch.Name != claimedChannelName {
if ch.Name == nil || *ch.Name != claimedChannelName {
shouldUpdateName = false
}

Expand Down
4 changes: 2 additions & 2 deletions bot/button/manager/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func HandleInteraction(ctx context.Context, manager *ComponentInteractionManager
switch data.Data.Type() {
case component.ComponentButton:
cc = cmdcontext.NewButtonContext(ctx, worker, data, premiumTier, responseCh)
case component.ComponentSelectMenu:
case component.ComponentStringSelect:
cc = cmdcontext.NewSelectMenuContext(ctx, worker, data, premiumTier, responseCh)
default:
sentry.ErrorWithContext(fmt.Errorf("invalid message component type: %d", data.Data.ComponentType), errorcontext.WorkerErrorContext{
Expand Down Expand Up @@ -137,7 +137,7 @@ func HandleInteraction(ctx context.Context, manager *ComponentInteractionManager
}

return canEdit
case component.ComponentSelectMenu:
case component.ComponentStringSelect:
handler := manager.MatchSelect(data.Data.AsSelectMenu().CustomId)
if handler == nil {
return false
Expand Down
2 changes: 1 addition & 1 deletion bot/command/context/buttoncontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (c *ButtonContext) User() (user.User, error) {

func (c *ButtonContext) InteractionUser() user.User {
if c.Interaction.Member != nil {
return c.Interaction.Member.User
return *c.Interaction.Member.User
} else if c.Interaction.User != nil {
return *c.Interaction.User
} else { // Infallible
Expand Down
17 changes: 10 additions & 7 deletions bot/command/context/interactionextensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,38 @@ func NewInteractionExtension(interaction interaction.ApplicationCommandInteracti
}

func (i InteractionExtension) Resolved() interaction.ResolvedData {
return i.interaction.Data.Resolved
if i.interaction.Data.Resolved == nil {
return interaction.ResolvedData{}
}
return *i.interaction.Data.Resolved
}

func (i InteractionExtension) ResolvedUser(id uint64) (user.User, bool) {
user, ok := i.interaction.Data.Resolved.Users[objects.Snowflake(id)]
user, ok := i.Resolved().Users[objects.Snowflake(id)]
return user, ok
}

func (i InteractionExtension) ResolvedMember(id uint64) (member.Member, bool) {
member, ok := i.interaction.Data.Resolved.Members[objects.Snowflake(id)]
member, ok := i.Resolved().Members[objects.Snowflake(id)]
return member, ok
}

func (i InteractionExtension) ResolvedRole(id uint64) (guild.Role, bool) {
role, ok := i.interaction.Data.Resolved.Roles[objects.Snowflake(id)]
role, ok := i.Resolved().Roles[objects.Snowflake(id)]
return role, ok
}

func (i InteractionExtension) ResolvedChannel(id uint64) (channel.Channel, bool) {
channel, ok := i.interaction.Data.Resolved.Channels[objects.Snowflake(id)]
channel, ok := i.Resolved().Channels[objects.Snowflake(id)]
return channel, ok
}

func (i InteractionExtension) ResolvedMessage(id uint64) (message.Message, bool) {
message, ok := i.interaction.Data.Resolved.Messages[objects.Snowflake(id)]
message, ok := i.Resolved().Messages[objects.Snowflake(id)]
return message, ok
}

func (i InteractionExtension) ResolvedAttachment(id uint64) (channel.Attachment, bool) {
attachment, ok := i.interaction.Data.Resolved.Attachments[objects.Snowflake(id)]
attachment, ok := i.Resolved().Attachments[objects.Snowflake(id)]
return attachment, ok
}
4 changes: 2 additions & 2 deletions bot/command/context/mentionabletype.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const (
func (m MentionableType) OverwriteType() channel.PermissionOverwriteType {
switch m {
case MentionableTypeUser:
return channel.PermissionTypeMember
return channel.PermissionOverwriteTypeMember
case MentionableTypeRole:
return channel.PermissionTypeRole
return channel.PermissionOverwriteTypeRole
default:
return -1
}
Expand Down
2 changes: 1 addition & 1 deletion bot/command/context/modalcontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (c *ModalContext) User() (user.User, error) {

func (c *ModalContext) InteractionUser() user.User {
if c.Interaction.Member != nil {
return c.Interaction.Member.User
return *c.Interaction.Member.User
} else if c.Interaction.User != nil {
return *c.Interaction.User
} else { // Infallible
Expand Down
2 changes: 1 addition & 1 deletion bot/command/context/selectmenucontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (c *SelectMenuContext) User() (user.User, error) {

func (c *SelectMenuContext) InteractionUser() user.User {
if c.Interaction.Member != nil {
return c.Interaction.Member.User
return *c.Interaction.Member.User
} else if c.Interaction.User != nil {
return *c.Interaction.User
} else { // Infallible
Expand Down
6 changes: 3 additions & 3 deletions bot/command/impl/admin/adminblacklist.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func (AdminBlacklistCommand) Properties() registry.Properties {
Category: command.Settings,
AdminOnly: true,
Arguments: command.Arguments(
command.NewRequiredArgument("guild_id", "ID of the guild to blacklist", interaction.OptionTypeString, i18n.MessageInvalidArgument),
command.NewOptionalArgument("reason", "Reason for blacklisting the guild", interaction.OptionTypeString, i18n.MessageInvalidArgument),
command.NewOptionalArgument("real_owner_id", "ID of the real owner (if different from Discord server owner)", interaction.OptionTypeString, i18n.MessageInvalidArgument),
command.NewRequiredArgument("guild_id", "ID of the guild to blacklist", interaction.ApplicationCommandOptionTypeString, i18n.MessageInvalidArgument),
command.NewOptionalArgument("reason", "Reason for blacklisting the guild", interaction.ApplicationCommandOptionTypeString, i18n.MessageInvalidArgument),
command.NewOptionalArgument("real_owner_id", "ID of the real owner (if different from Discord server owner)", interaction.ApplicationCommandOptionTypeString, i18n.MessageInvalidArgument),
),
Timeout: time.Second * 10,
}
Expand Down
6 changes: 3 additions & 3 deletions bot/command/impl/admin/admingenpremium.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ func (c AdminGenPremiumCommand) Properties() registry.Properties {
Category: command.Settings,
AdminOnly: true,
Arguments: command.Arguments(
command.NewRequiredAutocompleteableArgument("sku", "SKU for the key to grant", interaction.OptionTypeString, i18n.MessageInvalidArgument, c.AutoCompleteHandler),
command.NewRequiredArgument("length", "Length in days of the key", interaction.OptionTypeInteger, i18n.MessageInvalidArgument),
command.NewOptionalArgument("amount", "Amount of keys to generate", interaction.OptionTypeInteger, i18n.MessageInvalidArgument),
command.NewRequiredAutocompleteableArgument("sku", "SKU for the key to grant", interaction.ApplicationCommandOptionTypeString, i18n.MessageInvalidArgument, c.AutoCompleteHandler),
command.NewRequiredArgument("length", "Length in days of the key", interaction.ApplicationCommandOptionTypeInteger, i18n.MessageInvalidArgument),
command.NewOptionalArgument("amount", "Amount of keys to generate", interaction.ApplicationCommandOptionTypeInteger, i18n.MessageInvalidArgument),
),
Timeout: time.Second * 10,
}
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/admin/adminlistuserentitlements.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (AdminListUserEntitlementsCommand) Properties() registry.Properties {
Category: command.Settings,
HelperOnly: true,
Arguments: command.Arguments(
command.NewRequiredArgument("user", "User to fetch entitlements for", interaction.OptionTypeUser, i18n.MessageInvalidArgument),
command.NewRequiredArgument("user", "User to fetch entitlements for", interaction.ApplicationCommandOptionTypeUser, i18n.MessageInvalidArgument),
),
Timeout: time.Second * 15,
}
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/admin/adminrecache.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (AdminRecacheCommand) Properties() registry.Properties {
Category: command.Settings,
HelperOnly: true,
Arguments: command.Arguments(
command.NewOptionalArgument("guildid", "ID of the guild to recache", interaction.OptionTypeString, i18n.MessageInvalidArgument),
command.NewOptionalArgument("guildid", "ID of the guild to recache", interaction.ApplicationCommandOptionTypeString, i18n.MessageInvalidArgument),
),
Timeout: time.Second * 10,
}
Expand Down
4 changes: 2 additions & 2 deletions bot/command/impl/admin/adminwhitelabelassignguild.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ func (AdminWhitelabelAssignGuildCommand) Properties() registry.Properties {
Category: command.Settings,
HelperOnly: true,
Arguments: command.Arguments(
command.NewRequiredArgument("bot_id", "ID of the bot to assign to the guild", interaction.OptionTypeString, i18n.MessageInvalidArgument),
command.NewRequiredArgument("guild_id", "ID of the guild to assign the bot to", interaction.OptionTypeString, i18n.MessageInvalidArgument),
command.NewRequiredArgument("bot_id", "ID of the bot to assign to the guild", interaction.ApplicationCommandOptionTypeString, i18n.MessageInvalidArgument),
command.NewRequiredArgument("guild_id", "ID of the guild to assign the bot to", interaction.ApplicationCommandOptionTypeString, i18n.MessageInvalidArgument),
),
Timeout: time.Second * 10,
}
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/admin/adminwhitelabeldata.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (AdminWhitelabelDataCommand) Properties() registry.Properties {
Category: command.Settings,
HelperOnly: true,
Arguments: command.Arguments(
command.NewRequiredArgument("user_id", "ID of the user who has the whitelabel subscription", interaction.OptionTypeUser, i18n.MessageInvalidArgument),
command.NewRequiredArgument("user_id", "ID of the user who has the whitelabel subscription", interaction.ApplicationCommandOptionTypeUser, i18n.MessageInvalidArgument),
),
Timeout: time.Second * 10,
}
Expand Down
12 changes: 8 additions & 4 deletions bot/command/impl/admin/debug/debugserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (AdminDebugServerCommand) Properties() registry.Properties {
HelperOnly: true,
DisableAutoDefer: true,
Arguments: command.Arguments(
command.NewRequiredArgument("guild_id", "ID of the guild", interaction.OptionTypeString, i18n.MessageInvalidArgument),
command.NewRequiredArgument("guild_id", "ID of the guild", interaction.ApplicationCommandOptionTypeString, i18n.MessageInvalidArgument),
),
Timeout: time.Second * 10,
}
Expand Down Expand Up @@ -203,7 +203,11 @@ func (AdminDebugServerCommand) Execute(ctx registry.CommandContext, raw string)
if settings.UseThreads && settings.TicketNotificationChannel != nil {
ch, err := worker.GetChannel(*settings.TicketNotificationChannel)
if err == nil {
return ch.Name, strconv.FormatUint(ch.Id, 10)
name := ""
if ch.Name != nil {
name = *ch.Name
}
return name, strconv.FormatUint(ch.Id, 10)
}
}
return "Disabled", "Disabled"
Expand Down Expand Up @@ -254,8 +258,8 @@ func (AdminDebugServerCommand) Execute(ctx registry.CommandContext, raw string)
fmt.Sprintf("Name: `%s`", guild.Name),
fmt.Sprintf("Owner: `%s` - <@%s> (%s) ", owner.Username, ownerId, ownerId),
}
if guild.VanityUrlCode != "" {
guildInfo = append(guildInfo, fmt.Sprintf("Vanity URL: `.gg/%s`", guild.VanityUrlCode))
if guild.VanityUrlCode != nil && *guild.VanityUrlCode != "" {
guildInfo = append(guildInfo, fmt.Sprintf("Vanity URL: `.gg/%s`", *guild.VanityUrlCode))
}

// Add blacklist information
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/general/gdpr.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (c GDPRCommand) Properties() registry.Properties {
Contexts: []interaction.InteractionContextType{interaction.InteractionContextBotDM},
IgnoreBlacklist: true,
Arguments: command.Arguments(
command.NewOptionalAutocompleteableArgument("lang", "Language for GDPR messages", interaction.OptionTypeString, i18n.GdprLanguageOption, c.LanguageAutoCompleteHandler),
command.NewOptionalAutocompleteableArgument("lang", "Language for GDPR messages", interaction.ApplicationCommandOptionTypeString, i18n.GdprLanguageOption, c.LanguageAutoCompleteHandler),
),
}
}
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/settings/addadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (AddAdminCommand) Properties() registry.Properties {
Category: command.Settings,
InteractionOnly: true,
Arguments: command.Arguments(
command.NewRequiredArgument("user_or_role", "User or role to apply the administrator permission to", interaction.OptionTypeMentionable, i18n.MessageAddAdminNoMembers),
command.NewRequiredArgument("user_or_role", "User or role to apply the administrator permission to", interaction.ApplicationCommandOptionTypeMentionable, i18n.MessageAddAdminNoMembers),
),
DefaultEphemeral: true,
Timeout: time.Second * 3,
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/settings/addsupport.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (AddSupportCommand) Properties() registry.Properties {
Category: command.Settings,
InteractionOnly: true,
Arguments: command.Arguments(
command.NewRequiredArgument("role", "Role to apply the support representative permission to", interaction.OptionTypeMentionable, i18n.MessageAddSupportNoMembers),
command.NewRequiredArgument("role", "Role to apply the support representative permission to", interaction.ApplicationCommandOptionTypeMentionable, i18n.MessageAddSupportNoMembers),
),
DefaultEphemeral: true,
Timeout: time.Second * 3,
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/settings/blacklist.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (BlacklistCommand) Properties() registry.Properties {
PermissionLevel: permission.Support,
Category: command.Settings,
Arguments: command.Arguments(
command.NewRequiredArgument("user_or_role", "User or role to blacklist or unblacklist", interaction.OptionTypeMentionable, i18n.MessageBlacklistNoMembers),
command.NewRequiredArgument("user_or_role", "User or role to blacklist or unblacklist", interaction.ApplicationCommandOptionTypeMentionable, i18n.MessageBlacklistNoMembers),
),
DefaultEphemeral: true,
Timeout: time.Second * 5,
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/settings/removeadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (RemoveAdminCommand) Properties() registry.Properties {
PermissionLevel: permcache.Admin,
Category: command.Settings,
Arguments: command.Arguments(
command.NewRequiredArgument("user_or_role", "User or role to remove the administrator permission from", interaction.OptionTypeMentionable, i18n.MessageRemoveAdminNoMembers),
command.NewRequiredArgument("user_or_role", "User or role to remove the administrator permission from", interaction.ApplicationCommandOptionTypeMentionable, i18n.MessageRemoveAdminNoMembers),
),
DefaultEphemeral: true,
Timeout: time.Second * 5,
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/settings/removesupport.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (RemoveSupportCommand) Properties() registry.Properties {
PermissionLevel: permcache.Admin,
Category: command.Settings,
Arguments: command.Arguments(
command.NewRequiredArgument("user_or_role", "User or role to remove the support representative permission from", interaction.OptionTypeMentionable, i18n.MessageRemoveSupportNoMembers),
command.NewRequiredArgument("user_or_role", "User or role to remove the support representative permission from", interaction.ApplicationCommandOptionTypeMentionable, i18n.MessageRemoveSupportNoMembers),
),
DefaultEphemeral: true,
Timeout: time.Second * 5,
Expand Down
6 changes: 3 additions & 3 deletions bot/command/impl/settings/setup/auto.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func getTranscriptChannelData(guildId, supportRoleId, adminRoleId uint64) rest.C
overwrites := []channel.PermissionOverwrite{
{ // deny everyone else access to channel
Id: guildId,
Type: channel.PermissionTypeRole,
Type: channel.PermissionOverwriteTypeRole,
Allow: 0,
Deny: allow,
},
Expand All @@ -182,7 +182,7 @@ func getTranscriptChannelData(guildId, supportRoleId, adminRoleId uint64) rest.C
if supportRoleId != 0 {
overwrites = append(overwrites, channel.PermissionOverwrite{
Id: supportRoleId,
Type: channel.PermissionTypeRole,
Type: channel.PermissionOverwriteTypeRole,
Allow: allow,
Deny: 0,
})
Expand All @@ -191,7 +191,7 @@ func getTranscriptChannelData(guildId, supportRoleId, adminRoleId uint64) rest.C
if adminRoleId != 0 {
overwrites = append(overwrites, channel.PermissionOverwrite{
Id: adminRoleId,
Type: channel.PermissionTypeRole,
Type: channel.PermissionOverwriteTypeRole,
Allow: allow,
Deny: 0,
})
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/settings/setup/limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (LimitSetupCommand) Properties() registry.Properties {
PermissionLevel: permission.Admin,
Category: command.Settings,
Arguments: command.Arguments(
command.NewRequiredArgument("limit", "The maximum amount of tickets a user can have open simultaneously", interaction.OptionTypeInteger, i18n.SetupLimitInvalid),
command.NewRequiredArgument("limit", "The maximum amount of tickets a user can have open simultaneously", interaction.ApplicationCommandOptionTypeInteger, i18n.SetupLimitInvalid),
),
Timeout: time.Second * 3,
}
Expand Down
4 changes: 2 additions & 2 deletions bot/command/impl/settings/setup/threads.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func (ThreadsSetupCommand) Properties() registry.Properties {
PermissionLevel: permission.Admin,
Category: command.Settings,
Arguments: command.Arguments(
command.NewRequiredArgument("use_threads", "Whether or not private threads should be used for ticket", interaction.OptionTypeBoolean, "infallible"),
command.NewOptionalArgument("ticket_notification_channel", "The channel that ticket open notifications should be sent to", interaction.OptionTypeChannel, "infallible"),
command.NewRequiredArgument("use_threads", "Whether or not private threads should be used for ticket", interaction.ApplicationCommandOptionTypeBoolean, "infallible"),
command.NewOptionalArgument("ticket_notification_channel", "The channel that ticket open notifications should be sent to", interaction.ApplicationCommandOptionTypeChannel, "infallible"),
),
InteractionOnly: true,
Timeout: time.Second * 5,
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/settings/setup/transcripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (TranscriptsSetupCommand) Properties() registry.Properties {
PermissionLevel: permission.Admin,
Category: command.Settings,
Arguments: command.Arguments(
command.NewRequiredArgument("channel", "The channel that ticket transcripts should be sent to", interaction.OptionTypeChannel, i18n.SetupTranscriptsInvalid),
command.NewRequiredArgument("channel", "The channel that ticket transcripts should be sent to", interaction.ApplicationCommandOptionTypeChannel, i18n.SetupTranscriptsInvalid),
),
Timeout: time.Second * 5,
}
Expand Down
2 changes: 1 addition & 1 deletion bot/command/impl/statistics/statsuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (StatsUserCommand) Properties() registry.Properties {
Category: command.Statistics,
PremiumOnly: true,
Arguments: command.Arguments(
command.NewRequiredArgument("user", "User whose statistics to retrieve", interaction.OptionTypeUser, i18n.MessageInvalidUser),
command.NewRequiredArgument("user", "User whose statistics to retrieve", interaction.ApplicationCommandOptionTypeUser, i18n.MessageInvalidUser),
),
DefaultEphemeral: true,
Timeout: time.Second * 30,
Expand Down
Loading