mirror of
https://github.com/djdevin/recflare.git
synced 2026-10-27 16:08:58 -07:00
[www] discord link sync
This commit is contained in:
@@ -270,6 +270,14 @@ skip that one link and leave its snapshot for the next run, and the sweep honors
|
||||
Discord's rate-limit headers between calls. `wrangler tail www` shows a summary line per
|
||||
run: `discord role sweep: refreshed N of M links, …`.
|
||||
|
||||
A developer can run the same sweep on demand with `POST /api/staff/discord-roles/sync`
|
||||
(developer role required, empty body). It answers with the run's summary —
|
||||
`{ skipped, refreshed, changed, gone, failed, halted }` — so a run that stops on its first
|
||||
call reports WHY (`halted: "the bot is not in the guild (Unknown Guild)"`) instead of
|
||||
leaving a silent log line on a worker with observability off. Use it after changing the
|
||||
bot token or inviting the bot, or when the role drop needs this morning's roles. The run
|
||||
is written to `audit_log` as `sync_discord_roles` against the developer who pressed it.
|
||||
|
||||
## Development
|
||||
|
||||
### Run in dev mode
|
||||
|
||||
Reference in New Issue
Block a user