feat: show "join our community" modal on game load if player is not in the Discord server #133

Closed
opened 2026-03-24 16:43:52 -07:00 by hikari · 0 comments
Owner

Overview

When a player loads the game and is not a member of the NHCarrigan Discord server, show a dismissible modal inviting them to join. This gives players an easy on-ramp to the community without being intrusive.

Depends on #132, which adds the inGuild flag to the Player record and keeps it in sync via OAuth and bot events.


Implementation

Backend

  • inGuild is stored on the Player record and maintained by #132 — no extra Discord API calls needed at load time.
  • Return inGuild: boolean from the load endpoint so the client has it on every game load.

Frontend

  • On game load, if inGuild === false, show a modal with:
    • A friendly invite message
    • A "Join the Community" button linking to the Discord invite
    • A "Maybe Later" dismiss button
  • The modal should only show once per session — if the player dismisses it, don't show it again until their next session (use session storage so it reappears on next visit but doesn't spam mid-session).

Task Checklist

  • Add inGuild: boolean to LoadResponse type
  • Return inGuild from the load endpoint
  • Build the "Join our community" modal component
  • Show the modal on game load if inGuild === false (once per session)

This issue was created with help from Hikari~ 🌸

## Overview When a player loads the game and is not a member of the NHCarrigan Discord server, show a dismissible modal inviting them to join. This gives players an easy on-ramp to the community without being intrusive. Depends on #132, which adds the `inGuild` flag to the Player record and keeps it in sync via OAuth and bot events. --- ## Implementation ### Backend - `inGuild` is stored on the Player record and maintained by #132 — no extra Discord API calls needed at load time. - Return `inGuild: boolean` from the load endpoint so the client has it on every game load. ### Frontend - On game load, if `inGuild === false`, show a modal with: - A friendly invite message - A **"Join the Community"** button linking to the Discord invite - A **"Maybe Later"** dismiss button - The modal should only show **once per session** — if the player dismisses it, don't show it again until their next session (use session storage so it reappears on next visit but doesn't spam mid-session). --- ## Task Checklist - [ ] Add `inGuild: boolean` to `LoadResponse` type - [ ] Return `inGuild` from the load endpoint - [ ] Build the "Join our community" modal component - [ ] Show the modal on game load if `inGuild === false` (once per session) --- ✨ This issue was created with help from Hikari~ 🌸
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nhcarrigan/elysium#133