[www] discord role sync

This commit is contained in:
Devin Zuczek
2026-09-25 17:17:58 -04:00
parent 4d4d0b1cd2
commit 3037043a00
9 changed files with 741 additions and 22 deletions
+11
View File
@@ -202,3 +202,14 @@ RECFLARE_DOMAIN=rec.example.com
# Also add https://<your domain>/claim to the app's Redirects in the Discord developer
# portal, or the exchange is refused. Granting Plus takes effect on the player's NEXT
# sign-in. `runx admin grant-plus` sets it directly, with no Discord involved.
#
# OPTIONAL: the daily role refresh (www cron) re-reads claimed members' roles through a
# bot token, so `platform_account.role` tracks the guild instead of the day they claimed.
# Add a bot user to the same Discord app, invite it to the server (no permissions needed),
# and store its token in the Secrets Store:
#
# wrangler secrets-store secret create <store-id> --name DISCORD_BOT_TOKEN \
# --scopes workers --remote
#
# The binding has to resolve for `www` to deploy, so create it with a placeholder even if
# you don't want the sweep — it then does nothing. It never touches hasPlus.