Skip to content

Commit 2ed9d9f

Browse files
committed
Removing useless line
1 parent d66d55c commit 2ed9d9f

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

discord_slash/client.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,20 @@ async def remove_all_commands_in(self, area):
190190

191191
self.logger.info("Removing commands...")
192192

193-
for x in self.commands.keys():
194-
195-
commands = await manage_commands.get_all_commands(
193+
commands = await manage_commands.get_all_commands(
194+
self._discord.user.id,
195+
self._discord.http.token,
196+
None if area == 'global' else area
197+
)
198+
199+
for command in commands:
200+
await manage_commands.remove_slash_command(
196201
self._discord.user.id,
197202
self._discord.http.token,
198-
None if area == 'global' else area
203+
None if area == 'global' else area,
204+
command['id']
199205
)
200206

201-
for command in commands:
202-
await manage_commands.remove_slash_command(
203-
self._discord.user.id,
204-
self._discord.http.token,
205-
None if area == 'global' else area,
206-
command['id']
207-
)
208-
209207
self.logger.info("Completed removing all commands !")
210208

211209
def add_slash_command(self,

0 commit comments

Comments
 (0)