Skip to content

Commit

Permalink
make Handler a bointer
Browse files Browse the repository at this point in the history
  • Loading branch information
sebm253 committed Aug 28, 2024
1 parent 2360518 commit 8d12161
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions discord/application_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ type EntryPointCommand struct {
integrationTypes []ApplicationIntegrationType
contexts []InteractionContextType
version snowflake.ID
handler EntryPointCommandHandlerType
handler *EntryPointCommandHandlerType
}

func (c *EntryPointCommand) UnmarshalJSON(data []byte) error {
Expand Down Expand Up @@ -556,7 +556,7 @@ func (c EntryPointCommand) Version() snowflake.ID {
return c.version
}

func (c EntryPointCommand) Handler() EntryPointCommandHandlerType {
func (c EntryPointCommand) Handler() *EntryPointCommandHandlerType {
return c.handler
}

Expand Down
28 changes: 14 additions & 14 deletions discord/application_command_raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ type rawContextCommand struct {
}

type rawEntryPointCommand struct {
ID snowflake.ID `json:"id"`
Type ApplicationCommandType `json:"type"`
ApplicationID snowflake.ID `json:"application_id"`
GuildID *snowflake.ID `json:"guild_id,omitempty"`
Name string `json:"name"`
NameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
NameLocalized string `json:"name_localized,omitempty"`
DefaultMemberPermissions Permissions `json:"default_member_permissions"`
DMPermission bool `json:"dm_permission"`
NSFW bool `json:"nsfw"`
IntegrationTypes []ApplicationIntegrationType `json:"integration_types"`
Contexts []InteractionContextType `json:"contexts"`
Version snowflake.ID `json:"version"`
Handler EntryPointCommandHandlerType `json:"handler"`
ID snowflake.ID `json:"id"`
Type ApplicationCommandType `json:"type"`
ApplicationID snowflake.ID `json:"application_id"`
GuildID *snowflake.ID `json:"guild_id,omitempty"`
Name string `json:"name"`
NameLocalizations map[Locale]string `json:"name_localizations,omitempty"`
NameLocalized string `json:"name_localized,omitempty"`
DefaultMemberPermissions Permissions `json:"default_member_permissions"`
DMPermission bool `json:"dm_permission"`
NSFW bool `json:"nsfw"`
IntegrationTypes []ApplicationIntegrationType `json:"integration_types"`
Contexts []InteractionContextType `json:"contexts"`
Version snowflake.ID `json:"version"`
Handler *EntryPointCommandHandlerType `json:"handler"`
}

0 comments on commit 8d12161

Please sign in to comment.