Skip to content

Reference

Event Bot

The Discord bot used to automate slotting, survey delivery, and event data collection for UOAF BMS events.

Purpose

Facilitate the organization of UOAF BMS events by automating routine tasks with an easy-to-use Discord bot.

Usage

The bot does not need to join a voice channel. Commands can be issued by any UOAF member with the roster role. Suggested channels include the Briefing Room, #bot-commands, or #bot-testing.

Starting an Event

Use:

/start-event <event number>

What it does:

  • Looks up the signup sheet for the event in Google Drive using the filename pattern Signup <event number>.
  • If exactly one matching sheet is found, starts the event and enters slotting mode for 15 minutes.
  • During slotting mode, compares the Discord users in the UOAF Briefing Room against the user names in the signup sheet.
  • Uses the Discord display name when present, otherwise the unique Discord username.
  • Colors missing users, or no-shows, red in the signup sheet.
  • Mentions unslotted users in Discord if they joined the briefing room but are not in the sheet.

Moderator goal:

  • Make sure every participant is slotted.
  • Only slotted users later receive the DM containing the survey link.

Constraint:

  • Only one event can be active at a time.

Restarting Slotting

Use:

/slot <optional: duration in minutes>

Behavior:

  • Without a duration, updates slotting exactly once.
  • With a duration, reruns slotting continuously for that number of minutes.

Important note:

  • Make sure all participants are already in the briefing room when using this command, because any prior slotting state will be overwritten.

Ending an Event

Use:

/end-event

What it does:

  • Ends the current event.
  • Copies an existing Google Forms survey and renames it to UOAF <event number> Post Event Survey.
  • Updates the survey description with the event number.
  • Sends the survey text and participation link to each slotted participant.
  • Queues the survey for entry into the UOAF BMS Engagement Data sheet 72 hours later.
  • Posts survey results to #metrics-and-event-performance.

Note:

  • Survey forms may remain open indefinitely if they are not closed manually.

Event Data

Additional event data is gathered as follows:

  • Package commander information comes from signup-sheet checkboxes.
  • Fraggers are queried from the event-list channel by event number using the :Fragger: reactions.
  • The moderator is the Discord user who started the event.
  • Sent Survey out and Metrics Collector are both set to UOAF Eventbot.

Displaying and Refreshing Survey Data

Use:

/survey <event number>

What it does:

  • Finds the event in the Engagement sheet.
  • Finds the matching survey in Google Forms.
  • Refreshes the event data using the most current survey answers.
  • Outputs the updated data in the Discord channel where the command was issued.

Displaying Bot Status

Use:

/status

What it does:

  • Shows a brief status for the current event, if one is active.
  • Shows pending event surveys.

Installation and Deployment

  • Set the Discord token in an environment variable named DISCORD_TOKEN.
  • Store Google credentials in credentials.json.
  • Logs are written to uoaf-eventbot.log.
  • The documented setup flow is:

text pip3 install -r requirements.txt