diff options
Diffstat (limited to 'cogs/music/play.py')
| -rw-r--r-- | cogs/music/play.py | 3 |
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] |
