{"id":13622203,"url":"https://github.com/discord-relay-chat/drc","last_synced_at":"2025-04-15T05:34:04.164Z","repository":{"id":39759048,"uuid":"432376528","full_name":"discord-relay-chat/drc","owner":"discord-relay-chat","description":"Discord Relay Chat","archived":false,"fork":false,"pushed_at":"2024-02-03T23:05:39.000Z","size":1302,"stargazers_count":18,"open_issues_count":15,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-08-01T21:51:53.906Z","etag":null,"topics":["discord","discord-bot","discord-js","discordjs","irc","irc-bot","irc-bridge","irc-client"],"latest_commit_sha":null,"homepage":"https://discordrc.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/discord-relay-chat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-27T05:27:09.000Z","updated_at":"2024-03-14T17:23:18.000Z","dependencies_parsed_at":"2023-12-12T00:53:01.298Z","dependency_job_id":"b8058db4-00d5-412c-9708-2577b43d4b1e","html_url":"https://github.com/discord-relay-chat/drc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-relay-chat%2Fdrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-relay-chat%2Fdrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-relay-chat%2Fdrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/discord-relay-chat%2Fdrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/discord-relay-chat","download_url":"https://codeload.github.com/discord-relay-chat/drc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223661429,"owners_count":17181667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","discord-bot","discord-js","discordjs","irc","irc-bot","irc-bridge","irc-client"],"created_at":"2024-08-01T21:01:15.739Z","updated_at":"2024-11-08T09:31:07.521Z","avatar_url":"https://github.com/discord-relay-chat.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cimg src=\"logo.svg\" alt=\"DRC logo\" title=\"DRC logo\" width=\"250\" style=\"margin-bottom: 2.5em;\"\u003e\n\n# Discord Relay Chat\n\nI heard you liked IRC \u0026 Discord so I put some IRC in your Discord.\n\n## Social\n\n[![Discord](https://shields.io/badge/chat-discord-7289da?style=for-the-badge)](https://discord.gg/dHmqx5vAw2)\n[![Libera Chat](https://shields.io/badge/chat-libera%20chat-ec62d7?style=for-the-badge)](https://web.libera.chat/?channel=#discordrc)\n\n## About DRC\n\nDiscord Relay Chat is an IRC client that uses Discord for an easy-to-use, comfortable UI accessible from any machine. It allows multiple server connections while ensuring stability and moderate resource consumption.\nWith DRC, you’ll not miss out on any mentions or highlights. It also gives you the possibility of alias and kick/ban tracking. You can send attachments, take notes about channels and nicks, or even play [Zork](https://en.wikipedia.org/wiki/Zork)! Thanks to [ChatGPT](https://chat.openai.com/auth/login) integration, you’ll always have someone to talk to.\n\nVisit [the project’s website](https://discordrc.com/) to discover the features and potential of this tool.\nThere is still some work to do. Fortunately, it’s open source, and contributions are accepted, so hack away!\n\n![DRC UI](https://github.com/edfletcher/discordrc.com/blob/main/static/images/ubuntu-disc.png \"DRC UI\")\n\n## Documentation\n\nBelow you will find instructions on how to install and run the project. Additional documentation is available on [DiscordRC.com](https://discordrc.com)  \nNote: documentation is not comprehensive. The source code is the ultimate reference.\n\n## Installation\n\n### Pre-requisites\n\n- [Node](https://nodejs.org/en) v18 or greater\n- [Redis](https://redis.io/) v5 or greater\n  - Used primarily for inter-process communication, so is highly suggested this be running locally.\n- [Discord](https://discord.com/) server \u0026 [bot](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot)\n  - DRC is designed to be mainly single-tenant (one user), so you should set up a separate Discord server and associated bot for this application.\n\n### Optional pre-requisites\n\n- [nmap](https://nmap.org/)\n- [figlet](https://linux.die.net/man/6/figlet)\n- [Shodan](https://www.shodan.io/) API key\n- [IPInfo](https://ipinfo.io/) API key\n- Reverse proxying webserver\n  - [Caddy](https://caddyserver.com/) is highly recommended\n- [Docker](https://www.docker.com/) if deploying on Linux\n\n### Install\n\n1. Clone/download [the repository](https://github.com/edfletcher/drc)\n2. Run `npm install` in the project directory\n3. Create `config/local.json` and set the appropriate configuration\n   - See [`config/default.js`](https://github.com/edfletcher/drc/blob/main/config/default.js) for examples and commentary\n\n## Setup\n\nIn the configuration, `botId` is the “Application ID” in the Discord Developer portal.\n\nThe Discord bot must have “Message Content Intent” \u0026 “Privileged Gateway Intents” enabled to function correctly.\n\n### Bot channel\n\n1. Create a special channel in no category (or at least not in any of the special categories you’ll create in the next step) for the bot’s status, notice et. al messages.\n2. Add this channel’s ID to the configuration in the (truly terribly-named) `irc.quitMsgChanId` [field](https://github.com/edfletcher/drc/blob/8034fd6e9727953f85ce3fd5754df796f4b6bf7b/config/default.js#L73).\n\n### Server categories\n\n1. Add a category for each IRC server, named for that server e.g. `irc.libera.chat`.\n1. Add a channel in that category for each IRC channel you wish to join on connect.\n1. Add to `config/channelXForms-NODE_ENV.json` with required name transforms! You can also adjust these from the client at any time with the `!channelXforms` command.\n\n### Allowed speakers\n\nTo control which Discord users can speak as your IRC user, create a Role in your guild and add users to it you wish to allow to speak and use DRC in your server. Set the ID of this role as `config.app.allowedSpeakersRoleId`.\n\n### Configuration\n\nDRC uses the `config` module and as such follows [these rules](https://github.com/node-config/node-config/wiki/Configuration-Files#file-load-order) as to which configuration file will be used.\n\n`default.js` both specifies all default values as well as illustrates the expected structure. As a hobby project, some of the names have been very poorly chosen. You have my apologies.\n\n#### Critical configuration values\n\nThe following configuration parameters must be set by you, the user for the system to function correctly:\n\n- `app.allowedSpeakersRoleId` or `app.allowedSpeakers`\n- `discord.botId`\n- `discord.guildId`\n- `discord.token`\n- `irc.quitMsgChanId`\n\n### Using private message channels\n\nIf you create a category with a name that matches [this logic](https://github.com/edfletcher/drc/blob/d4d7e8811eeb70c0fd37edf94d006744db1e61a4/discord.js#L629)\\* - such as “Private Messages”, “privmsgs”, or “PMs”) - DRC will automatically create a channel in this category for each private message received (a la traditional IRC client’s “query window” feature).\n\nIn order for this feature to properly expire these channels after `config.discord.privMsgChannelStalenessTimeMinutes` have elapsed, your Redis server must have `“Kx”` [keyspace notifications](https://redis.io/docs/manual/keyspace-notifications/) enabled!\n\n`* x.match(/priv(?:ate)?\\s*me?s(?:sa)?ge?s?/ig) || x === 'PMs'` at the time of this writing\n\n## Run with Docker\n\n(Note: These instructions will work only on Linux due to the networking mode used. Proceed to the next page to learn how to run it manually if you won’t be deploying on Linux.)\n\nRun `redis` as a regular ‘ol system service.\n\nPut your specific configurations into `local-prod.json` (and other `*-prod.json` files as necessary).\n\n- `.app.log.path` and `.irc.log.path` must not be modified/overridden; leave them as their defaults.\n  You must set the environment variable `DRC_LOGS_PATH_HOST` to a fully-qualified path _on the host_ where your logs are kept.\n\nAll of the following `docker compose` invocations must be run in this directory.\n\nStart everything:\n\n```\n$ export DRC_LOGS_PATH_HOST=/home/myuser/.drc/logs\n$ docker compose up -d\n```\n\nWatch the logs with `docker compose logs -f`\n\nTo stop everything: `docker compose down`\n\n## Run manually\n\nIn the project directory:\n\n1. Run `node http.js` to start the (optional) web server\n1. Run `node discord.js` to start the Discord bot\n1. Run `node irc.js` to start the IRC bridge\n\nIf any of the required secrets (Discord bot API key or IRC account passwords) are not provided in the configuration file, they will be interactively prompted for. Accordingly, the most secure way to run this application is from within a terminal multiplexer like _screen_ or _tmux_ and not configure any secrets, entering them on each run so they never live on the filesystem nor in a process environment.\n\nYou may set `DEBUG=1` in the environment to enable more-verbose logging from any of the daemons.\n\n## Contributors\n\n- [EdFletcher](https://github.com/edfletcher)\n- [antishok](https://github.com/antishok)\n- [CovertDuck](https://github.com/CovertDuck)\n- [OlaPom](https://github.com/OlaPom)\n- [Captain8771](https://github.com/Captain8771)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscord-relay-chat%2Fdrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiscord-relay-chat%2Fdrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiscord-relay-chat%2Fdrc/lists"}