Attempt to fix unavailable guilds again
This commit is contained in:
parent
83a5449fc5
commit
3d70966021
@ -333,7 +333,8 @@ class ConnectionState(object):
|
|||||||
self.dispatch('member_update', member)
|
self.dispatch('member_update', member)
|
||||||
|
|
||||||
def handle_guild_create(self, data):
|
def handle_guild_create(self, data):
|
||||||
if data.get('unavailable') is not None:
|
unavailable = data.get('unavailable', False)
|
||||||
|
if unavailable == False:
|
||||||
# GUILD_CREATE with unavailable in the response
|
# GUILD_CREATE with unavailable in the response
|
||||||
# usually means that the server has become available
|
# usually means that the server has become available
|
||||||
# and is therefore in the cache
|
# and is therefore in the cache
|
||||||
@ -343,6 +344,10 @@ class ConnectionState(object):
|
|||||||
self.dispatch('server_available', server)
|
self.dispatch('server_available', server)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if unavailable == True:
|
||||||
|
# joined a server with unavailable == True so..
|
||||||
|
return
|
||||||
|
|
||||||
# if we're at this point then it was probably
|
# if we're at this point then it was probably
|
||||||
# unavailable during the READY event and is now
|
# unavailable during the READY event and is now
|
||||||
# available, so it isn't in the cache...
|
# available, so it isn't in the cache...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user