{"id":27968475,"url":"https://github.com/d3or/castle","last_synced_at":"2025-05-07T21:03:04.478Z","repository":{"id":192491164,"uuid":"658945830","full_name":"d3or/castle","owner":"d3or","description":"🔌 A tool to mirror messages in a discord server to another discord server in realtime.","archived":false,"fork":false,"pushed_at":"2024-02-29T08:24:49.000Z","size":146,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T21:02:39.926Z","etag":null,"topics":["discord","discord-js","mirror","selfbot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d3or.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}},"created_at":"2023-06-26T20:36:35.000Z","updated_at":"2025-04-02T10:30:03.000Z","dependencies_parsed_at":"2024-02-29T09:42:37.117Z","dependency_job_id":null,"html_url":"https://github.com/d3or/castle","commit_stats":null,"previous_names":["d3or/castle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3or%2Fcastle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3or%2Fcastle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3or%2Fcastle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d3or%2Fcastle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d3or","download_url":"https://codeload.github.com/d3or/castle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252954409,"owners_count":21830902,"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-js","mirror","selfbot"],"created_at":"2025-05-07T21:03:03.860Z","updated_at":"2025-05-07T21:03:04.451Z","avatar_url":"https://github.com/d3or.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./logo.png\" alt=\"Castle Logo\" height=\"200\"\u003e\n  \u003ch1\u003eCastle\u003c/h1\u003e\n  \u003cstrong\u003e🔌 \n    A tool to mirror messages in a discord server to another discord server in realtime.\n  \u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://twitter.com/deor\"\u003e\n    \u003cimg src=\"https://img.shields.io/twitter/follow/deor?label=deor\u0026style=flat\u0026logo=twitter\u0026color=1DA1F2\" alt=\"Twitter\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## 🔥 Features\n\n-   Automatically clones channels and categories in a mirror server\n-   Creates webhooks in mirror server\n-   Mirrors messages, embeds, attachments, reactions, and webhooks in realtime\n-   Handles permission overwrites for channels and categories\n-   Lightweight and fast, with very little external dependencies\n-   Minimal configuration required\n\n## 📦 What's inside?\n\nCastle uses its own selfbot methods to communicate with discord. No external dependencies are needed except for node-fetch, which is used when sending outward requests to discord.\n\n## Configuration\n\n```\nconfig.json\n```\n\n```json\n{\n    \"gateway\": \"wss://gateway.discord.gg/?v=9\u0026encoding=json\",\n    \"target_user_token\": \"\",\n    \"mirror_user_token\": \"\",\n    \"target_user_status\": \"online\",\n    \"target_guild_id\": \"\",\n    \"mirror_guild_id\": \"\",\n    \"autoMirror\": true,\n    \"target_channels\": [\n        {\n            \"target_channel_id\": \"\",\n            \"mirror_channel_id\": \"\",\n            \"mirror_webhook\": \"\"\n        }\n    ],\n    \"categories\": {}\n}\n```\n\n| Key                  | Value                                         | Description                                                                                       |\n| -------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------- |\n| `gateway`            | `wss://gateway.discord.gg/?v=9\u0026encoding=json` | Discord Gateway URL, do not change unless you know what you're doing                              |\n| `target_user_token`  |                                               | Discord token of the user inside the target server to mirror messages from                        |\n| `mirror_user_token`  |                                               | Discord token of the user inside the mirror server that will be mirroring messages                |\n| `target_user_status` | online                                        | Status of the target user to mirror messages from, can be `online`, `idle`, `dnd`, or `invisible` |\n| `target_guild_id`    |                                               | ID of the target server to mirror messages from                                                   |\n| `mirror_guild_id`    |                                               | ID of the mirror server to mirror messages to                                                     |\n| `autoMirror`         | true                                          | Automatically create channels, categories, and webhooks in the mirror server                      |\n| `target_channels`    |                                               | Array of channel IDs to mirror messages from. Leave empty if `autoMirror` is set to `true`        |\n| `categories`         |                                               | Key-value pairs of category IDs in the target server, and the category IDs in the mirror server   |\n\n## ⚙️ Run it yourself\n\n### Clone the repository\n\n```bash\ngit clone https://github.com/d3or/castle.git \u0026\u0026 cd castle\n```\n\n### Install dependencies\n\n```bash\nyarn install\n```\n\n### Build\n\n```bash\nyarn build\n```\n\n### Configure the bot\n\n```bash\ncp config.example.json config.json\n\n# Edit the config.json file with your own configuration\n```\n\n### Start\n\n```bash\nyarn start\n```\n\n## TODO\n\n-   [ ] Add support for cloning discord roles so that they can be used in the mirror server when they are mentioned in the target server.\n-   [ ] Add support for mirroring messages from multiple servers to a single server (or multiple servers) at the same time.\n-   [ ] Add support for using normal discord bots instead of selfbots\n-   [ ] Add support for reactions on messages\n-   [ ] Add support for editing messages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3or%2Fcastle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd3or%2Fcastle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd3or%2Fcastle/lists"}