try fix 4? (2)

This commit is contained in:
Amazed 2020-09-01 00:18:56 +02:00
parent 1361c4fc91
commit 1db2cf35f6

View File

@ -136,7 +136,7 @@ class WynncraftCog(commands.Cog):
# get max_combat_lvl_class # get max_combat_lvl_class
if not max_combat_lvl_class or cl["professions"]["combat"]["level"] > max_combat_lvl_class["professions"]["combat"]["level"]: if not max_combat_lvl_class or cl["professions"]["combat"]["level"] > max_combat_lvl_class["professions"]["combat"]["level"]:
await self._log("cl: %s, max_combat_lvl_class: %s" % (cl, max_combat_lvl_class)) # await self._log("cl: %s, max_combat_lvl_class: %s" % (cl, max_combat_lvl_class))
max_combat_lvl_class = cl max_combat_lvl_class = cl
await self._log("Setting max_combat_lvl_class role") await self._log("Setting max_combat_lvl_class role")
@ -148,7 +148,7 @@ class WynncraftCog(commands.Cog):
combat_role_index = max_combat_lvl // 10 combat_role_index = max_combat_lvl // 10
if combat_role_index > 10: combat_role_index = 10 if combat_role_index > 10: combat_role_index = 10
combat_role_id = roles_combat_level[combat_role_index] combat_role_id = roles_combat_level[combat_role_index]
combat_role = self.bot.get_role(combat_role_id) combat_role = guild.get_role(combat_role_id)
if combat_role not in discord_member.roles: if combat_role not in discord_member.roles:
await self._log("Add role: %s" % combat_role) await self._log("Add role: %s" % combat_role)
# await discord_member.add_roles(combat_role) # await discord_member.add_roles(combat_role)