File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments