Skip to content

luisfun/discord-bot-cloudflare-ai

Repository files navigation

🚀 Getting Started

Git Node.js

1. Clone and Install

git clone https://github.com/luisfun/discord-bot-cloudflare-ai discord-bot-cloudflare-ai
cd discord-bot-cloudflare-ai
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. Register Commands and Deploy

npm run register
npm run deploy

4. Set Endpoint URL

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

📑 Docs