Skip to content
This repository has been archived by the owner on Nov 24, 2019. It is now read-only.

Commit

Permalink
Add channel ID constants & update cogs
Browse files Browse the repository at this point in the history
  • Loading branch information
sco1 committed Oct 28, 2018
1 parent ef3d5da commit 53e6669
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bot/cogs/mhw.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
from bot.models.ManualCheck import ManualCheck
from bot.models.NewsParser import NewsParser
from bot.models.Steam import SteamNewsPost
from bot.utils.Constants import Channels


class MHWNewsParser(NewsParser):
def __init__(self, bot):
super().__init__(bot)
self.postchannelID = 478568995767713793
self.postchannelID = Channels.mhw
self.logJSONpath = Path("./log/postedMHWnews.JSON")
self.appID = 582010
self.officialaccount = "MHW_CAPCOM"
Expand Down
5 changes: 3 additions & 2 deletions bot/cogs/overwatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
from bot.models.NewsParser import NewsParser
from bot.models.Overwatch import OWPatch
from bot.models.Reddit import RedditJSON, RedditPost, RedditPRAW
from bot.utils.Constants import Channels


class PatchRundownParser(NewsParser):
def __init__(self, bot):
super().__init__(bot)
self.postjsonURL = URL("https://www.reddit.com/user/itsjieyang/submitted.json")
self.postchannelID = 477916849879908386
self.postchannelID = Channels.ow
self.logJSONpath = Path("./log/postedRundowns.JSON")

self._parsername = "OW Rundown(s)"
Expand Down Expand Up @@ -117,7 +118,7 @@ class PatchNotesParser(NewsParser):
def __init__(self, bot):
super().__init__(bot)
self.patchesURL = URL("https://playoverwatch.com/en-us/news/patch-notes/pc")
self.postchannelID = 477916849879908386
self.postchannelID = Channels.ow
self.logJSONpath = Path("./log/postedOWpatches.JSON")

self._parsername = "OW Patch(es)"
Expand Down
3 changes: 2 additions & 1 deletion bot/cogs/rocketleague.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
from bot.models.ManualCheck import ManualCheck
from bot.models.NewsParser import NewsParser
from bot.models.Steam import SteamNewsPost
from bot.utils.Constants import Channels


class RLNewsParser(NewsParser):
def __init__(self, bot):
super().__init__(bot)
self.postchannelID = 494682432688226316
self.postchannelID = Channels.rl
self.logJSONpath = Path("./log/postedRLnews.JSON")
self.appID = 252950
self.psyonixstaff = ("dirkened", "psyonix devin")
Expand Down
9 changes: 9 additions & 0 deletions bot/utils/Constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class Channels:
"""
Define channel IDs (as int) for cogs to use
"""

ow = 477916849879908386
mhw = 478568995767713793
rl = 494682432688226316
spacex = 505937665430913024

0 comments on commit 53e6669

Please sign in to comment.