Closed pptx704 closed 2 years ago
This is a tricky issue, since there isn't really a way to choose the correct channel programmatically 100% of the time. That's why I was picking the first channel @everyone can view. I'll look into exposing a channel param in v1.10.
Eventually, the subscribe()
method may be moved to channel objects along with a member_sidebar
attribute.
@pptx704 How can I override the function like you did?
@arfathyahiya download git repo and edit guild.py
inside discord folder. Then you can do relative imports to use the modified package
Ah I thought we could override the function
@arfathyahiya yeah you can. Go to /lib/packages
inside your virtualenv. Find discord.py-self
's package and edit guild.py
there. You can do the same in the global python package folder inside the OS drive. But this is never recommended and is malpractice.
The Telegram in #221 has new information on guild members. A channels
attribute is also coming.
The latest commit provides the ability to pass channels to fetch_members
and chunk
.
Summary
So I read docs and know that
guild.subscribe()
is not complete. So I modified it a bit. Still not working on channels with default role being@everyone
Reproduction Steps
So that day I tried to
subscribe
a channel but got only around 150 users while the side panel showed that there are 2k members online. I changed the channel and that got all 2k parsed then. Then I thought it was a weird bug and didn't bother about that much.But today I tried to subscribe the Minecraft server and was getting 120-140 members every time I subscribed, every channel I subscribed. So it came to my mind that the problem is with the type of channels. So I tried the same thing on multiple servers. Turns out that
guild.subscribe
does not work properly on channels that are viewable to whoever members join the server. But if I try on channels that get unlocked after certain actions (clicking on emojis, solve captchas sent via DM etc), the method works properlyCode
So this is my modified
guild.subscribe
method. Just let myself use channel id exclusively.Code inside python script that scrapes users and saves those on my online server:
Expected Results
Each of the channels I tried, got at least 1k members online. So there should be at least 1k members per
subscribe
in the logs.Actual Results
Checking the logs, I found out that
System Information
Checklist
Additional Information
No response