{"id":15723367,"url":"https://github.com/radityaharya/ryo","last_synced_at":"2025-08-31T08:42:48.201Z","repository":{"id":222981609,"uuid":"758897616","full_name":"radityaharya/ryo","owner":"radityaharya","description":"Ryo is a Discord bot that uses the Discord Interactions API. Built with Hono for Cloudflare Workers","archived":false,"fork":false,"pushed_at":"2024-06-18T22:50:37.000Z","size":836,"stargazers_count":7,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T11:01:49.119Z","etag":null,"topics":["cloudflare-email","cloudflare-workers","discord-bot","discord-email","discord-interactions","honojs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/radityaharya.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":"2024-02-17T12:02:52.000Z","updated_at":"2025-02-09T04:56:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e22b4bb-c83e-404c-bd36-6de435249661","html_url":"https://github.com/radityaharya/ryo","commit_stats":null,"previous_names":["radityaharya/ryo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radityaharya%2Fryo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radityaharya%2Fryo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radityaharya%2Fryo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radityaharya%2Fryo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radityaharya","download_url":"https://codeload.github.com/radityaharya/ryo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252895790,"owners_count":21821218,"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":["cloudflare-email","cloudflare-workers","discord-bot","discord-email","discord-interactions","honojs"],"created_at":"2024-10-03T22:11:20.562Z","updated_at":"2025-05-07T14:31:50.514Z","avatar_url":"https://github.com/radityaharya.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ryo\n\nRyo is a Discord bot that uses the [Discord Interactions API](https://discord.com/developers/docs/interactions/receiving-and-responding) to respond to slash commands. It's built using [Hono](https://hono.dev/) for [Cloudflare Workers](https://workers.cloudflare.com/), which allows you to run serverless functions at the edge of Cloudflare's network.\n\n## Features\n- [x] Slash commands\n- [x] Reddit Hot Posts from a Subreddit\n- [x] Forwards Email to Discord using Cloudflare Email Routing\n\n\n## Configuring project\n\nBefore starting, you'll need a [Discord app](https://discord.com/developers/applications) with the following permissions:\n\n- `bot` with the `Send Messages` and `Use Slash Command` permissions\n- `applications.commands` scope\n\n\u003e ⚙️ Permissions can be configured by clicking on the `OAuth2` tab and using the `URL Generator`. After a URL is generated, you can install the app by pasting that URL into your browser and following the installation flow.\n\n## Email to Discord\n\nThis bot also has the ability to forward emails to a Discord channel. The worker will be registered as an Email Routing rule in Cloudflare. When an email is sent to the custom email address, it will be forwarded to the Discord channel using the Webhook URL (how to get Webhook URL [[Doc](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)])\n\n**Prerequisites:**\n1. Have email routing enabled on a cloudflare Website [[Doc](https://developers.cloudflare.com/email-routing/get-started/enable-email-routing/)]\n2. Authenticated Wrangler CLI setup [[Doc](https://developers.cloudflare.com/workers/wrangler)]\n\n**Setup:**\n1. Adding Webhook URL as Secret\n  - Using Wrangler CLI\n    ```bash\n    wrangler secret put DISCORD_WEBHOOK_URL\n    ```\n    Paste Webhook URL\n    ```bash\n    ? Enter a secret value: ›\n    ```\n2. Setting Worker as a rule for custom address\n    1. In Cloudflare dashboard go to Email \u003e Email Routing \u003e Routes.\n    2. Select Create address.\n    3. In Custom address, enter the custom email address you want to use (for example, 'ryo').\n    4. In the Action drop-down menu, choose \"send to worker\"\n    5. Select \"ryo\" as the destination\n\n## Deploying\n\n```bash\ngit clone https://github.com/radityaharya/ryo.git\ncd ryo\n```\n\nTo install the dependencies, run the following command:\n\n```bash\nnpm install\n```\n\nSet up your environment variables by creating a `.env` file in the root of the project. You can use the `example.env` file as a template.\n\nTo deploy the app, you'll need to install the [Wrangler CLI](https://developers.cloudflare.com/workers/cli-wrangler/install-update). Once installed, you can deploy the app using the following command:\n\n```bash\nwrangler deploy\n```\n\nThe credentials in `.env` are only applied locally. The production service needs access to credentials from your app:\n\n```bash\nwrangler secret put DISCORD_TOKEN\nwrangler secret put DISCORD_PUBLIC_KEY\nwrangler secret put DISCORD_APPLICATION_ID\nwrangler secret put DISCORD_WEBHOOK_URL\nwrangler secret put BOT_SECRET\n```\n\n## Setting up the bot\n\nAfter deploying the app, you'll need to register the bot with Discord. You can do this by inputting your `interactions` URL into the `Interactions Endpoint URL` field in the `General Information` tab of the Discord Developer Portal.\n\n**Registering Commands**\n\nCommands should be registered with Discord using the `register` command after the bot has been deployed or when commands are updated.\n\n```bash\nnpm run register\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradityaharya%2Fryo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradityaharya%2Fryo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradityaharya%2Fryo/lists"}