CommandSync
Classe
Synchronisation fine : lecture, création, mise à jour et suppression ciblées des commandes.
from discord_interactions.slash import CommandSyncConstructeur
CommandSync(client: discord.Client)| Nom | Type | Défaut | Description |
|---|---|---|---|
client | discord.Client | requis |
Propriétés
| Nom | Type | Description |
|---|---|---|
application_id | int |
Méthodes
get_global_commands
async def get_global_commands() -> List[Dict[str, Any]]get_guild_commands
async def get_guild_commands(guild_id: int) -> List[Dict[str, Any]]bulk_overwrite_global
async def bulk_overwrite_global(commands: List[Dict[str, Any]]) -> List[Dict[str, Any]]bulk_overwrite_guild
async def bulk_overwrite_guild( guild_id: int, commands: List[Dict[str, Any]],) -> List[Dict[str, Any]]create_global_command
async def create_global_command(command: Dict[str, Any]) -> Dict[str, Any]update_global_command
async def update_global_command( command_id: int, command: Dict[str, Any],) -> Dict[str, Any]delete_global_command
async def delete_global_command(command_id: int) -> Nonecreate_guild_command
async def create_guild_command(guild_id: int, command: Dict[str, Any]) -> Dict[str, Any]update_guild_command
async def update_guild_command( guild_id: int, command_id: int, command: Dict[str, Any],) -> Dict[str, Any]delete_guild_command
async def delete_guild_command(guild_id: int, command_id: int) -> Nonesync_global
async def sync_global( commands: List[Dict[str, Any]], mode: SyncMode = SyncMode.FULL,) -> SyncResultsync_guild
async def sync_guild( guild_id: int, commands: List[Dict[str, Any]], mode: SyncMode = SyncMode.FULL,) -> SyncResultsync_tree
async def sync_tree( manager: SlashCommandManager, guilds: List[int] | None = None, mode: SyncMode = SyncMode.FULL,) -> Dict[int | None, SyncResult]