Discord-Scraper
Discord-Scraper copied to clipboard
[Suggestion] Scrape user IDs
Suggesting ability to scrape user ID's from a server.
Thank you.
So you're wanting to catalogue the total number of users on a server?
I'd have to look into that before I can consider it a viable addition, but it's not likely to end up in the final script. Instead that'll have to be relegated to its own script for administrative and activity monitoring which can come in handy for particularly large guilds.
So you're wanting to catalogue the total number of users on a server?
I'd have to look into that before I can consider it a viable addition, but it's not likely to end up in the final script. Instead that'll have to be relegated to its own script for administrative and activity monitoring which can come in handy for particularly large guilds.
More specifically, the User Id.
There are some discord communities that deal with stolen/cracked things.
I just wanted an easy way of gathering all the user IDs from those communities and banning them.
Then you can use something like CarlBot, paste all the user Ids and mass ban them.
More specifically, the User Id.
There are some discord communities that deal with stolen/cracked things.
I just wanted an easy way of gathering all the user IDs from those communities and banning them.
Then you can use something like CarlBot, paste all the user Ids and mass ban them.
Ah, so you just want to have a bunch of IDs to block. I'd have to look into it since that could be made into a script for preemptive moderation.
Hey, just wanted to suggest a solution to this that I coded:
discum is an api wrapper with a fetchMembers function (only requires that the client can see that side-bar member list): https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/docs/using/fetchingGuildMembers.md
It uses threading instead of async for all its communications (which is good/bad depending on how you look at it)...I noticed Discord-Scraper doesn't use async so maybe it'll be easier to use a non-async api wrapper idk your choice @Dracovian
anyways, idk how long this github acc will last so if you wanna chat about it email me at [email protected] or contact me on reddit @ obviouslymymain123
I will say that if this does go into a separate project then that project will most likely end up being Hammerhead
I don't plan on adding any threading or asyncio stuff to this codebase since the codebase is built around the notion that you can just run this script from a fresh installation of Python (using native modules as opposed to 3rd party modules that would have to be gathered from PyPI or any other repo)
Even though threading is native I can assure you that asyncio isn't (especially when we're looking at Python 2.7 compatibility)
Plus Hammerhead is going to come with a friendlier method of configuring (that I might just end up implementing into this codebase to be perfectly honest since I have already delved into serving HTTP contents through Python with sockets)
It's been a 3 year long journey at this point and we're only 2/3rds of a year away from hitting the 4 year mark. You can certainly poke around at the older code to see that I have made attempts at threading, using 3rd party modules, etc...
At this point I just have to keep myself from straying too far from the initial goal of the project (to archive whole communities through Discord similarly to how we have so many archives of IRC discussions nowadays)
I just now remembered that Discord does offer us a method of obtaining the total members in a guild:
I don't know why I didn't recall it during this conversation, but I went to bed recalling that the API does give us this option that makes this whole process a breeze.
idk why I don't get notifications from here... anyways, I've come to somewhat take your hope away...sry...although I still recommend you try those things out since you'll learn a bit more about discord's gateway. (1): the 1st screenshot you showed has the fields of the GUILD_CREATE event. Technically these members are also sent in READY and READY_SUPPLEMENTAL events ("merged members"), but since only a few members are sent, this data is essentially useless (even in small guilds, like say, 10 members, you might only get 1 or 2 members using this method). The actually useful data that you can get from this is your current role/"position" in that guild. (2): the 2nd screenshot you showed is the guild member object structure. These are seen prominently in GUILD_MEMBER_LIST_UPDATE and GUILD_MEMBERS_CHUNK events (they're also in GUILD_CREATE events...but...you don't get a significant chunk of the member list from that).
Ultimately, there are 2 main (efficient) ways that the guild members can be obtained: either exploit that member list that you see on the right of a guild (op 14 gateway) or exploit the search feature of guilds (op 8 gateway). Personally, I'd recommend op 14 since it's (1) more natural and (2) more predictable but either way you could probably make it work.
btw: discord checks for gateway params, so just remember to connect to
wss://gateway.discord.gg/?encoding=json&v=8&compress=zlib-stream
instead of
wss://gateway.discord.gg/?encoding=json&v=8
if you don't want your account to get disabled.
can somone help me to run it ?