Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add User app installation ApplicationCommand struct fields #1510

Closed
wants to merge 2 commits into from
Closed
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
22 changes: 22 additions & 0 deletions interactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@ const (
MessageApplicationCommand ApplicationCommandType = 3
)

// IntegrationType represents the type of an application's supported integration
type IntegrationType int

// Integration types
const (
GuildInstallIntegrationType IntegrationType = 0
UserInstallIntegrationType IntegrationType = 1
)

// ContextType represents the type of a application command's context.
type ContextType int

// Context types
const (
GuildContextType ContextType = 0
BotDMContextType ContextType = 1
PrivateChannelContextType ContextType = 2
)

// ApplicationCommand represents an application's slash command.
type ApplicationCommand struct {
ID string `json:"id,omitempty"`
Expand All @@ -44,6 +63,9 @@ type ApplicationCommand struct {
DMPermission *bool `json:"dm_permission,omitempty"`
NSFW *bool `json:"nsfw,omitempty"`

IntegrationTypes []IntegrationType `json:"integration_types,omitempty"`
Contexts []ContextType `json:"contexts,omitempty"`

// NOTE: Chat commands only. Otherwise it mustn't be set.

Description string `json:"description,omitempty"`
Expand Down