Files
Discord-userbot-to-irc/README.md

101 lines
2.9 KiB
Markdown

![Node](https://img.shields.io/badge/node-20%2B-brightgreen)
# 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.
# Warning:
I would not recommend using this in a active room since that might get the bot/userbot rate limited on Discord OR IRC which is not good !
Also Using Userbots is against Discord's Terms of Service so your account/bot 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.
## Features to be added:
- Webhooks for briding channels
- A docker compose file
- More options in the config.
- Relay MSG on the IRC side.
- Being able to configure the bot with commands instead of needing to config the commands.
- 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
1. Clone the repository:
```bash
git clone https://foundry.fsky.io/purplebored/Discord-userbot-to-irc.git
cd Discord-userbot-to-irc
```
2. Install dependencies:
```bash
npm install
```
3. Configuration:
Rename the `example.config.yaml` file to config.yaml and set it up to your liking.
4. Start the bridge:
To start the bridge, just run
```
node bot.js
```
### With Docker/Podman
1. Configuration:
Copy the `example.config.yaml` file, rename it to config.yaml, and set it up to your liking.
2. 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