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])¶ Listcontaining posted patch notesPatches are stored as patch version & ID, as
str(e.g.'1.28.0.1.50148')
-
classmethod coroutine
patchcheck()¶ Executes the patch check operations:
- Scrape Blizzard’s Patch Notes
- Build
Models.Overwatch.OWPostobjects from scraped patch notes - Check patch references against those previously posted
- 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])¶ Listcontaining posted patch notesPatches are stored as permalinks, as
str(e.g.'https://gfycat.com/MajorDiligentIbizanhound')
-
classmethod coroutine
patchcheck()¶ Executes the patch check operations:
- 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
- Build Models.Reddit.RedditPost objects
- Check Gfycat URLs against those previously posted
- 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.PatchNotesParserandoverwatch.PatchRundownParserare called everysleepseconds
Command Reference¶
Commands are prefixed with ~
-
~checkOWrundown Manually invoke the
overwatch.PatchRundownParser.patchcheck()coroutineNote
This command is only enabled for the server owner via DM.
-
~checkOWpatch Manually invoke the
overwatch.PatchNotesParser.patchcheck()coroutineNote
This command is only enabled for the server owner via DM.