Repository navigation
Add TypeCheck to this server button when the bot is missing - #57
Merged
Merged
Conversation
…er lacks the bot The bot_not_in_server message told members to open TypeCheck in a browser, but inside Discord the homepage install button is hidden and Connect in Discord only signs in, so clicking it repeated the message. Show an Add TypeCheck to this server button only for that error. It opens Discord's install screen through the SDK with the launching server preselected, and notes that adding the bot requires Manage Server (owners and Administrators have it). The homepage and Activity now build the install link from one helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
After #56, launching the Activity in a server without the bot shows "The TypeCheck bot is not in this server yet…", telling the member to open TypeCheck in a browser. Inside Discord the homepage Add to your server button is hidden, and Connect in Discord only signs in, so clicking it just repeats the message. There was no way to add the bot from where the member was.
Change
bot_not_in_server, the error shows an Add TypeCheck to this server button. It calls the SDK'sopenExternalLinkwith Discord's install URL, with the launching server preselected (guild_id+disable_guild_select=true).installUrl()helper (permissions1374389611526).Once the bot is in the server, sign-in no longer returns
bot_not_in_server, so the button does not appear.Validation
npm run checkclean;npm test383/383 pass, including tests for the error type and the install URL (with and without a preselected server).SHA256SUMSrefreshed and verified.openExternalLinkbehavior needs a launch in a server without the bot.🤖 Generated with Claude Code