Quellcode durchsuchen

edited the names of the cfg imports

BaumSplitter41 vor 2 Wochen
Ursprung
Commit
c6b9f50c5b
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      VPD_BOT/main.py

+ 4 - 4
VPD_BOT/main.py

@@ -57,8 +57,8 @@ config = configparser.RawConfigParser()
 configFilePath = r'config.cfg'
 config.read_file(open(configFilePath))
 
-label_rules = config.get('Reactionroles Rules', 'label_rules')
-roles_rules = config.get('Reactionroles Rules', 'rules_roles').split(",")
+label_rules = config.get('Reactionroles', 'label_rules')
+roles_rules = config.get('Reactionroles', 'rules_roles').split(",")
 roles_rules = [role.strip() for role in roles_rules if role.strip()]
 
 channel_status_log = config.get('Logs', 'status_log')
@@ -280,6 +280,8 @@ async def ban(
         )
         conn.commit()
 
+    except discord.NotFound:
+        await ctx.respond("Error: User not found.", ephemeral=True)
     except discord.Forbidden:
         await ctx.respond("Error: I don't have permission to ban this user.", ephemeral=True)
     except discord.HTTPException as e:
@@ -765,8 +767,6 @@ async def update_users_periodically():
         await asyncio.sleep(60)  # Update every minute
 
 
-
-
 #_________________________________#
 #---------------------------------#
 #Run function