Przeglądaj źródła

added unbanning to modinfo

baumsplitter41 4 miesięcy temu
rodzic
commit
86db9b77fd
1 zmienionych plików z 13 dodań i 0 usunięć
  1. 13 0
      VPD_BOT/main.py

+ 13 - 0
VPD_BOT/main.py

@@ -466,6 +466,19 @@ async def modinfo(
                 inline=False
             )
 
+    cursor.execute(
+        "SELECT moderatorname, reason, date FROM Unbans WHERE userid = %s",
+        (user.id,)
+    )
+    unbans = cursor.fetchall()
+    if unbans:
+        for moderatorname, reason, date in unbans:
+            embed.add_field(
+                name=f"Unbanned by {moderatorname} on {date.strftime('%Y-%m-%d %H:%M:%S')}",
+                value=f"Reason: {reason}",
+                inline=False
+            )
+
     if not warns and not kicks and not bans:
         await ctx.followup.send(f"User {user.mention} has no moderation history.", ephemeral=True)
         return