Guild Members Fetcher is a Discord selfbot that fetches all the members from a specified guild and saves the data into a .csv file. The bot is built using Python and the discord.py-self library.
- Fetches all members from a specified guild.
- Save the fetched data into a .csv file (currently, only the member's ID, username, display name, joined date, account creation date, mutual guilds and servers — count and comma-separated list (
name (id)
) for both) - Interface with the bot in Discord using "commands."
- Clone the repository:
git clone https://github.com/your-repo/guild-members-fetcher.git
- Install the required dependencies (you can create a virtual environment first):
pip install -r requirements.txt
- Replace the
TOKEN
inconstants.py
with your Discord bot token.
Run the bot:
python main.py
Use the following commands in any Discord channel (strongly recommended to use private channels):
membersfetcher help
- Display the help message.mf run <guild_id> [<file_name>]
- Fetch members from guild and save them into a .csv file.mf shutdown
- Kills the bot instance.
You can customize the bot to better suit your needs by modifying the following parameters in the constants.py
file:
-
OUTPUT_PATH
: This is the directory where the .csv files will be saved. By default, it's the relativeout
directory. -
MEMBER_SIDEBAR_SCRAPING_DELAY
: This is the delay (in seconds) between each page scraping of the member sidebar in Discord. Default value (0.1) should avoid you getting rate-limited. -
MEMBER_SCRAPING_DELAY
: This is the delay (in seconds) between each retrieval of a member's data. Default value (0.5) should avoid you getting rate-limited.
Pull requests are welcome. :)
For major changes, please open an issue first to discuss what you would like to change.
- The bot is built using the discord.py-self library.
- Thanks to Simonosss for the initial idea.
- MarvNC for the Discord bot token retrieval tutorial.