Skip to content

Implement: libowski-bot-view-vikes-tv.md - #2

Merged
emb417 merged 1 commit into
mainfrom
vault-spec/libowski-bot-view-vikes-tv
Aug 29, 2026
Merged

emb417 merged 1 commit into
mainfrom
vault-spec/libowski-bot-view-vikes-tv

Conversation

@emb417

@emb417 emb417 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Auto-generated from vault spec notes/libowski-bot-view-vikes-tv.md.

Add a slash command /view-vikes-tv that shows the upcoming Minnesota Vikings TV schedule using https://www.vikings.com/schedule/.


Expanded Spec

Problem

Users currently lack a direct way to view the upcoming Minnesota Vikings schedule within Discord. The goal is to provide a convenient slash command that fetches and displays this information, similar to how /view-f1 provides Formula 1 schedules or /view-blazers-tv provides TV listings.

Acceptance Criteria

  1. A new Discord slash command /view-vikes-tv is available and registered with the bot.
  2. Upon execution, the command fetches upcoming game schedule data from https://www.vikings.com/schedule/.
  3. The response is presented as a Discord EmbedBuilder message, following the styling and structure of existing commands like view-f1.
  4. The embed displays details for at least the next 5-10 upcoming Minnesota Vikings games (or all available upcoming games if fewer than 10).
  5. Each game entry in the embed clearly includes:
    • Opponent
    • Game Date and Time (parsed and presented in a user-friendly format, including timezone information or local conversion if feasible)
    • Location (home/away status)
    • Television Broadcast Network (if readily available and extractable from the source page)
  6. The command gracefully handles scenarios where the website data is unavailable, unparseable, or no upcoming games are found, providing an informative message to the user.
  7. The command utilizes interaction.deferReply() and replies ephemerally if invoked within a guild, consistent with src/commands/view-blazers-tv.js and src/commands/view-f1.js.
  8. Usage of the /view-vikes-tv command (including the requesting user) is logged via src/utils/logger.js.

Notes for implementer

  • Create a new command file at src/commands/view-vikes-tv.js. Refer to src/commands/view-f1.js for a strong example of fetching and parsing HTML from an external website.
  • The package.json includes cheerio, which is suitable for parsing the HTML content of https://www.vikings.com/schedule/.
  • The primary implementation challenge will be accurately identifying the specific HTML elements (CSS selectors) on vikings.com/schedule/ that contain the game opponent, date, time, location, and broadcast information. The structure might require careful inspection using browser developer tools.
  • Ensure robust date and time parsing from the scraped text, converting it into a Date object for accurate filtering of "upcoming" games and consistent display within the embed. Consider the timezone of the scraped data versus how it's presented to the user.
  • Implement error handling for network requests (e.g., fetch failing) and for cases where expected HTML elements are not found (indicating a potential change to the website's structure).

@emb417 emb417 added the minor Minor-level semver bump label Aug 29, 2026
@emb417
emb417 merged commit 43f45e7 into main Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Minor-level semver bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant