Skip to content

Latest commit

 

History

History
65 lines (41 loc) · 1.75 KB

README.md

File metadata and controls

65 lines (41 loc) · 1.75 KB

⚠️ I think that you need a paid plan for workers to run this program on cloudflare.

🚀 Getting Started

Git Node.js

1. Clone and Install

git clone https://github.com/luisfun/discord-bot-hoyo-news discord-bot-hoyo-news
cd discord-bot-hoyo-news
npm i

2. Set Environment Variables

Create a New Application from Dashboard.

2.1 Set Local

Rename the file example.dev.var and create a .dev.var file.

Enter information in .dev.var, referring to the Official Docs.

2.2 Set Workers

npx wrangler secret put DISCORD_APPLICATION_ID
npx wrangler secret put DISCORD_PUBLIC_KEY
npx wrangler secret put DISCORD_TOKEN

3. Create Database and Tables

npx wrangler d1 create discord-bot-hoyo-news

Update wrangler.toml with what is displayed on success.

npx wrangler d1 execute discord-bot-hoyo-news --file=./schema.sql

4. Register Commands and Deploy

npm run register
npm run deploy

5. Set Endpoint URL

Enter https://discord-bot-hoyo-news.YOUER_DOMAIN.workers.dev in the INTERACTIONS ENDPOINT URL.

📑 Official Docs

Discord Bot

Special Thanks

timelis