Python3.5+ implementation of a synchronization between IRC and Discord
- Python 3.5+
- Discord Bot
- Go to Discord developer application
- Add a new application
- Create a Bot User
- Follow https://discordapp.com/oauth2/authorize?&client_id=CLIENT_ID&scope=bot&permissions=0 with your application Client ID
- Choose your server
git clone [email protected]:Hackndo/discord-irc-sync.git
cd discord-irc-sync
mkvirtualenv discordirc -p $(which python3)
pip install -r requirements.txt
Copy configuration template
cp config/config.json.dist config/config.json
Configuration file looks like this
{
"irc": {
"server": "irc.server.com", // IRC Server
"port": "6667", // IRC Port
"ssl": false, // Use SSL
"channel": "#channel", // IRC Channel
"nickname": "h_bot", // Bot Nickname
"owner": "username", // Bot Owner Nickname (admin commands)
"cmd_prefix": "!", // Channel commands prefix (if any)
"output_msg": "<:username:> :message:", // Message format when IRC message is received
"output_cmd": "CMD by :username:", // Message format when IRC command is received
"log_events": true // Send part/join/kick/quit to discord
},
"discord": {
"server": "<server id>", // Discord Server ID
"channel": "<channel id>", // Discord Channel ID
"token": "<bot token>", // Discord Bot Token
"owner": "username", // Discord Bot Owner username (admin commands)
"cmd_prefix": "!", // Channel commands prefix (if any)
"output_msg": "<:username:> :message:", // Message format when Discord message is received
"output_cmd": "CMD by :username:", // Message format when Discord command is received
"log_events": true // Send part/join/kick/quit to IRC
},
"formatting": {
"irc_to_discord": false, // Keep bold|underline|italic from IRC to Discord
"discord_to_irc": true // Keep bold|underline|italic from Discord to IRC
}
}
(discordirc) pixis@kali:~/Tools/discord-irc-sync $ python discord-irc-sync.py
[IRC] Logged in as:
[IRC] hacknbot
[Discord] Logged in as:
[Discord] irc-sync
[Discord] <pixis> : Can you hear me IRC Tom? 😃
[IRC] <pixis> : Yes, I can
- Format message from Discord to IRC
- Format message from IRC to Discord : Difficult because not everything is possible, especially when formatting is overlapping
- Multi channel
- Multi server
- Dynamically relaod conf when changed
- Change conf with IRC or Discord commands