A simple tool for exporting Telegram participants.
Currently, only the supergroups are supported.
-
Clone the repo.
-
Install dependencies.
bun install
-
Prepare the configuration parameters.
export TG_API_ID="12345678" # Telegram API ID export TG_API_HASH="00000000000000000000000000000000" # Telegram API Hash export TG_BOT_TOKEN="1234567890:Qwertyqwertyqwertyqwertyqwertyqwert" # The bot token from BotFather export TG_BOT_ADMIN_USER_ID="1234567890" # Your User ID export EXPORTS_DIR="exports" # Where to place the export files
Save the snippet above in a file called
.envand load them into your shell:source .envIf you are on Windows - use another way to set the environment variables.
-
Run the code.
bun run index.ts
- Add the bot to the group you want to export the members for.
- Send the
/exportcommand to the group chat you want to export the members from. - Grab the list of the exported users on the server.