git clone https://github.com/luisfun/discord-bot-cloudflare-ai discord-bot-cloudflare-ai
cd discord-bot-cloudflare-ai
npm i
Create a New Application from Dashboard.
Rename the file example.dev.var
and create a .dev.var
file.
Enter information in .dev.var
, referring to the Official Docs.
npx wrangler secret put DISCORD_APPLICATION_ID
npx wrangler secret put DISCORD_PUBLIC_KEY
npx wrangler secret put DISCORD_TOKEN
npm run register
npm run deploy
Enter https://discord-bot-cloudflare-ai.YOUER_DOMAIN.workers.dev
in the INTERACTIONS ENDPOINT URL.