File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1+ import typing
12import asyncio
23import aiohttp
34from ..error import RequestFailure
@@ -95,18 +96,18 @@ async def get_all_commands(bot_id,
9596
9697async def remove_all_commands (bot_id ,
9798 bot_token ,
98- guild_ids ):
99+ guild_ids : typing . List [ int ] = None ):
99100 """
100101 Remove all slash commands.
101102
102103 :param bot_id: User ID of the bot.
103104 :param bot_token: Token of the bot.
104- :param guild_ids: List ID of the guild to remove commands.
105+ :param guild_ids: List of the guild ID to remove commands. Pass ``None`` to remove only the global commands.
105106 """
106107
107108 await remove_all_commands_in (bot_id , bot_token , None )
108109
109- for x in guild_ids :
110+ for x in guild_ids if guild_ids else [] :
110111 try :
111112 await remove_all_commands_in (bot_id , bot_token , x )
112113 except RequestFailure :
You can’t perform that action at this time.
0 commit comments