|
@@ -30,15 +30,17 @@ const (
|
|
|
|
|
|
|
|
|
type ApplicationCommand struct {
|
|
|
- ID string `json:"id,omitempty"`
|
|
|
- ApplicationID string `json:"application_id,omitempty"`
|
|
|
- Type ApplicationCommandType `json:"type,omitempty"`
|
|
|
- Name string `json:"name"`
|
|
|
-
|
|
|
- Description string `json:"description,omitempty"`
|
|
|
- Version string `json:"version,omitempty"`
|
|
|
+ ID string `json:"id,omitempty"`
|
|
|
+ ApplicationID string `json:"application_id,omitempty"`
|
|
|
+ Version string `json:"version,omitempty"`
|
|
|
+ Type ApplicationCommandType `json:"type,omitempty"`
|
|
|
+ Name string `json:"name"`
|
|
|
+ DefaultPermission *bool `json:"default_permission,omitempty"`
|
|
|
+
|
|
|
|
|
|
- Options []*ApplicationCommandOption `json:"options"`
|
|
|
+
|
|
|
+ Description string `json:"description,omitempty"`
|
|
|
+ Options []*ApplicationCommandOption `json:"options"`
|
|
|
}
|
|
|
|
|
|
|
|
@@ -107,6 +109,35 @@ type ApplicationCommandOptionChoice struct {
|
|
|
Value interface{} `json:"value"`
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+type ApplicationCommandPermissions struct {
|
|
|
+ ID string `json:"id"`
|
|
|
+ Type ApplicationCommandPermissionType `json:"type"`
|
|
|
+ Permission bool `json:"permission"`
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+type ApplicationCommandPermissionsList struct {
|
|
|
+ Permissions []*ApplicationCommandPermissions `json:"permissions"`
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+type GuildApplicationCommandPermissions struct {
|
|
|
+ ID string `json:"id"`
|
|
|
+ ApplicationID string `json:"application_id"`
|
|
|
+ GuildID string `json:"guild_id"`
|
|
|
+ Permissions []*ApplicationCommandPermissions `json:"permissions"`
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+type ApplicationCommandPermissionType uint8
|
|
|
+
|
|
|
+
|
|
|
+const (
|
|
|
+ ApplicationCommandPermissionTypeRole ApplicationCommandPermissionType = 1
|
|
|
+ ApplicationCommandPermissionTypeUser ApplicationCommandPermissionType = 2
|
|
|
+)
|
|
|
+
|
|
|
|
|
|
type InteractionType uint8
|
|
|
|