BaumSplitter41 1 주 전
부모
커밋
39d95838f3
1개의 변경된 파일6개의 추가작업 그리고 6개의 파일을 삭제
  1. 6 6
      VPD_BOT/cogs/reaction_roles.py

+ 6 - 6
VPD_BOT/cogs/reaction_roles.py

@@ -126,12 +126,12 @@ class reactionroles(commands.Cog):
             print("Roles are not set in config.")
             return
         for role_id in role_ids:
-            if self.bot.get_role(role_id) is None:
+            if guild.get_role(role_id) is None:
                 print(f"Role with ID {role_id} not found.")
                 return
             else:
-                print(f"Role with ID {role_id} found: {self.bot.get_role(role_id).name}")
-        roles = [self.bot.get_role(role_id) for role_id in role_ids]
+                print(f"Role with ID {role_id} found: {guild.get_role(role_id).name}")
+        roles = [guild.get_role(role_id) for role_id in role_ids]
         
         #Add the role to the user
         for emoji, role in zip(emojis, roles):
@@ -167,12 +167,12 @@ class reactionroles(commands.Cog):
             print("Roles are not set in config.")
             return
         for role_id in role_ids:
-            if self.bot.get_role(role_id) is None:
+            if guild.get_role(role_id) is None:
                 print(f"Role with ID {role_id} not found.")
                 return
             else:
-                print(f"Role with ID {role_id} found: {self.bot.get_role(role_id).name}")
-        roles = [self.bot.get_role(role_id) for role_id in role_ids]
+                print(f"Role with ID {role_id} found: {guild.get_role(role_id).name}")
+        roles = [guild.get_role(role_id) for role_id in role_ids]
         
 
         #Add the role to the user