This repo contains the code for a cloudflare worker that checks the WCA Competitions Page once a day and notify a discord server when new competitions are added that take place in utah. It uses cloudflare KV for data storage, to mark what compeittions have already been sent to discord.
You will need to install all dependencies with
npm iYou will also need to copy wrangler.toml.example to a wrangler.toml file and modify the namespace Ids.
Then you can start local testing by running
npm startTo deploy this to your cloudflare instance, after you have set up Wrangler and connected it to your Cloudflare account, run the following command
npm run deployTo run this project, you will need to add the environment variable DISCORD_URI to your .dev.vars file, and to your production secrets.
To add to your production secrets run the following command
wrangler secret put DISCORD_URIAnd your .dev.vars file should look like:
DISCORD_URI=https://discord.com/api/webhooks/123456789/abcdefg