Skip to content

Add TypeCheck to this server button when the bot is missing - #57

Merged
CompleteDotTech merged 1 commit into
mainfrom
feat/activity-add-bot-button
Oct 19, 2026
Merged

CompleteDotTech merged 1 commit into
mainfrom
feat/activity-add-bot-button

Conversation

@CompleteDotTech

Copy link
Copy Markdown
Contributor

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

  • Only when sign-in returns bot_not_in_server, the error shows an Add TypeCheck to this server button. It calls the SDK's openExternalLink with Discord's install URL, with the launching server preselected (guild_id + disable_guild_select=true).
  • A note under the button: adding the bot requires the Manage Server permission (server owners and Administrators have it).
  • The message now says that Connect in Discord only signs you in and cannot add the bot.
  • The homepage and Activity build the install link from one installUrl() helper (permissions 1374389611526).

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 check clean; npm test 383/383 pass, including tests for the error type and the install URL (with and without a preselected server).
  • SHA256SUMS refreshed and verified.
  • Not verified inside the Discord client: the button's openExternalLink behavior needs a launch in a server without the bot.

🤖 Generated with Claude Code

…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>
@CompleteDotTech
CompleteDotTech merged commit 2a5b3e2 into main Oct 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant