Преглед на файлове

added logging on moving user from voice channel both channels are displayed

BaumSplitter41 преди 3 седмици
родител
ревизия
e65a68cd7b
променени са 1 файла, в които са добавени 8 реда и са изтрити 5 реда
  1. 8 5
      VPD_BOT/cogs/logs.py

+ 8 - 5
VPD_BOT/cogs/logs.py

@@ -277,19 +277,22 @@ class actionlog(commands.Cog):
 
         if before.channel is None and after.channel is not None:
             action = "joined"
-            channel = after.channel
+            channel1 = after.channel
+            channel2 = None
         elif before.channel is not None and after.channel is None:
             action = "left"
-            channel = before.channel
+            channel1 = before.channel
+            channel2 = None
         elif before.channel is not None and after.channel is not None and before.channel != after.channel:
-            action = "moved from"
-            channel = before.channel
+            channel1 = before.channel
+            channel2 = after.channel
+            action = "moved from to"
         else:
             return
 
         embed = discord.Embed(
             title="Voice State Updated",
-            description=f"{member.mention} has {action} the voice channel {channel.mention}.",
+            description=f"{member.mention} has {action} the voice channel {channel1.mention} {channel2.mention}.",
             color=discord.Color.purple(),
             timestamp=discord.utils.utcnow()
         )