File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 26
26
27
27
from typing import Callable , Optional
28
28
29
- import traceback
30
- import sys
31
-
32
29
from .client import Client
33
30
from .shard import AutoShardedClient
34
31
from .utils import get
@@ -192,8 +189,6 @@ async def register_commands(self) -> None:
192
189
to_update = update_guild_commands [guild_id ]
193
190
update_guild_commands [guild_id ] = to_update + [as_dict ]
194
191
195
- raised_error = None
196
- raised_guilds = []
197
192
for guild_id in update_guild_commands :
198
193
try :
199
194
cmds = await self .http .bulk_upsert_guild_commands (self .user .id , guild_id ,
@@ -202,11 +197,10 @@ async def register_commands(self) -> None:
202
197
cmd = get (self .to_register , name = i ["name" ], description = i ["description" ], type = i ['type' ])
203
198
self .app_commands [i ["id" ]] = cmd
204
199
except Forbidden :
205
- raised_error = raised_error or traceback .format_exc ()
206
- raised_guilds .append (guild_id )
207
- if raised_error :
208
- print (f'Ignoring exception running bulk_upsert_guild_commands on guilds { raised_guilds } ' , file = sys .stderr )
209
- print (raised_error , file = sys .stderr )
200
+ if update_guild_commands [guild_id ]:
201
+ continue
202
+ else :
203
+ raise
210
204
211
205
cmds = await self .http .bulk_upsert_global_commands (self .user .id , commands )
212
206
You can’t perform that action at this time.
0 commit comments