aboutsummaryrefslogtreecommitdiffstats
path: root/cogs/music/play.py
diff options
context:
space:
mode:
authorSamlon <stankiewiczgracjan2019@gmail.com>2025-08-11 17:39:21 +0200
committerSamlon <stankiewiczgracjan2019@gmail.com>2025-08-11 17:39:21 +0200
commitca0b4ecf005e1c1f4066460a45393ebffef1ef1c (patch)
tree4c175ba876ae35d9248dfab33d2a981fe3cfb207 /cogs/music/play.py
parentchanged printing to proper logging (diff)
downloadsenator-sperma-ca0b4ecf005e1c1f4066460a45393ebffef1ef1c.tar.gz
senator-sperma-ca0b4ecf005e1c1f4066460a45393ebffef1ef1c.zip
more logging
Diffstat (limited to '')
-rw-r--r--cogs/music/play.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cogs/music/play.py b/cogs/music/play.py
index d902cdc..5664d31 100644
--- a/cogs/music/play.py
+++ b/cogs/music/play.py
@@ -59,6 +59,7 @@ class Play(commands.Cog):
59 source = discord.FFmpegPCMAudio(url2, **ffmpeg_options) 59 source = discord.FFmpegPCMAudio(url2, **ffmpeg_options)
60 vc.play(source, after=after_playing) 60 vc.play(source, after=after_playing)
61 await ctx.followup.send(f"gra: {title}") 61 await ctx.followup.send(f"gra: {title}")
62 logger.info(f"Playing: {title}")
62 except Exception as e: 63 except Exception as e:
63 await ctx.followup.send(f"Wystąpił błąd podczas odtwarzania: {str(e)}") 64 await ctx.followup.send(f"Wystąpił błąd podczas odtwarzania: {str(e)}")
64 65
@@ -68,6 +69,7 @@ class Play(commands.Cog):
68 69
69 if not (ctx.author.voice and ctx.author.voice.channel): 70 if not (ctx.author.voice and ctx.author.voice.channel):
70 await ctx.followup.send("nie jesteś w kanale głosowym") 71 await ctx.followup.send("nie jesteś w kanale głosowym")
72 logger.info("User is not in a voice channel")
71 return 73 return
72 74
73 channel = ctx.author.voice.channel 75 channel = ctx.author.voice.channel
@@ -82,6 +84,7 @@ class Play(commands.Cog):
82 84
83 if not result['result']: 85 if not result['result']:
84 await ctx.followup.send("nie znaleziono wideo dla twojego wyszukiwania.", ephemeral=True) 86 await ctx.followup.send("nie znaleziono wideo dla twojego wyszukiwania.", ephemeral=True)
87 logger.info(f"Could not find a video for your search: {search}")
85 return 88 return
86 89
87 video = result['result'][0] 90 video = result['result'][0]