fixed rwf command

This commit is contained in:
Lukas 2022-03-21 00:03:47 +01:00
parent 8cac1a7da4
commit 05b11aafc8
2 changed files with 9 additions and 2 deletions

View File

@ -124,6 +124,9 @@ class TSbot:
commands.ticker(self, "")
# Hijacked for WoW
commands.rwf(self)
else:
pass

View File

@ -196,6 +196,10 @@ def rename(self, invkr_id, parameter):
def rwf(self):
"""
Refresh the WoW progress channel,
this is very specific to my use, you can disable this in the config.
"""
url = "https://raider.io/api/v1/raiding/progression?raid=sepulcher-of-the-first-ones&difficulty=mythic&region=world"
data = json.loads(requests.get(url).text)
@ -206,10 +210,10 @@ def rwf(self):
prog_min = prog_done
prog_max = len(data['progression'])
channelname = f"Sepulcher {prog_min}/{prog_max}"
channelname = f"[cspacerC3]Sepulcher {prog_min}/{prog_max}"
try:
self.editChannelname(200, channelname)
self.editChannelname(205, channelname)
except ts3.query.TS3QueryError:
pass