{"id":22645791,"url":"https://github.com/lastationvrchat/discord-reposter-bot","last_synced_at":"2025-09-12T08:46:58.368Z","repository":{"id":204324217,"uuid":"711581119","full_name":"LastationVRChat/Discord-Reposter-bot","owner":"LastationVRChat","description":"Bot for reposting Discord messages","archived":false,"fork":false,"pushed_at":"2024-01-15T16:10:56.000Z","size":1233,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-29T06:24:17.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/LastationVRChat.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-29T17:43:54.000Z","updated_at":"2025-01-10T23:03:29.000Z","dependencies_parsed_at":"2023-10-31T18:34:45.153Z","dependency_job_id":"829d1eda-7e11-44f4-813d-b49f7a02880c","html_url":"https://github.com/LastationVRChat/Discord-Reposter-bot","commit_stats":null,"previous_names":["lastationvrchat/discord-reposter-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LastationVRChat/Discord-Reposter-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LastationVRChat%2FDiscord-Reposter-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LastationVRChat%2FDiscord-Reposter-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LastationVRChat%2FDiscord-Reposter-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LastationVRChat%2FDiscord-Reposter-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LastationVRChat","download_url":"https://codeload.github.com/LastationVRChat/Discord-Reposter-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LastationVRChat%2FDiscord-Reposter-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274783968,"owners_count":25349085,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-09T06:07:25.855Z","updated_at":"2025-09-12T08:46:58.284Z","avatar_url":"https://github.com/LastationVRChat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reposter Discord Bot\n\na discord bot built using discord.js v14 and Typescript that reposts messages from one channel to another, even if they are from different servers!\n\n-   focus on configurability and function coupling\n-   easy to use and setup\n\n## Requirements\n\n### Technical Knowledge\n\nIn order to work with this bot, one needs sufficient knowledge in Javascript/ Typescript, NodeJS, Discord.js, Docker, Postgresql, Prisma, NPM/PNPM\n\n### Environment\n\n-   Install Node.js v18 via NVM\n-   Install Docker\n\n### Discord Bot and Application\n\n1. Create an application in the [Discord Developer Portal](https://discord.com/developers/applications)\n2. Ensure that the bot has the `MESSAGE_CONTENT` permissions\n   ![intents](public/intents.png)\n\n-   Save the `TOKEN` and `APPLICATION ID` from the portal, as this will be used later\n\n3. Create a bot with the following scopes and permissions\\*\n   ![scopes](public/scopes.png)\n   ![perms](public/perms.png)\n   \\*ensure that the bot has `MANAGE_MESSAGES` and `MANAGE_WEBHOOKS` perms as they are needed for the bot features\n4. Use the generated invite link and add the bot with the permissions in your desired discord servers\n\n### Database\n\n1. Deploy a PostgreSQL instance\n\n-   Use your desired postgresl hosting platform\n-   Deploy it via Docker:\n\n```bash\ndocker network create reposter\ndocker run --name reposter-db -e --network=reposter -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres\ndocker network inspect reposter // get ip address of container\n```\n\n2. Save `DATABASE_URL` in the `.env`\n\n## Setup\n\n0. Install project dependencies:\n\n```bash\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash\nnvm install 18 \u0026\u0026 nvm use 18\nnpm install -g pnpm\npnpm setup\npnpm add -g pm2\n```\n\n1. Clone this repo on your desired working directory\n2. Update the `src/config.ts` file and `.env` file with your project variables and configurations\n3. Install project dependencies `pnpm install`\n\n```bash\npnpm install\n```\n\n4. Ensure that the PostgreSQL database is running and available `pnpm db-studio`\n\n```bash\npnpm db-studio\n```\n\n5. Run `pnpm dev` to test and ensure that the bot works well\n\n```bash\npnpm dev\n```\n\n6. Once testing is done, run bot via docker command\n\n```bash\ndocker build . --tag \u003cusername\u003e/\u003cimage\u003e\ndocker run -d --name \u003capp\u003e --network=\u003cnetwork\u003e --env-file ./.env \u003cusername\u003e/\u003cimage\u003e\n\ndocker build . --tag lastation/reposter\ndocker run -d --name reposter --network reposter --env-file ./.env lastation/reposter\n\n```\n\n## How it works\n\nThe bot sets up **repost configurations** that dictate a repost setup from a _source_ (a text channel) to a _destination_ (such as text channel from same or different server OR a discord webhook). There can be multiple repost configurations, allowing complex setups of `CHANNEL_A` -\u003e `CHANNEL_B` repostingd\n\nThe project leverages the [messageCreate](https://discord.js.org/#/docs/discord.js/main/class/Client?scrollTo=e-messageCreate) event in discord. It then uses the metadata from the **repost config** to filter out data such as allow only from users/bots and to allow only embeds/components/etc. and other configurations.\n\nIn order to support DMs with users a _source_ and _destination_, the config's `guildID` and `channelID` would be set to the DM's `channelID`, the system recognizes this automatically to instead looking for a channel in the server, looks for the user DMs channel from the list of user channels available to the bot client\n\n![sample configuration](public/repost_view.png)\n\n## Commands\n\n| Command                                                                      | Description                                                                |\n| ---------------------------------------------------------------------------- | -------------------------------------------------------------------------- |\n| /channelinfo                                                                 | get guild ID and channel ID for this channel                               |\n| /webhook                                                                     | creates a webhook in this channel                                          |\n| /reposts                                                                     | view repost configurations in this server/user                             |\n| /repost view [repost_id]                                                     | view a repost configuration                                                |\n| /repost add_channel [src_guild] [src_channel] [des_guild] [des_channel]      | add a repost configuration (send to a channel/user from a channel/user)    |\n| /repost add_webhook [src_guild] [src_channel] [des_webhook]                  | add a repost configuration (send to a webhook from a channel/user)         |\n| /repost remove [repost_id]                                                   | remove a repost configuration                                              |\n| /repost enable [repost_id]                                                   | enable a repost configuration (if it is disabled)                          |\n| /repost disable [repost_id]                                                  | temporary disable a repost configuration                                   |\n| /repost update_source_allows [repost_id] [users] [bots] [webhooks]           | allow reposting of messages from users/bots/webhooks                       |\n| /repost update_source_allows [repost_id] [embeds] [components] [attachments] | include embeds/components/attachments in reposts                           |\n| /repost update_delay [repost_id] [delay]                                     | adds a delay before sending repost to destination (0 = realtime repost)    |\n| /repost update_mentions [repost_id] [mentions]                               | use this to add a mention (such as role or user) for reposted messages     |\n| /repost update_nickname [repost_id] [nickname]                               | toggle true if you want author nickname to be appended to reposted message |\n| /repost update_delete [repost_id] [delete]                                   | toggle true if you want bot to delete original message                     |\n| /repost update_pin [repost_id] [pin]                                         | pin reposted messages (not available for webhooks)                         |\n| /repost create_replacement [repost_id] [find] [replace]                      | find and replace the chosen find substring from message content            |\n| /repost delete_replacement [repost_id] [find]                                | delete replacement config                                                  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastationvrchat%2Fdiscord-reposter-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flastationvrchat%2Fdiscord-reposter-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastationvrchat%2Fdiscord-reposter-bot/lists"}