This guide will help you set up the GitCord Discord bot on your server.
- Python 3.8 or higher installed on your system
- A Discord bot token (see Creating a Discord Bot below)
pip install -r requirements.txtYou have two options:
python setup.pyThis will guide you through creating the .env file with your bot token.
Create a .env file in the project root with:
DISCORD_TOKEN=your_discord_bot_token_here
python bot.pyIf everything is set up correctly, you should see:
Starting GitCord bot...
[Bot Name] has connected to Discord!
Bot is in X guild(s)
If you don't have a Discord bot yet, follow these steps:
- Go to Discord Developer Portal
- Click "New Application" and give it a name
- Go to the "Bot" section in the left sidebar
- Click "Add Bot"
- Under the "Token" section, click "Copy" to copy your bot token
- Save this token securely - you'll need it for the
.envfile
Make sure your bot has these permissions:
- Send Messages
- Read Message History
- Use Slash Commands (if you plan to use them later)
Once the bot is running, you can use these commands in your Discord server:
!hello- Get a friendly greeting from the bot!ping- Check the bot's latency
- Make sure you have a
.envfile in the project root - Check that the file contains
DISCORD_TOKEN=your_token_here - Ensure there are no extra spaces or quotes around the token
- Double-check your bot token from the Discord Developer Portal
- Make sure you copied the entire token correctly
- Verify the bot is still active in the Developer Portal
- Ensure the bot has been invited to your server with proper permissions
- Check that the bot is online (green status)
- Verify you're using the correct command prefix (
!)
This is a basic hello world bot. For the full GitCord functionality (GitHub integration, server configuration management), check the main README.md for development status and roadmap.
- Never share your bot token publicly
- The
.envfile is already in.gitignoreto prevent accidental commits - If your token is ever compromised, regenerate it in the Discord Developer Portal