Skip to content

Commit

Permalink
Go!
Browse files Browse the repository at this point in the history
  • Loading branch information
elenakrittik committed Jan 14, 2024
1 parent a5c1a8f commit 52e302b
Showing 1 changed file with 91 additions and 1 deletion.
92 changes: 91 additions & 1 deletion disnake/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
from typing_extensions import NotRequired

from .abc import GuildChannel, PrivateChannel, Snowflake, SnowflakeTime
from .app_commands import APIApplicationCommand
from .app_commands import APIApplicationCommand, MessageCommand, SlashCommand, UserCommand
from .asset import AssetBytes
from .channel import DMChannel
from .member import Member
Expand Down Expand Up @@ -2660,6 +2660,24 @@ async def fetch_global_command(self, command_id: int) -> APIApplicationCommand:
"""
return await self._connection.fetch_global_command(command_id)

@overload
async def create_global_command(self, application_command: SlashCommand) -> APISlashCommand:
...

@overload
async def create_global_command(self, application_command: UserCommand) -> APIUserCommand:
...

@overload
async def create_global_command(self, application_command: MessageCommand) -> APIMessageCommand:
...

@overload
async def create_global_command(
self, application_command: ApplicationCommand
) -> APIApplicationCommand:
...

async def create_global_command(
self, application_command: ApplicationCommand
) -> APIApplicationCommand:
Expand All @@ -2682,6 +2700,30 @@ async def create_global_command(
application_command.localize(self.i18n)
return await self._connection.create_global_command(application_command)

@overload
async def edit_global_command(
self, command_id: int, new_command: SlashCommand
) -> APISlashCommand:
...

@overload
async def edit_global_command(
self, command_id: int, new_command: UserCommand
) -> APIUserCommand:
...

@overload
async def edit_global_command(
self, command_id: int, new_command: MessageCommand
) -> APIMessageCommand:
...

@overload
async def edit_global_command(
self, command_id: int, new_command: ApplicationCommand
) -> APIApplicationCommand:
...

async def edit_global_command(
self, command_id: int, new_command: ApplicationCommand
) -> APIApplicationCommand:
Expand Down Expand Up @@ -2796,6 +2838,30 @@ async def fetch_guild_command(self, guild_id: int, command_id: int) -> APIApplic
"""
return await self._connection.fetch_guild_command(guild_id, command_id)

@overload
async def create_guild_command(
self, guild_id: int, application_command: SlashCommand
) -> APISlashCommand:
...

@overload
async def create_guild_command(
self, guild_id: int, application_command: UserCommand
) -> APIUserCommand:
...

@overload
async def create_guild_command(
self, guild_id: int, application_command: MessageCommand
) -> APIMessageCommand:
...

@overload
async def create_guild_command(
self, guild_id: int, application_command: ApplicationCommand
) -> APIApplicationCommand:
...

async def create_guild_command(
self, guild_id: int, application_command: ApplicationCommand
) -> APIApplicationCommand:
Expand All @@ -2820,6 +2886,30 @@ async def create_guild_command(
application_command.localize(self.i18n)
return await self._connection.create_guild_command(guild_id, application_command)

@overload
async def edit_guild_command(
self, guild_id: int, command_id: int, new_command: SlashCommand
) -> APISlashCommand:
...

@overload
async def edit_guild_command(
self, guild_id: int, command_id: int, new_command: UserCommand
) -> APIUserCommand:
...

@overload
async def edit_guild_command(
self, guild_id: int, command_id: int, new_command: MessageCommand
) -> APIMessageCommand:
...

@overload
async def edit_guild_command(
self, guild_id: int, command_id: int, new_command: ApplicationCommand
) -> APIApplicationCommand:
...

async def edit_guild_command(
self, guild_id: int, command_id: int, new_command: ApplicationCommand
) -> APIApplicationCommand:
Expand Down

0 comments on commit 52e302b

Please sign in to comment.