Implement: libowski-bot-view-vikes-tv.md - #2
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Auto-generated from vault spec
notes/libowski-bot-view-vikes-tv.md.Add a slash command
/view-vikes-tvthat 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-f1provides Formula 1 schedules or/view-blazers-tvprovides TV listings.Acceptance Criteria
/view-vikes-tvis available and registered with the bot.https://www.vikings.com/schedule/.EmbedBuildermessage, following the styling and structure of existing commands likeview-f1.interaction.deferReply()and replies ephemerally if invoked within a guild, consistent withsrc/commands/view-blazers-tv.jsandsrc/commands/view-f1.js./view-vikes-tvcommand (including the requesting user) is logged viasrc/utils/logger.js.Notes for implementer
src/commands/view-vikes-tv.js. Refer tosrc/commands/view-f1.jsfor a strong example of fetching and parsing HTML from an external website.package.jsonincludescheerio, which is suitable for parsing the HTML content ofhttps://www.vikings.com/schedule/.vikings.com/schedule/that contain the game opponent, date, time, location, and broadcast information. The structure might require careful inspection using browser developer tools.Dateobject 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.fetchfailing) and for cases where expected HTML elements are not found (indicating a potential change to the website's structure).