Browse Source

[types] Refactor and add Application Command types

pull/7494/head
Josh 3 years ago
committed by GitHub
parent
commit
e05c80b963
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      discord/http.py
  2. 220
      discord/types/command.py
  3. 239
      discord/types/interactions.py

40
discord/http.py

@ -25,7 +25,6 @@ DEALINGS IN THE SOFTWARE.
from __future__ import annotations from __future__ import annotations
import asyncio import asyncio
import json
import logging import logging
import sys import sys
from typing import ( from typing import (
@ -68,6 +67,7 @@ if TYPE_CHECKING:
appinfo, appinfo,
audit_log, audit_log,
channel, channel,
command,
components, components,
emoji, emoji,
embed, embed,
@ -1699,12 +1699,12 @@ class HTTPClient:
# Application commands (global) # Application commands (global)
def get_global_commands(self, application_id: Snowflake) -> Response[List[interactions.ApplicationCommand]]: def get_global_commands(self, application_id: Snowflake) -> Response[List[command.ApplicationCommand]]:
return self.request(Route('GET', '/applications/{application_id}/commands', application_id=application_id)) return self.request(Route('GET', '/applications/{application_id}/commands', application_id=application_id))
def get_global_command( def get_global_command(
self, application_id: Snowflake, command_id: Snowflake self, application_id: Snowflake, command_id: Snowflake
) -> Response[interactions.ApplicationCommand]: ) -> Response[command.ApplicationCommand]:
r = Route( r = Route(
'GET', 'GET',
'/applications/{application_id}/commands/{command_id}', '/applications/{application_id}/commands/{command_id}',
@ -1713,7 +1713,7 @@ class HTTPClient:
) )
return self.request(r) return self.request(r)
def upsert_global_command(self, application_id: Snowflake, payload) -> Response[interactions.ApplicationCommand]: def upsert_global_command(self, application_id: Snowflake, payload) -> Response[command.ApplicationCommand]:
r = Route('POST', '/applications/{application_id}/commands', application_id=application_id) r = Route('POST', '/applications/{application_id}/commands', application_id=application_id)
return self.request(r, json=payload) return self.request(r, json=payload)
@ -1721,8 +1721,8 @@ class HTTPClient:
self, self,
application_id: Snowflake, application_id: Snowflake,
command_id: Snowflake, command_id: Snowflake,
payload: interactions.EditApplicationCommand, payload: Dict[str, Any],
) -> Response[interactions.ApplicationCommand]: ) -> Response[command.ApplicationCommand]:
valid_keys = ( valid_keys = (
'name', 'name',
'description', 'description',
@ -1748,7 +1748,7 @@ class HTTPClient:
def bulk_upsert_global_commands( def bulk_upsert_global_commands(
self, application_id: Snowflake, payload self, application_id: Snowflake, payload
) -> Response[List[interactions.ApplicationCommand]]: ) -> Response[List[command.ApplicationCommand]]:
r = Route('PUT', '/applications/{application_id}/commands', application_id=application_id) r = Route('PUT', '/applications/{application_id}/commands', application_id=application_id)
return self.request(r, json=payload) return self.request(r, json=payload)
@ -1756,7 +1756,7 @@ class HTTPClient:
def get_guild_commands( def get_guild_commands(
self, application_id: Snowflake, guild_id: Snowflake self, application_id: Snowflake, guild_id: Snowflake
) -> Response[List[interactions.ApplicationCommand]]: ) -> Response[List[command.ApplicationCommand]]:
r = Route( r = Route(
'GET', 'GET',
'/applications/{application_id}/guilds/{guild_id}/commands', '/applications/{application_id}/guilds/{guild_id}/commands',
@ -1770,7 +1770,7 @@ class HTTPClient:
application_id: Snowflake, application_id: Snowflake,
guild_id: Snowflake, guild_id: Snowflake,
command_id: Snowflake, command_id: Snowflake,
) -> Response[interactions.ApplicationCommand]: ) -> Response[command.ApplicationCommand]:
r = Route( r = Route(
'GET', 'GET',
'/applications/{application_id}/guilds/{guild_id}/commands/{command_id}', '/applications/{application_id}/guilds/{guild_id}/commands/{command_id}',
@ -1784,8 +1784,8 @@ class HTTPClient:
self, self,
application_id: Snowflake, application_id: Snowflake,
guild_id: Snowflake, guild_id: Snowflake,
payload: interactions.EditApplicationCommand, payload: Dict[str, Any],
) -> Response[interactions.ApplicationCommand]: ) -> Response[command.ApplicationCommand]:
r = Route( r = Route(
'POST', 'POST',
'/applications/{application_id}/guilds/{guild_id}/commands', '/applications/{application_id}/guilds/{guild_id}/commands',
@ -1799,8 +1799,8 @@ class HTTPClient:
application_id: Snowflake, application_id: Snowflake,
guild_id: Snowflake, guild_id: Snowflake,
command_id: Snowflake, command_id: Snowflake,
payload: interactions.EditApplicationCommand, payload: Dict[str, Any],
) -> Response[interactions.ApplicationCommand]: ) -> Response[command.ApplicationCommand]:
valid_keys = ( valid_keys = (
'name', 'name',
'description', 'description',
@ -1835,8 +1835,8 @@ class HTTPClient:
self, self,
application_id: Snowflake, application_id: Snowflake,
guild_id: Snowflake, guild_id: Snowflake,
payload: List[interactions.EditApplicationCommand], payload: List[Dict[str, Any]],
) -> Response[List[interactions.ApplicationCommand]]: ) -> Response[List[command.ApplicationCommand]]:
r = Route( r = Route(
'PUT', 'PUT',
'/applications/{application_id}/guilds/{guild_id}/commands', '/applications/{application_id}/guilds/{guild_id}/commands',
@ -1889,7 +1889,7 @@ class HTTPClient:
token: str, token: str,
*, *,
type: InteractionResponseType, type: InteractionResponseType,
data: Optional[interactions.InteractionApplicationCommandCallbackData] = None, data: Optional[Dict[str, Any]] = None,
) -> Response[None]: ) -> Response[None]:
r = Route( r = Route(
'POST', 'POST',
@ -2003,7 +2003,7 @@ class HTTPClient:
self, self,
application_id: Snowflake, application_id: Snowflake,
guild_id: Snowflake, guild_id: Snowflake,
) -> Response[List[interactions.GuildApplicationCommandPermissions]]: ) -> Response[List[command.GuildApplicationCommandPermissions]]:
r = Route( r = Route(
'GET', 'GET',
'/applications/{application_id}/guilds/{guild_id}/commands/permissions', '/applications/{application_id}/guilds/{guild_id}/commands/permissions',
@ -2017,7 +2017,7 @@ class HTTPClient:
application_id: Snowflake, application_id: Snowflake,
guild_id: Snowflake, guild_id: Snowflake,
command_id: Snowflake, command_id: Snowflake,
) -> Response[interactions.GuildApplicationCommandPermissions]: ) -> Response[command.GuildApplicationCommandPermissions]:
r = Route( r = Route(
'GET', 'GET',
'/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions', '/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions',
@ -2032,7 +2032,7 @@ class HTTPClient:
application_id: Snowflake, application_id: Snowflake,
guild_id: Snowflake, guild_id: Snowflake,
command_id: Snowflake, command_id: Snowflake,
payload: interactions.BaseGuildApplicationCommandPermissions, payload: Dict[str, Any],
) -> Response[None]: ) -> Response[None]:
r = Route( r = Route(
'PUT', 'PUT',
@ -2047,7 +2047,7 @@ class HTTPClient:
self, self,
application_id: Snowflake, application_id: Snowflake,
guild_id: Snowflake, guild_id: Snowflake,
payload: List[interactions.PartialGuildApplicationCommandPermissions], payload: List[Dict[str, Any]],
) -> Response[None]: ) -> Response[None]:
r = Route( r = Route(
'PUT', 'PUT',

220
discord/types/command.py

@ -0,0 +1,220 @@
"""
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
from __future__ import annotations
from typing import List, Literal, TypedDict, Union
from discord.types.channel import ChannelType
from discord.types.snowflake import Snowflake
ApplicationCommandType = Literal[1, 2, 3]
ApplicationCommandOptionType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
class _BaseApplicationCommandOption(TypedDict):
name: str
description: str
class _SubCommandCommandOption(_BaseApplicationCommandOption):
type: Literal[1]
options: List[_ValueApplicationCommandOption]
class _SubCommandGroupCommandOption(_BaseApplicationCommandOption):
type: Literal[2]
options: List[_SubCommandCommandOption]
class _BaseValueApplicationCommandOption(_BaseApplicationCommandOption, total=False):
required: bool
class _StringApplicationCommandOptionChoice(TypedDict, total=False):
name: str
value: str
class _StringApplicationCommandOptionOptional(_BaseValueApplicationCommandOption, total=False):
choices: List[_StringApplicationCommandOptionChoice]
autocomplete: bool
class _StringApplicationCommandOption(_StringApplicationCommandOptionOptional):
type: Literal[3]
class _IntegerApplicationCommandOptionChoice(TypedDict, total=False):
name: str
value: int
class _IntegerApplicationCommandOptionOptional(_BaseValueApplicationCommandOption, total=False):
min_value: int
max_value: int
choices: List[_IntegerApplicationCommandOptionChoice]
autocomplete: bool
class _IntegerApplicationCommandOption(_IntegerApplicationCommandOptionOptional):
type: Literal[4]
class _BooleanApplicationCommandOption(_BaseValueApplicationCommandOption):
type: Literal[5]
class _ChannelApplicationCommandOptionChoiceOptional(_BaseApplicationCommandOption, total=False):
channel_types: List[ChannelType]
class _ChannelApplicationCommandOptionChoice(_ChannelApplicationCommandOptionChoiceOptional):
type: Literal[7]
class _NonChannelSnowflakeApplicationCommandOptionChoice(_BaseValueApplicationCommandOption):
type: Literal[6, 8, 9, 11]
_SnowflakeApplicationCommandOptionChoice = Union[
_ChannelApplicationCommandOptionChoice,
_NonChannelSnowflakeApplicationCommandOptionChoice,
]
class _NumberApplicationCommandOptionChoice(TypedDict, total=False):
name: str
value: float
class _NumberApplicationCommandOptionOptional(_BaseValueApplicationCommandOption, total=False):
min_value: float
max_value: float
choices: List[_NumberApplicationCommandOptionChoice]
autocomplete: bool
class _NumberApplicationCommandOption(_NumberApplicationCommandOptionOptional):
type: Literal[10]
_ValueApplicationCommandOption = Union[
_StringApplicationCommandOption,
_IntegerApplicationCommandOption,
_BooleanApplicationCommandOption,
_SnowflakeApplicationCommandOptionChoice,
_NumberApplicationCommandOption,
]
ApplicationCommandOption = Union[
_SubCommandGroupCommandOption,
_SubCommandCommandOption,
_ValueApplicationCommandOption,
]
ApplicationCommandOptionChoice = Union[
_StringApplicationCommandOptionChoice,
_IntegerApplicationCommandOptionChoice,
_NumberApplicationCommandOptionChoice,
]
class _BaseApplicationCommand(TypedDict):
id: Snowflake
application_id: Snowflake
name: str
version: Snowflake
class _ChatInputApplicationCommandOptional(_BaseApplicationCommand, total=False):
type: Literal[1]
options: Union[
List[_ValueApplicationCommandOption],
List[Union[_SubCommandCommandOption, _SubCommandGroupCommandOption]],
]
class _ChatInputApplicationCommand(_ChatInputApplicationCommandOptional):
description: str
class _BaseContextMenuApplicationCommand(_BaseApplicationCommand):
description: Literal[""]
class _UserApplicationCommand(_BaseContextMenuApplicationCommand):
type: Literal[2]
class _MessageApplicationCommand(_BaseContextMenuApplicationCommand):
type: Literal[3]
GlobalApplicationCommand = Union[
_ChatInputApplicationCommand,
_UserApplicationCommand,
_MessageApplicationCommand,
]
class _GuildChatInputApplicationCommand(_ChatInputApplicationCommand):
guild_id: Snowflake
class _GuildUserApplicationCommand(_UserApplicationCommand):
guild_id: Snowflake
class _GuildMessageApplicationCommand(_MessageApplicationCommand):
guild_id: Snowflake
GuildApplicationCommand = Union[
_GuildChatInputApplicationCommand,
_GuildUserApplicationCommand,
_GuildMessageApplicationCommand,
]
ApplicationCommand = Union[
GlobalApplicationCommand,
GuildApplicationCommand,
]
ApplicationCommandPermissionType = Literal[1, 2]
class ApplicationCommandPermissions(TypedDict):
id: Snowflake
type: ApplicationCommandPermissionType
permission: bool
class GuildApplicationCommandPermissions(TypedDict):
id: Snowflake
application_id: Snowflake
guild_id: Snowflake
permissions: List[ApplicationCommandPermissions]

239
discord/types/interactions.py

@ -24,195 +24,206 @@ DEALINGS IN THE SOFTWARE.
from __future__ import annotations from __future__ import annotations
from typing import Optional, TYPE_CHECKING, Dict, TypedDict, Union, List, Literal from typing import TYPE_CHECKING, Dict, List, Literal, TypedDict, Union
from .snowflake import Snowflake
from .components import Component, ComponentType from .channel import ChannelType, ThreadMetadata
from .embed import Embed
from .channel import ChannelType
from .member import Member from .member import Member
from .message import Attachment
from .role import Role from .role import Role
from .snowflake import Snowflake
from .user import User from .user import User
if TYPE_CHECKING: if TYPE_CHECKING:
from .message import AllowedMentions, Message from .message import Message
ApplicationCommandType = Literal[1, 2, 3] InteractionType = Literal[1, 2, 3, 4, 5]
class _ApplicationCommandOptional(TypedDict, total=False):
options: List[ApplicationCommandOption]
type: ApplicationCommandType
class PartialChannel(TypedDict):
class ApplicationCommand(_ApplicationCommandOptional):
id: Snowflake id: Snowflake
application_id: Snowflake
name: str name: str
description: str type: ChannelType
permissions: str
class _ApplicationCommandOptionOptional(TypedDict, total=False): class PartialThread(PartialChannel):
choices: List[ApplicationCommandOptionChoice] thread_metadata: ThreadMetadata
options: List[ApplicationCommandOption] parent_id: Snowflake
ApplicationCommandOptionType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] class ResolvedData(TypedDict, total=False):
users: Dict[Snowflake, User]
members: Dict[Snowflake, Member]
roles: Dict[Snowflake, Role]
channels: Dict[Snowflake, Union[PartialChannel, PartialThread]]
messages: Dict[Snowflake, Message]
attachments: Dict[Snowflake, Attachment]
class ApplicationCommandOption(_ApplicationCommandOptionOptional): class _BaseApplicationCommandInteractionDataOption(TypedDict):
type: ApplicationCommandOptionType
name: str name: str
description: str
required: bool
class ApplicationCommandOptionChoice(TypedDict): class _CommandGroupApplicationCommandInteractionDataOption(_BaseApplicationCommandInteractionDataOption):
name: str type: Literal[1, 2]
value: Union[str, int] options: List[ApplicationCommandInteractionDataOption]
ApplicationCommandPermissionType = Literal[1, 2] class _BaseValueApplicationCommandInteractionDataOption(_BaseApplicationCommandInteractionDataOption, total=False):
focused: bool
class ApplicationCommandPermissions(TypedDict): class _StringValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):
id: Snowflake type: Literal[3]
type: ApplicationCommandPermissionType value: str
permission: bool
class BaseGuildApplicationCommandPermissions(TypedDict): class _IntegerValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):
permissions: List[ApplicationCommandPermissions] type: Literal[4]
value: int
class PartialGuildApplicationCommandPermissions(BaseGuildApplicationCommandPermissions): class _BooleanValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):
id: Snowflake type: Literal[5]
value: bool
class GuildApplicationCommandPermissions(PartialGuildApplicationCommandPermissions): class _SnowflakeValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):
application_id: Snowflake type: Literal[6, 7, 8, 9, 11]
guild_id: Snowflake value: Snowflake
class _NumberValueApplicationCommandInteractionDataOption(_BaseValueApplicationCommandInteractionDataOption):
type: Literal[10]
value: float
InteractionType = Literal[1, 2, 3] _ValueApplicationCommandInteractionDataOption = Union[
_StringValueApplicationCommandInteractionDataOption,
_IntegerValueApplicationCommandInteractionDataOption,
_BooleanValueApplicationCommandInteractionDataOption,
_SnowflakeValueApplicationCommandInteractionDataOption,
_NumberValueApplicationCommandInteractionDataOption,
]
ApplicationCommandInteractionDataOption = Union[
_CommandGroupApplicationCommandInteractionDataOption,
_ValueApplicationCommandInteractionDataOption,
]
class _ApplicationCommandInteractionDataOption(TypedDict): class _BaseApplicationCommandInteractionDataOptional(TypedDict):
resolved: ResolvedData
class _BaseApplicationCommandInteractionData(_BaseApplicationCommandInteractionDataOptional):
id: Snowflake
name: str name: str
class _ApplicationCommandInteractionDataOptionSubcommand(_ApplicationCommandInteractionDataOption): class ChatInputApplicationCommandInteractionData(_BaseApplicationCommandInteractionData, total=False):
type: Literal[1, 2] type: Literal[1]
options: List[ApplicationCommandInteractionDataOption] options: List[ApplicationCommandInteractionDataOption]
class _ApplicationCommandInteractionDataOptionString(_ApplicationCommandInteractionDataOption): class _BaseNonChatInputApplicationCommandInteractionData(_BaseApplicationCommandInteractionData):
type: Literal[3] target_id: Snowflake
value: str
class _ApplicationCommandInteractionDataOptionInteger(_ApplicationCommandInteractionDataOption): class UserApplicationCommandInteractionData(_BaseNonChatInputApplicationCommandInteractionData):
type: Literal[4] type: Literal[2]
value: int
class _ApplicationCommandInteractionDataOptionBoolean(_ApplicationCommandInteractionDataOption): class MessageApplicationCommandInteractionData(_BaseNonChatInputApplicationCommandInteractionData):
type: Literal[5] type: Literal[3]
value: bool
class _ApplicationCommandInteractionDataOptionSnowflake(_ApplicationCommandInteractionDataOption): ApplicationCommandInteractionData = Union[
type: Literal[6, 7, 8, 9] ChatInputApplicationCommandInteractionData,
value: Snowflake UserApplicationCommandInteractionData,
MessageApplicationCommandInteractionData,
]
class _ApplicationCommandInteractionDataOptionNumber(_ApplicationCommandInteractionDataOption): class _BaseMessageComponentInteractionData(TypedDict):
type: Literal[10] custom_id: str
value: float
ApplicationCommandInteractionDataOption = Union[ class ButtonMessageComponentInteractionData(_BaseMessageComponentInteractionData):
_ApplicationCommandInteractionDataOptionString, type: Literal[2]
_ApplicationCommandInteractionDataOptionInteger,
_ApplicationCommandInteractionDataOptionSubcommand,
_ApplicationCommandInteractionDataOptionBoolean,
_ApplicationCommandInteractionDataOptionSnowflake,
_ApplicationCommandInteractionDataOptionNumber,
]
class ApplicationCommandResolvedPartialChannel(TypedDict): class SelectMessageComponentInteractionData(_BaseMessageComponentInteractionData):
id: Snowflake component_type: Literal[3]
type: ChannelType values: List[str]
permissions: str
name: str
class ApplicationCommandInteractionDataResolved(TypedDict, total=False): MessageComponentInteractionData = Union[ButtonMessageComponentInteractionData, SelectMessageComponentInteractionData]
users: Dict[Snowflake, User]
members: Dict[Snowflake, Member]
roles: Dict[Snowflake, Role]
channels: Dict[Snowflake, ApplicationCommandResolvedPartialChannel]
class _ApplicationCommandInteractionDataOptional(TypedDict, total=False): class ModalSubmitInputTextInteractionData(TypedDict):
options: List[ApplicationCommandInteractionDataOption] type: Literal[4]
resolved: ApplicationCommandInteractionDataResolved custom_id: str
target_id: Snowflake value: str
type: ApplicationCommandType
class ApplicationCommandInteractionData(_ApplicationCommandInteractionDataOptional): ModalSubmitComponentItemInteractionData = ModalSubmitInputTextInteractionData
id: Snowflake
name: str
class _ComponentInteractionDataOptional(TypedDict, total=False): class ModalSubmitActionRowInteractionData(TypedDict):
values: List[str] type: Literal[1]
components: List[ModalSubmitComponentItemInteractionData]
ModalSubmitComponentInteractionData = Union[ModalSubmitActionRowInteractionData, ModalSubmitComponentItemInteractionData]
class ComponentInteractionData(_ComponentInteractionDataOptional): class ModalSubmitInteractionData(TypedDict):
custom_id: str custom_id: str
component_type: ComponentType components: List[ModalSubmitActionRowInteractionData]
InteractionData = Union[ApplicationCommandInteractionData, ComponentInteractionData] InteractionData = Union[
ApplicationCommandInteractionData,
MessageComponentInteractionData,
ModalSubmitInteractionData,
]
class _InteractionOptional(TypedDict, total=False): class _BaseInteractionOptional(TypedDict, total=False):
data: InteractionData
guild_id: Snowflake guild_id: Snowflake
channel_id: Snowflake channel_id: Snowflake
member: Member
user: User
message: Message
class Interaction(_InteractionOptional): class _BaseInteraction(_BaseInteractionOptional):
id: Snowflake id: Snowflake
application_id: Snowflake application_id: Snowflake
type: InteractionType
token: str token: str
version: int version: Literal[1]
class InteractionApplicationCommandCallbackData(TypedDict, total=False): class PingInteraction(_BaseInteraction):
tts: bool type: Literal[1]
content: str
embeds: List[Embed]
allowed_mentions: AllowedMentions
flags: int
components: List[Component]
InteractionResponseType = Literal[1, 4, 5, 6, 7] class ApplicationCommandInteraction(_BaseInteraction):
type: Literal[2, 4]
data: ApplicationCommandInteractionData
class _InteractionResponseOptional(TypedDict, total=False): class MessageComponentInteraction(_BaseInteraction):
data: InteractionApplicationCommandCallbackData type: Literal[3]
data: MessageComponentInteractionData
class InteractionResponse(_InteractionResponseOptional): class ModalSubmitInteraction(_BaseInteraction):
type: InteractionResponseType type: Literal[5]
data: ModalSubmitInteractionData
Interaction = Union[PingInteraction, ApplicationCommandInteraction, MessageComponentInteraction, ModalSubmitInteraction]
class MessageInteraction(TypedDict): class MessageInteraction(TypedDict):
@ -220,17 +231,3 @@ class MessageInteraction(TypedDict):
type: InteractionType type: InteractionType
name: str name: str
user: User user: User
class _EditApplicationCommandOptional(TypedDict, total=False):
description: str
options: Optional[List[ApplicationCommandOption]]
type: ApplicationCommandType
class EditApplicationCommand(_EditApplicationCommandOptional):
name: str
default_permission: bool

Loading…
Cancel
Save