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>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-14 13:38:20 +00:00
1 parent e4fda18276
commit 1c713ba0aa
24 files changed
+296 -273

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
[exp-discord-auth]
linked=Your account is now linked to the Discord account __1__.
linked-to=Your account is linked to the Discord account __1__. Use /unlink-discord to remove it.
unlinked=Your account is no longer linked to the Discord account __1__.
not-linked=Your account is not linked to a Discord account. Log in with Discord at __1__ to get a code, then use /link-discord <code>.
[exp-discord-auth_commands]
description-link=Links your account to Discord using the code from the website, or shows the account you are linked to.
description-unlink=Removes the link between your account and Discord.
arg-code=Code shown on the website after logging in with Discord.