{"id":24511577,"url":"https://github.com/danielxmoore/civet-discord","last_synced_at":"2025-08-02T16:05:52.355Z","repository":{"id":78177445,"uuid":"586626179","full_name":"DanielXMoore/civet-discord","owner":"DanielXMoore","description":"Discord bot","archived":false,"fork":false,"pushed_at":"2024-12-07T03:03:14.000Z","size":108,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-14T08:34:21.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DanielXMoore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-01-08T19:34:32.000Z","updated_at":"2024-12-07T03:03:18.000Z","dependencies_parsed_at":"2024-02-01T19:37:00.698Z","dependency_job_id":"310aefff-54ca-4cb1-8054-03f2ff41a807","html_url":"https://github.com/DanielXMoore/civet-discord","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DanielXMoore/civet-discord","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielXMoore%2Fcivet-discord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielXMoore%2Fcivet-discord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielXMoore%2Fcivet-discord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielXMoore%2Fcivet-discord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DanielXMoore","download_url":"https://codeload.github.com/DanielXMoore/civet-discord/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DanielXMoore%2Fcivet-discord/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268415882,"owners_count":24246812,"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-08-02T02:00:12.353Z","response_time":74,"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":"2025-01-22T00:38:30.393Z","updated_at":"2025-08-02T16:05:52.332Z","avatar_url":"https://github.com/DanielXMoore.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Civet Discord bot\n\nThis is Discord bot that transpiles [Civet](https://civet.dev) code into\nTypeScript or JavaScript.\n\n## Usage\n\nThe bot automatically responds to messages containing ```` ``` ```` code blocks\nwith languages of\n\n* ```` ```civet ````: regular Civet code, converted to TypeScript and Prettified.\n* ```` ```coffee ````: CoffeeScript-compatibility mode: automatically prepend `\"civet coffeeCompat\"`.\n* ```` ```civet-raw ```` or ```` ```coffee-raw ````: Don't run Prettier; give the raw output from the Civet transpiler.\n* ```` ```civet-js ```` or ```` ```coffee-js ````: Ask Civet to convert to JavaScript instead of TypeScript.\n* ```` ```civet-raw-js ```` or ```` ```coffee-raw-js ````: Ask Civet to convert to JavaScript instead of TypeScript, and don't run Prettier.\n\nYou can include multiple code blocks.  If the total output size is large,\nit will switch from inlined code to file attachments.\n\nYou can edit your messages after initial sending, and the bot its response.\nIf you delete a message or edit it to remove all relevant code blocks,\nthe bot will delete its response\n(and will no longer consider edits to that message).\n\nIn addition, you can use the `/civet` slash command to transpile Civet code,\nwith similar options.  If you set the `private` option to True, you will get a\nprivate response, and not clutter the channel you are in.\n\n## Installation\n\n### Creating a Bot\n\n* [Create a Discord bot](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot)\n* [Invite the bot to your server](https://discordjs.guide/preparations/adding-your-bot-to-servers.html#bot-invite-links)\n  with permissions 277025393664 (as listed below),\n  via a link like\n  \u003chttps://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID\u0026permissions=277025401856\u0026scope=bot%20applications.commands\u003e\n  * Read Messages/View Channels\n  * Send Messages\n  * Send Messages in Threads\n  * Manage Messages\n  * Use Slash Commands\n* Add the server to desired channels\n\n### Building and Running the Bot\n\n* Use Node \u003e= 18\n* Create an `.env` file like [.env.example](.env.example):\n  ```sh\n  DISCORD_TOKEN=your-long-token\n  ```\n* If you want to announce new Civet versions to a channel, also add\n  ```sh\n  MOTD_CHANNEL=id-of-channel\n  ```\n* `pnpm install`\n* `pnpm build` to produce `dist/index.js`\n* `pnpm start` or `node dist/index.js` to start bot\n* Whenever the process is running, the bot is up\n\n### Running a Long-Term Bot\n\nTo permanently run the bot in the background, we recommend\n[pm2](https://pm2.keymetrics.io/):\n\n* `npm install pm2@latest -g`\n* `pm2 startup` (and follow instructions)\n* To run the bot and automatic upgrading of Civet:\n  `pm2 start bot.config.js`\n* To run just the bot:\n  `pm2 start bot.config.js --only civet-discord`\n* Restart the bot (e.g., when updating the bot):\n  `pm2 restart civet-discord`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielxmoore%2Fcivet-discord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielxmoore%2Fcivet-discord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielxmoore%2Fcivet-discord/lists"}