A bot that can relay messages between channels on different Discord servers
git clone https://github.com/hurek/relay-bot.git
cd relay-bot
- Install requirements from
requirements.txt
forPython 3.8+
withpip3 install -r requirements.txt
- Go to Discord Developers portal and create new Application. Official instructions here.
- Go to Bot -> Privileged Gateway Intents section and enable members intents.
mv configEXAMPLE.py config.py
and copy your bot token from the dashboard here.cd /etc/systemd/system
sudo nano relay-bot.service
- Copy and paste following settings:
[Unit]
Description=Discord bot 'Relay Bot'
After=syslog.target
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/PATH_TO_BOT_DIRECTORY/relay-bot
ExecStart=/usr/bin/python3 /PATH_TO_BOT_DIRECTORY/relay-bot/bot.py
Restart=always
[Install]
WantedBy=multi-user.target
- Save file and run following commands to enable bot service:
sudo systemctl daemon-reload
sudo systemctl start relay-bot.service
sudo systemctl status relay-bot.service
- Go to Application dashboard -> OAuth2 and check the box for Bot.
- Set following permissions for Bot:
- Manage Webhooks
- View Channels
- Send Messages
- Embed Links
- Attach Files
- Read Message History
- Mention Everyone
- Use External Emojis
- Copy the bot invitation link to your browser, add bot to your server.
- Send
!relay.help
to see list of Bot commands.