mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-02 00:00:02 +00:00
Fix unreachable code not triggering privileged intent error
This commit is contained in:
parent
7f16a06479
commit
3e48119654
@ -517,10 +517,10 @@ class AutoShardedClient(Client):
|
|||||||
if item.type == EventType.close:
|
if item.type == EventType.close:
|
||||||
await self.close()
|
await self.close()
|
||||||
if isinstance(item.error, ConnectionClosed):
|
if isinstance(item.error, ConnectionClosed):
|
||||||
if item.error.code != 1000:
|
|
||||||
raise item.error
|
|
||||||
if item.error.code == 4014:
|
if item.error.code == 4014:
|
||||||
raise PrivilegedIntentsRequired(item.shard.id) from None
|
raise PrivilegedIntentsRequired(item.shard.id) from None
|
||||||
|
if item.error.code != 1000:
|
||||||
|
raise item.error
|
||||||
return
|
return
|
||||||
elif item.type in (EventType.identify, EventType.resume):
|
elif item.type in (EventType.identify, EventType.resume):
|
||||||
await item.shard.reidentify(item.error)
|
await item.shard.reidentify(item.error)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user