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
1
2
import asyncio
2
3
import aiohttp
3
4
from ..error import RequestFailure
@@ -95,18 +96,18 @@ async def get_all_commands(bot_id,
95
96
96
97
async def remove_all_commands (bot_id ,
97
98
bot_token ,
98
- guild_ids ):
99
+ guild_ids : typing . List [ int ] = None ):
99
100
"""
100
101
Remove all slash commands.
101
102
102
103
:param bot_id: User ID of the bot.
103
104
: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.
105
106
"""
106
107
107
108
await remove_all_commands_in (bot_id , bot_token , None )
108
109
109
- for x in guild_ids :
110
+ for x in guild_ids if guild_ids else [] :
110
111
try :
111
112
await remove_all_commands_in (bot_id , bot_token , x )
112
113
except RequestFailure :
You can’t perform that action at this time.
0 commit comments