Skip to content

Commit

Permalink
Fix Guild.get_command
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftinv committed Feb 7, 2022
1 parent 305c7cd commit e89de2b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions disnake/guild.py
Expand Up @@ -433,15 +433,19 @@ def _remove_role(self, role_id: int, /) -> Role:
return role

def get_command(self, application_command_id: int, /) -> Optional[APIApplicationCommand]:
"""
Gets a cached application command matching the specified ID.
"""Gets a cached application command matching the specified ID.
Parameters
----------
name: :class:`int`
the ID to compare to.
application_command_id: :class:`int`
The application command ID to search for.
Returns
-------
Optional[Union[:class:`.APIUserCommand`, :class:`.APIMessageCommand`, :class:`.APISlashCommand`]]
The application command if found, or ``None`` otherwise.
"""
self._state._get_guild_application_command(self.id, application_command_id)
return self._state._get_guild_application_command(self.id, application_command_id)

def get_command_named(self, name: str, /) -> Optional[APIApplicationCommand]:
"""
Expand Down

0 comments on commit e89de2b

Please sign in to comment.