Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.66 KB

README.md

File metadata and controls

42 lines (29 loc) · 1.66 KB

Bot logo

Ritsu

An always-online Discord bot to fetch information from various API

Info

Features

  • Searching and fetching articles from Wikipedia.
  • Searching and fetching articles from various fandom pages.
  • Searching and fetching the details of a compound from PubChem using their PUG API.

Development notes

Setup

  1. Install node.js and npm.
  2. Clone this repository: git clone https://github.com/supershadoe/ritsu.
  3. Create a worker in Cloudflare's dashboard.
  4. Run npm install to download all node modules.
  5. Set your worker's name and domain/routes in wrangler.toml.
  6. Generate types for the project using npx wrangler types.
  7. Copy .dev.vars.example to .dev.vars and set the values specific to your bot.
  8. Run the bot locally using npx wrangler dev.

How to sync commands with discord

  1. Start the development server using npx wrangler dev.
  2. Go to the /sync-cmds route on the local server.
  3. The commands should have synced with Discord after credential grant.

Deployment

  1. Login to your Cloudflare account using wrangler: npx wrangler login.
  2. Bundle and upload the code using npx wrangler deploy.