Repository navigation
[FEAT] Set the bots up from /mb and explain what is wrong - #127
Closed
makeevrserg wants to merge 61 commits into
Closed
makeevrserg wants to merge 61 commits into
makeevrserg wants to merge 61 commits into
Conversation
makeevrserg
force-pushed
the
feat/setup-onboarding
branch
from
October 1, 2026 17:01
df5f80d to
e452017
Compare
LuckPerms registers its singleton on Bukkit too, so the lookup through the Bukkit services manager is not needed.
makeevrserg
force-pushed
the
feat/setup-onboarding
branch
from
October 2, 2026 15:45
e452017 to
65a848e
Compare
…ables LinkedPlayerTable is not migrated on purpose: links start over.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Admins struggled to set the bridge up: bot tokens, a proxy where Telegram and Discord are blocked, chat, topic and channel ids, the rights of the bots. Most of it failed silently: every messenger logger was created with
withoutParentHandlers(), which dropped the logs,/minfoincluded.Setup from the console or the game.
/mbreplaces/mbreloadand lives in the newmodules/onboardingfeature module:status,reload,telegram …,discord …set tokens, chat, topic, channel, activity, proxy (HTTP or SOCKS5, login optional) and a Bot API url.bindissues a one-time code; sent into a chat (/bind@Bot <code>by a chat admin,!bind <code>with Manage Channel) it fills in chat_id and topic_id or the channel.checkgoes through the token, the bot, privacy mode, the chat, the rights, the topic, the intents and the link role, and sends a test message.invitebuilds the Discord invite with the permissions the plugin needs.--unsafe, because Paper writes player commands to latest.log.Status and errors. Each bot is not configured, connecting, connected as @bot, or failed with a reason and the next step. An empty token logs a step-by-step guide once instead of retrying forever. Telegram and Discord errors become texts that say what to do: wrong token, chat not found, supergroup migration (chat_id is updated), topic gone, bot removed, no rights, 409, 429, blocked network with and without a proxy, proxy login, Discord close code 4014 with the intents to turn on, missing permission. A wrong token, intent or api_url waits for new settings.
Fixes
withRetryno longer prints stacktraces; the webhook URL is not logged.krateOfreturns the read result now)./unlink. Discord needs Server Members Intent for that, only whenlinkgives roles./minforeplies in the chat.Structure.
modules/onboarding/apiholds the contracts the messengers implement,modules/onboardingthe commands. The Telegram, Discord and link modules are grouped by concept instead of by layer. Texts come from translations.yml; theMC/TG/DSsource tags stay in code,%from%controls them.Docs.
docs/covers Telegram, Discord, proxy, commands, troubleshooting and limitations; the README is rewritten; every setting in config.yml has a comment.Breaking.
/mbreloadis/mb reload. Discord needs Server Members Intent whenlinkgives roles. The Discord start, stop and topic texts are translations now, so they follow the first language of translations.yml (English by default) instead of being Russian.Not done. SOCKS5 with a password needs a JVM-wide Authenticator. A Discord webhook deleted by hand is created again only on the next reconnect.
435 unit tests, detekt clean. Checked on Paper 26.1.2 with fake tokens: the setup guide at start, every
/mbreply, the errors for wrong tokens and a dead proxy,/mb reloadwith a broken config.yml and translations.yml keeping the settings. Not run against real Telegram or Discord bots.Merge after AstraLibs 3.51.0 is released (Astra-Interactive/AstraLibs#152): until then CI cannot resolve it. Version 0.36.0.