File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -200,16 +200,12 @@ async def register_commands(self) -> None:
200
200
for i in cmds :
201
201
cmd = get (self .to_register , name = i ["name" ], description = i ["description" ], type = i ['type' ])
202
202
self .app_commands [i ["id" ]] = cmd
203
- except Forbidden as e :
204
- raised_error = e
203
+ except Forbidden :
204
+ raised_error = raised_error or traceback . format_exc ()
205
205
raised_guilds .append (guild_id )
206
206
if raised_error :
207
- try : # TODO: this is awful
208
- raise raised_error
209
- except Forbidden :
210
- print (f'Ignoring exception running bulk_upsert_guild_commands on guilds { raised_guilds } ' ,
211
- file = sys .stderr )
212
- traceback .print_exc ()
207
+ print (f'Ignoring exception running bulk_upsert_guild_commands on guilds { raised_guilds } ' , file = sys .stderr )
208
+ print (raised_error , file = sys .stderr )
213
209
214
210
cmds = await self .http .bulk_upsert_global_commands (self .user .id , commands )
215
211
You can’t perform that action at this time.
0 commit comments