Discord-S.C.U.M
Discord-S.C.U.M copied to clipboard
'guilds' missing in Session.settings_ready
Exception ignored in thread started by: <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x00000236281D12A0>>
Traceback (most recent call last):
File "C:\Users\vilko\AppData\Roaming\Python\Python39\site-packages\discum\gateway\gateway.py", line 303, in _response_loop
function(resp, **params)
File "C:\Users\vilko\AppData\Roaming\Python\Python39\site-packages\discum\gateway\guild\combo.py", line 70, in fetchMembers
if not self.gatewayobj.session.guild(guild_id).hasMembers and reset:
File "C:\Users\vilko\AppData\Roaming\Python\Python39\site-packages\discum\gateway\session.py", line 233, in hasMembers
if self.guildID not in Session.settings_ready['guilds']:
KeyError: 'guilds'
I keep getting this error when trying to fetch server members, and yes my account is in the guild which members I'm trying to fetch.
import discum
bot = discum.Client(token='token', log=True)
def close_after_fetching(resp, guild_id):
if bot.gateway.finishedMemberFetching(guild_id):
lenmembersfetched = len(bot.gateway.session.guild(guild_id).members) # this line is optional
print(str(lenmembersfetched) + ' members fetched') # this line is optional
bot.gateway.removeCommand({'function': close_after_fetching, 'params': {'guild_id': guild_id}})
bot.gateway.close()
def get_members(guild_id, channel_id):
bot.gateway.fetchMembers(guild_id, channel_id, keep="all",
wait=1) # get all user attributes, wait 1 second between requests
bot.gateway.command({'function': close_after_fetching, 'params': {'guild_id': guild_id}})
bot.gateway.run()
bot.gateway.resetSession() # saves 10 seconds when gateway is run again
return bot.gateway.session.guild(guild_id).members
members = get_members('267624335836053506', '267631170882240512') # yes, the channel_id input is required
This is my code
Hello, if you find solution please tell Im also stuck here
i have the same issue anyone knows a solution?
same issue
i have the same issue. the code worked fine before but now it can't run
bump
bump
did anyone find a fix
bump
did anyone find a fix
#428
same....
error?
bump
KeyError: 'guilds'
Solution is mentioned in #428