diff --git a/.dev.vars.example b/.dev.vars.example index 1287cc0..608faeb 100644 --- a/.dev.vars.example +++ b/.dev.vars.example @@ -5,7 +5,8 @@ DISCORD_CLIENT_SECRET= # DISCORD_GUILD_ID= # DISCORD_SUMMARY_CHANNEL= # DISCORD_MILESTONE_CHANNEL= -# DISCORD_CAUSES_EMOJI= +# DISCORD_CAUSES_EMOJI={"Wallace & Gromit's Grand Appeal":"", ...} +# DISCORD_REGULAR_EMOJI={"mascot":"","happy":"","hype":"","love":"","sad":""} # WORKER_BASE_URL= STATS_API_ENDPOINT=https://dashboard.jinglejam.co.uk/api/tiltify diff --git a/README.md b/README.md index 43ef4a3..837b542 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ 2. Create your `.dev.vars` file. - Copy `.dev.vars.example` and fill out the information from your Discord application, plus the ID of your test server/guild where you'll use the bot. - Optionally, `DISCORD_SUMMARY_CHANNEL` + `DISCORD_MILESTONE_CHANNEL` can be set to channel IDs for testing the scheduled messages, as well as the `DISCORD_BOT_TOKEN` to send the messages as. - - Optionally, `DISCORD_CAUSES_EMOJI` can be set to a JSON object mapping the cause names to custom emoji Markdown (which can be [uploaded directly to the Discord application](https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji)). + - Optionally, `DISCORD_CAUSES_EMOJI` + `DISCORD_REGULAR_EMOJI` can be set to a JSON object mapping the cause names + regular emoji (see [`const regular` in `src/util/emoji.ts`](src/util//emoji.ts)) to custom emoji Markdown (which can be [uploaded directly to the Discord application](https://discord.com/developers/docs/resources/emoji#emoji-object-applicationowned-emoji)). 3. Authenticate with Wrangler by running `npx wrangler login`. 4. Update `wrangler.toml` for your account. - Use `npx wrangler whoami` to get your account ID, update the value in `wrangler.toml` to match. @@ -26,7 +26,7 @@ Ensure that the environment in `wrangler.toml` has been updated with your chosen Ensure that the KV namespaces are created for staging/production environments and are configured in `wrangler.toml`. Use `npx wrangler kv:namespace create "STORE" -e `. -You'll also want to set `DISCORD_CLIENT_ID` + `DISCORD_PUBLIC_KEY` + `STATS_API_ENDPOINT` (optionally, `DISCORD_SUMMARY_CHANNEL` + `DISCORD_MILESTONE_CHANNEL` + `DISCORD_BOT_TOKEN` + `DISCORD_CAUSES_EMOJI` + `WORKER_BASE_URL`) as secrets for the worker, which you can do with `npx wrangler secret put -e ` (the channel secrets can contain multiple IDs, separated by a comma). +You'll also want to set `DISCORD_CLIENT_ID` + `DISCORD_PUBLIC_KEY` + `STATS_API_ENDPOINT` (optionally, `DISCORD_SUMMARY_CHANNEL` + `DISCORD_MILESTONE_CHANNEL` + `DISCORD_BOT_TOKEN` + `DISCORD_CAUSES_EMOJI` + `DISCORD_REGULAR_EMOJI` + `WORKER_BASE_URL`) as secrets for the worker, which you can do with `npx wrangler secret put -e ` (the channel secrets can contain multiple IDs, separated by a comma). If you're deploying for local, make sure that you've got the appropriate environment variables set for `DISCORD_CLIENT_ID`, `DISCORD_CLIENT_SECRET` + `DISCORD_GUILD_ID` (otherwise, they'll default to the values in `.dev.vars`).