A command-line tool to bulk create private Discord channels under a specified category from a CSV file.
- Creates multiple private text channels from a CSV list
- Updates existing channels by adding new users when specified in CSV
- Organizes channels under a specified category
- Provides clear setup instructions for Discord Developer Portal
- Handles existing channels intelligently (updates permissions instead of skipping)
- Sets channels as private (hidden from @everyone role)
- Python 3.8 or higher
- A Discord account with server management permissions
- Clone this repository:
git clone https://github.com/tinkertanker/discord-personal-folder-creator.git
cd discord-personal-folder-creator- Set up Python virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Copy the example config file:
cp config.example.json config.json- Edit
config.jsonwith your Discord bot details:
{
"bot_token": "YOUR_BOT_TOKEN_HERE",
"guild_id": 123456789012345678,
"category_name": "Private Channels",
"csv_file": "input/sample.csv"
}-
Follow the on-screen instructions when you first run the script to:
- Create a Discord application and bot
- Get your bot token
- Add the bot to your server
- Configure necessary permissions
-
Run the script:
python discord_channel_creator.pyThe script automatically detects your CSV format:
Create a CSV file with channel names, one per line:
channel-name-1
channel-name-2
channel-name-3Include user identifiers to automatically invite specific users:
channel-name-1,user_id1,username2
channel-name-2,123456789012345678,exampleuser
channel-name-3,johndoe,janedoeUser identifiers can be:
- Discord User ID (recommended):
123456789012345678 - Username:
exampleuserorjohndoe - Legacy format:
username#1234
See input/sample.csv for an example. Update your config.json to point to your CSV file:
"csv_file": "input/your-channels.csv"- The bot connects to your Discord server
- Creates or finds the specified category
- Reads channel names and optional user lists from the CSV file
- For each channel:
- If it doesn't exist: Creates a private text channel with restricted permissions
- If it exists and has users specified: Adds those users to the existing channel
- If it exists with no users specified: Skips it
- Reports the number of channels created, updated, and skipped
The bot requires:
- Manage Channels
- Manage Roles
- Read Messages/View Channels
Created channels are private by default (only visible to administrators and the bot). When using the advanced CSV format with user invites, only the specified users will have access to each channel.
To export a list of server members to CSV:
python export_members.pyThis will:
- Connect to your Discord server
- Export all members (excluding bots by default) to a timestamped CSV file
- Save the file to the
output/directory - Include user IDs, usernames, display names, nicknames, join dates, roles, and status
- Place your channel list CSV files in the
input/directory - Example:
input/sample.csv - Update
config.jsonto point to your CSV file
- All generated files are saved to the
output/directory - Member export CSV files:
output/discord_members_YYYYMMDD_HHMMSS.csv - The
output/directory is gitignored to prevent accidental commits of user data
- Channel names are automatically formatted (spaces become hyphens, lowercase)
- The bot disconnects automatically after creating all channels
- A small delay is added between channel creations to avoid rate limits
- Exported member data is saved with UTF-8 encoding to handle special characters