Discord-userbot-to-irc
A crappy group chat to a IRC room bridge written in node </3
Features:
- Multi-Bridge Support - You can bridge multiple channels with multiple IRC rooms all with one config.
- Reactions Bridging - When a user reacts to a Discord message, the bridge sends a notification to IRC :D
- Attachments Bridging - Automatically forwards links to images and attachments from Discord messages to IRC
- TLS/Non-TLS IRC Support - Works with both secure (TLS) and standard IRC ports.
- Group chat bridges - Since this all works with a selfbot it means that you can bridge a Discord group chat to a IRC room.
- YAML Configuration - Simple and a human readable config.
- RELLAYMSG support - Can use RELLAYMSG on the IRC side.
Warning:
I would not recommend using this in a active room since that might get the userbot rate limited on Discord OR IRC which is not good !
Also using Userbots is against Discord's Terms of Service so your account might get deactivated. This has not happen yet but it is still possible.
Also worth to mention. Discord nicknames only show up if you bridge a channel, in group chats the bridge will use the user's username and I don't think there is anything I can do about that.
Also this userbot does work with servers but it's better to only bridge groupchats (or DMs). If you want to bridge a server with an IRC room it's better to use something like Dis4irc.
Features to be added:
- A docker compose file
- More options in the config.
- Storing debug logs and message logs in a txt file.
What you need to run this:
- Node.js v18+
npm
package manager
Dependecies:
"discord.js-selfbot-v13": "^2.10.0",
"irc-framework": "^3.0.0",
"yaml": "^2.3.1"
Before running:
What you gonna need:
- A Discord user or bot token.
- An IRC room.
- Discord group/channel ID
- A server or machine to run the bot on.
Installation
Bare metal
- Clone the repository:
git clone https://foundry.fsky.io/purplebored/Discord-userbot-to-irc.git
cd Discord-userbot-to-irc
- Install dependencies:
npm install
- Configuration:
Rename the example.config.yaml
file to config.yaml and set it up to your liking.
- Start the bridge:
To start the bridge, just run
node bot.js
With Docker/Podman
- Configuration:
Copy the example.config.yaml
file, rename it to config.yaml, and set it up to your liking.
- Start the bridge
To start the bridge, run:
docker run -d -v "$(pwd)/config.yaml:/app/config.yaml:ro" foundry.fsky.io/purplebored/discord-userbot-to-irc:latest
The /app/config.yaml file in the container must be mounted to the filesystem.
Config:
You can easaily enable or disable the logging of messages or the raw IRC info for debugging by switching debug: false
to debug: true
, and the same with logForward
Notes:
- Make sure your Discord selfbot token is kept private.
- For secure IRC connections, ensure
tls: true
and correct port