Skip to content

Japanese Proofreading at Discord, with Cloudflare Workers(Hono)

License

Notifications You must be signed in to change notification settings

ryokryok/kousei

Repository files navigation

Material Bread logo

Add Discord Bot


Kousei (Discord Bot with Cloudflare Workers)

A Discord Bot for Japanese proofreading with /kousei slash commend.

Implemented in Hono.

Note

If you would like to run, you will need this.

  • Yahoo App ID (API Key)
  • Discord Public Key
  • Discord Application ID
  • Discord Token

Read this doc.

https://developer.yahoo.co.jp/sitemap/

https://discord.com/developers/docs/tutorials/hosting-on-cloudflare-workers

And, copy example.dev.vars to .dev.vars, and replace that.

YAHOO_APP_ID = "..."
DISCORD_APPLICATION_ID = "..."
DISCORD_TOKEN = "..."
DISCORD_PUBLIC_KEY = "..."

CLI

Development

# install dependencies
pnpm install
# setup slash command
pnpm run register
# dev server
pnpm run dev

run another terminal ngrok.

ngrok http 8787

and setup endpoint url.

https://discord.com/developers/docs/tutorials/hosting-on-cloudflare-workers#setting-up-ngrok

in this repo, default endpoint URL is <ROOT>/api/interactions for bot.

Production

# setup slash command
pnpm run register
# deploy to Cloudflare Workers with Wrangler
pnpm run deploy

Don't forget to setup Interactions Endpoint URL, this URL is maybe *.*.workers.dev/api/interactions.

Referenced

https://github.com/discord/cloudflare-sample-app

License

MIT

About

Japanese Proofreading at Discord, with Cloudflare Workers(Hono)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published