https://github.com/zlataovce/rubiko
A small, server-less Discord bot for roleplaying and utility commands, designed to run on Cloudflare Workers.
https://github.com/zlataovce/rubiko
cloudflare-workers discord-bot roleplay serverless typescript utility
Last synced: 8 months ago
JSON representation
A small, server-less Discord bot for roleplaying and utility commands, designed to run on Cloudflare Workers.
- Host: GitHub
- URL: https://github.com/zlataovce/rubiko
- Owner: zlataovce
- License: mit
- Created: 2024-03-02T10:03:37.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-03T05:41:32.000Z (over 1 year ago)
- Last Synced: 2025-02-09T05:52:02.323Z (over 1 year ago)
- Topics: cloudflare-workers, discord-bot, roleplay, serverless, typescript, utility
- Language: TypeScript
- Homepage:
- Size: 181 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rubiko [](https://discord.com/oauth2/authorize?client_id=1213159235513352213&permissions=2147485696&scope=bot+applications.commands)
A small, server-less Discord bot for roleplaying and utility commands, designed to run on [Cloudflare Workers](https://workers.cloudflare.com/).
## Deployment
You'll need a JS runtime of your choice, e.g. Node.js, Deno or Bun, and `pnpm`.
Run `pnpm install` to download all needed dependencies, then `pnpm wrangler login` and log into your Cloudflare account.
At last, run `pnpm wrangler deploy` to deploy rubiko to a Worker.
You'll need to create these secrets for the bot, you can get them from the [Discord Developer Portal](https://discord.com/developers/applications):
```bash
pnpm wrangler secret put DISCORD_TOKEN
pnpm wrangler secret put DISCORD_PUBLIC_KEY
pnpm wrangler secret put DISCORD_APPLICATION_ID
```
At this point, the Worker is running and responding to interactions, but Discord doesn't know how to reach it.
Paste your Worker URL into the `Interactions Endpoint URL` field of your bot's page in the DDP and save changes.
Now, you can register the Worker's commands with Discord by issuing a `PUT` request with the appropriate `Authorization` header:
`curl -X PUT -H "Authorization: Bot " `
Everything should be up and running by now, make sure to grant the `bot` and `applications.commands` scopes when inviting.
## Licensing
This project is licensed under the [MIT License](./LICENSE).