mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Make updaters optional
This commit is contained in:
parent
f9f72c3c1a
commit
8b9de800d4
4 changed files with 4 additions and 7 deletions
|
@ -24,7 +24,7 @@ class BrawlhallaCommand(Command):
|
|||
|
||||
def __init__(self, interface: CommandInterface):
|
||||
super().__init__(interface)
|
||||
if self.interface.name == "telegram":
|
||||
if self.interface.name == "telegram" and self.config["Brawlhalla"]["updater"]:
|
||||
self.loop.create_task(self._updater(7200))
|
||||
|
||||
async def _send(self, message):
|
||||
|
@ -44,13 +44,10 @@ class BrawlhallaCommand(Command):
|
|||
string.append(f"[b]{bh.rank_1v1}[/b] ({bh.rating_1v1} MMR)")
|
||||
string.append("")
|
||||
|
||||
duos = bh.duos
|
||||
|
||||
if len(bh.duos) != 0:
|
||||
string.append(f"👥 [b]2v2[/b]")
|
||||
|
||||
for duo in bh.duos:
|
||||
|
||||
other = duo.other(bh)
|
||||
string.append(f"Con [b]{other.steam.user}[/b]: [b]{duo.rank_2v2}[/b] ({duo.rating_2v2} MMR)")
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class DotaCommand(Command):
|
|||
|
||||
def __init__(self, interface: CommandInterface):
|
||||
super().__init__(interface)
|
||||
if self.interface.name == "telegram":
|
||||
if self.interface.name == "telegram" and self.config["Dota"]["updater"]:
|
||||
self.loop.create_task(self._updater(7200))
|
||||
|
||||
async def _send(self, message):
|
||||
|
|
|
@ -24,7 +24,7 @@ class LeagueoflegendsCommand(Command):
|
|||
def __init__(self, interface: CommandInterface):
|
||||
super().__init__(interface)
|
||||
self._riotwatcher = riotwatcher.RiotWatcher(api_key=self.config["Lol"]["token"])
|
||||
if self.interface.name == "telegram":
|
||||
if self.interface.name == "telegram" and self.config["Lol"]["updater"]:
|
||||
self.loop.create_task(self._updater(7200))
|
||||
|
||||
async def _send(self, message):
|
||||
|
|
|
@ -109,7 +109,7 @@ class MatchmakingCommand(Command):
|
|||
callback_data=f"mm{mmevent.mmid}_LATE_SHORT"),
|
||||
InKB(f"{MMChoice.LATE_MEDIUM.value} 30 min",
|
||||
callback_data=f"mm{mmevent.mmid}_LATE_MEDIUM"),
|
||||
InKB(f"{MMChoice.LATE_LONG.value} 60 min",
|
||||
InKB(f"{MMChoice.LATE_LONG.value} 60+ min",
|
||||
callback_data=f"mm{mmevent.mmid}_LATE_LONG"),
|
||||
],
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue