Discord Shoot Manager

Period
2026
Contribution
TVM workflow development, adapted from EmailVerify
Status
Public source and regression tests

A Discord bot for TVM, McGill’s student television service, connecting membership verification with private production workspaces. I extended an open-source verification bot with roster administration, shoot management and recovery from interrupted Discord operations.

Connecting membership with production

TVM needs to connect its membership roster with Discord access and give production teams private spaces to organise shoots. These are related tasks, but they involve different information: who belongs to the organisation, which permissions they hold, and which productions they are participating in.

I adapted EmailVerify as the verification foundation, then developed TVM’s roster-management and production workflows around it. Discord Shoot Manager uses Node.js, discord.js and SQLite.

The project extends beyond granting a role after email verification. It manages how access changes over time, how a production workspace moves from setup to archive, and what happens when Discord completes only part of an operation.

Giving each shoot a lifecycle

The production workflow has three main stages:

  1. Set up. An administrator enters a shoot name, location and optional call time. The bot creates a private chat, pins the production details and publishes an invitation in a shared channel.
  2. Join. Members can receive direct invitations or join by reacting to the announcement. The bot checks their eligibility before granting access and updates participation when they leave. Scheduled call times appear in each viewer’s local timezone.
  3. Archive. Closing a shoot moves its chat into the archive. Ordinary participants retain reading access without being able to continue posting, preserving the discussion without leaving every production permanently active. A shoot can also be reopened.
CreateJoinArchive

Click to choose the nearest stage. Arrow keys move between stages; Home and End choose the first and last stage. Space pauses or resumes. Reduced motion disables autoplay.

Illustrated workflow using synthetic members—not a recording. Archive permissions show an ordinary participant’s view.

Create: an administrator publishes a Campus interview shoot invitation. Join: Alex reacts and gains access to the private chat and pinned brief. Archive: the channel moves into the archive; the brief and conversation remain readable, while ordinary participants can no longer post.

These transitions need more than channel creation commands. They need persistent records of the shoot, its participants and its intended state, so the workflow can continue after a restart or interrupted request.

Separating management from visibility

Being allowed to manage the bot should not automatically mean being able to read every production conversation. The application treats administrative authority, ordinary participation and production-wide access separately. Administrators can manage shoots without receiving blanket visibility; a separately assigned production-access role provides that broader access when required.

Membership synchronisation follows a similar ownership boundary. The bot records which membership roles it manages and removes obsolete bot-owned grants when the roster changes. Independently assigned roles remain protected. That distinction prevents roster automation from treating every existing permission as something it owns.

Verification connects one roster email with one Discord account using expiring, attempt-limited codes. The member-facing acknowledgement is sent before eligibility lookup or mail delivery, so the reply does not reveal whether an address is on the roster. Delivery failures are reported privately to operators.

Reviewing changes before applying them

A roster upload replaces the complete active membership list. An accidentally incomplete file could therefore remove eligibility from members who were simply omitted.

Instead of applying an upload immediately, the bot shows a private preview of additions, omissions and tier changes. The same administrator must explicitly confirm the replacement in the original channel.

The preview is also tied to a roster version. If another replacement happens before confirmation, the old preview is rejected rather than overwriting newer information.

Once accepted, the replacement commits in a SQLite transaction. Updating Discord roles happens afterward. This keeps the saved membership decision distinct from the external work needed to reflect it.

Recovering without repeating the original action

SQLite and Discord cannot participate in one shared transaction. The database can save a change while a Discord request fails, or Discord can complete an operation without its response reaching the bot.

I handle those outcomes separately: what was saved, what still needs synchronising, and whether confirmation reached the administrator.

For example, a roster replacement may already be accepted when its confirmation message fails. Repeating the replacement just to obtain a reply would be the wrong recovery action. Status and audit commands expose the accepted state, while reconciliation retries outstanding role updates.

Shoot workspaces use the same underlying principle. Persistent state records the intended lifecycle transition, and recovery markers identify channels and messages created during interrupted operations. The bot can resume synchronisation without blindly creating another workspace.

Not every missing resource should be recreated, however. A deleted shoot channel is reported as missing rather than silently replaced. The persistence and recovery guide describes these boundaries.

Testing the boundaries

The tests use temporary SQLite databases and Discord and mail adapters, making failures reproducible without production member data.

The lost-confirmation regression deliberately makes confirmation delivery fail after a roster replacement has been accepted. It checks that the saved roster remains intact, reconciliation is scheduled once, and the same confirmation cannot apply the replacement again.

Other tests cover stale and concurrent confirmations, permission boundaries and interrupted shoot operations. The important assertions concern saved state and access, not merely whether a success message appeared. A historical CI run passed the test and container jobs for the linked regression’s revision; it is not a live check of later deployments.

The application deliberately runs as one process with one SQLite database per Discord server. Its coordination does not support overlapping replicas. That keeps the deployment bounded, but makes single-instance operation an explicit constraint.

From a TVM workflow to a reusable application

The result connects verified membership, deliberate roster changes and private shoot workspaces within Discord, with persistent state supporting recovery when external operations are interrupted.

I subsequently separated organisation-specific configuration from the shared application. Roles, wording and timezone can vary between independently hosted installations, and shoot management can run without email verification.

This preserves TVM’s workflow without requiring every organisation to inherit its membership setup, or introducing a centrally hosted, multi-server platform.