Fetching guild members with user account #339
Replies: 10 comments 12 replies
-
guild = bot.get_guild(id)
members = await guild.fetch_members()
for member in members:
print("{} is part of {}".format(member.name, member.guild.name)) |
Beta Was this translation helpful? Give feedback.
-
My question is I want to get online users name every 1 minute (more specifically discord.Member.status of particular user) . I need to have concise data on when some users have idle/online/dnd status and when they are offline. That's why I don't prefer cache or get. |
Beta Was this translation helpful? Give feedback.
-
Task exception was never retrieved future: <Task finished name='Task-9' coro=<BotClient.checker() done, defined at /root/Temp/Bots/Bot/lib/BotEngine.py:37> exception=AttributeError("'NoneType' object has no attribute 'guild_permissions'")> |
Beta Was this translation helpful? Give feedback.
-
Looks like I can't get members without mod permission, but in my server that account has good perms and less than 100 members. Still how to fetch a particular user discord.Status |
Beta Was this translation helpful? Give feedback.
-
I) The guild id > 30000 members. My server which has less than 100 is used for fetching only II) Can I use fetch_member(id) without getting caught? How much chance of getting caught is in fetch_member()? III) How can I be sure the member I am looking for is in cache(or ensure get_member(id) works) ? How to make sure cache is filled/what's the command for filling the cache? I think I will use combination of get_member() and on_presence_update to keep track of that person |
Beta Was this translation helpful? Give feedback.
-
Given that fetch_user() comes with this warning
I wonder what risk fetch_member() has Fetch_members() doesn't have risk. I used them a lot but doesn't work |
Beta Was this translation helpful? Give feedback.
-
I ran into issue. This code gives incorrect result
I can confirm this code doesn't work despite them being online. I tried using this code along with this code
I use combination of both code to determine if they are online or not but bot shows offline despite being dnd |
Beta Was this translation helpful? Give feedback.
-
I used this
But got no data related being online |
Beta Was this translation helpful? Give feedback.
-
Fuuuuuuckkk i spend whole day making it work but it doesn't work fuckkkk |
Beta Was this translation helpful? Give feedback.
-
For the sake of God use query_members everyone |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
I need to fetch guild members and I wonder to know if discord.py-self is able to do it.
I want to fetch every guild I'm on it and get the list of members.
If it's possible, do you have any example how to achieve it?
I have seen your lib can handle captcha :)
Yours sincerely,
Julien
Beta Was this translation helpful? Give feedback.
All reactions