diff --git a/src/commands.py b/src/commands.py index 82e0a6a..41eaa27 100644 --- a/src/commands.py +++ b/src/commands.py @@ -4,7 +4,7 @@ TBD __author__ = "Lukas Mahler" __version__ = "0.0.1" -__date__ = "20.03.2022" +__date__ = "21.03.2022" __email__ = "m@hler.eu" __status__ = "Development" @@ -207,15 +207,15 @@ def rwf(self): return prog_done = 0 - for entry in data['progression']: - if entry['totalGuilds'] > 0: - prog_done += 1 - - guilds_done = data['progression'][prog_done-1]['totalGuilds'] - - prog_min = prog_done prog_max = len(data['progression']) - channelname = f"[cspacerC3]Sepulcher {prog_min}/{prog_max} ({guilds_done})" + + for i in range(0, prog_max): + if data['progression'][i]['totalGuilds'] > 0: + prog_done = i + + guilds_done = data['progression'][prog_done]['totalGuilds'] + + channelname = f"[cspacerC3]Sepulcher {prog_done+1}/{prog_max} ({guilds_done})" try: self.editChannelname(205, channelname)