Skip to content

Commit fac922c

Browse files
DorukyumBobDotCom
andauthored
Update discord/bot.py
Co-authored-by: BobDotCom <[email protected]>
1 parent a6ae2bd commit fac922c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

discord/bot.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,18 @@ def remove_application_command(
142142
"""
143143
return self._application_commands.pop(command.id)
144144

145-
def get_command(
145+
@property
146+
def get_command(self):
147+
"""Shortcut for :meth:`.get_application_command`.
148+
149+
.. note::
150+
Overridden in :class:`ext.commands.Bot`.
151+
152+
.. versionadded:: 2.0
153+
"""
154+
# TODO: Do something like we did in self.commands for this
155+
return self.get_application_command
156+
def get_application_command(
146157
self,
147158
name: str,
148159
guild_ids: Optional[List[int]] = None,

0 commit comments

Comments
 (0)