Overwatch

Parser Reference

class overwatch.PatchNotesParser

Blizzard’s Overwatch Patch Notes Monitor

bot(WumbotClient)

Discord bot instance

patchesURL(yarl.URL)

Blizzard Patch Notes URL

postchannelID(int)

Discord channel ID for patch notes embed

logJSONpath(pathlib.Path)

Path to JSON storage file

postedpatches(List[str])

List containing posted patch notes

Patches are stored as patch version & ID, as str (e.g. '1.28.0.1.50148')

classmethod coroutine patchcheck()

Executes the patch check operations:

  1. Scrape Blizzard’s Patch Notes
  2. Build Models.Overwatch.OWPost objects from scraped patch notes
  3. Check patch references against those previously posted
  4. If new patch(es): Build embed, post to channel, and save the patch reference(s) to the local JSON log
class overwatch.PatchRundownParser

Reddit user /u/itsjieyang’s Overwatch patch rundown monitor

Rundows are currently posted as:
  • Gfycat - Brief summary
  • Youtube Video - Extended rundown
  • Streamable - Brief/extended rundown
bot(WumbotClient)

Discord bot instance

postjsonURL(yarl.URL)

Reddit’s JSON URL for /u/itsjieyang’s submissions

postchannelID(int)

Discord channel ID for patch notes embed

logJSONpath(pathlib.Path)

Path to JSON storage file

postedrundowns(List[str])

List containing posted patch notes

Patches are stored as permalinks, as str (e.g. 'https://gfycat.com/MajorDiligentIbizanhound')

classmethod coroutine patchcheck()

Executes the patch check operations:

  1. Parse /u/itsjieyang’s submissions for submissions to /r/overwatch

Note

An attempt is made to open an authenticated PRAW session to query submissions. If a session cannot be generated, Reddit’s JSON is used as a fallback

  1. Build Models.Reddit.RedditPost objects
  2. Check Gfycat URLs against those previously posted
  3. If new patch rundown(s): Build embed, post to channel, and save the permalink to the local JSON log
static gfygif(inURL: typing.Union[str, yarl.URL]) → yarl.URL

Build a direct GIF link from a Gfycat URL

>>> from cogs import overwatch
>>> gifURL = overwatch.PatchGifParser.gfygif('https://gfycat.com/MajorDiligentIbizanhound')
>>> print(gif)
https://giant.gfycat.com/MajorDiligentIbizanhound.gif
coroutine patchchecktimer(client: WumbotClient, sleepseconds: int=3600)

Asynchronous patch checking loop for use with Discord.py’s event loop

overwatch.PatchNotesParser and overwatch.PatchRundownParser are called every sleepseconds

Command Reference

Commands are prefixed with ~

~checkOWrundown

Manually invoke the overwatch.PatchRundownParser.patchcheck() coroutine

Note

This command is only enabled for the server owner via DM.

~checkOWpatch

Manually invoke the overwatch.PatchNotesParser.patchcheck() coroutine

Note

This command is only enabled for the server owner via DM.