Commit Graph
2 Commits
Author SHA1 Message Date
BastiaanandClaude Opus 5.5 b513b7a637 Expose Discord links to other controller plugins (#525)
exp_discord_auth gains a static get(controller) like exp_roles and exp_groups, getLink/getAccount/getAccounts lookups that return copies, and linked/unlinked AsyncHooks. Moving a player to another Discord account fires unlinked for the old account, then linked for the new one.

This is what exp_discord_sync needs to give linked players their Discord roles.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 13:28:05 +00:00
bbassieandClaude Opus 5.5 1c713ba0aa Address review of the Discord plugin
The plugin is now exp_discord_auth, so later Discord plugins can sit
next to it. Config keys, permissions, routes and the Lua module moved
with it, and the Discord redirect is now api/exp_discord_auth/callback.

The controller registers its handlers and routes in the constructor and
uses the express types, the instance plugin is a closure, and the Lua
commands file returns its commands. The get and unlink responses carry
the controller url so the in game messages can name the website.

The login form asks the new status route whether Discord is configured
and shows the error straight away instead of a button that fails. The
button is full width like the link button, and a "Not you?" link next
to the Discord name replaces the separate switch account button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 13:38:20 +00:00