aboutsummaryrefslogtreecommitdiffstats
path: root/cogs/tts.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cogs/tts.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cogs/tts.py b/cogs/tts.py
index 2481ab3..dceb26c 100644
--- a/cogs/tts.py
+++ b/cogs/tts.py
@@ -4,6 +4,9 @@ import os
4import discord 4import discord
5from discord.ext import commands 5from discord.ext import commands
6from gtts import gTTS 6from gtts import gTTS
7import logging
8
9logger = logging.getLogger(__name__)
7 10
8 11
9class TTS(commands.Cog): 12class TTS(commands.Cog):
@@ -24,6 +27,7 @@ class TTS(commands.Cog):
24 # Check if the user is in a voice channel 27 # Check if the user is in a voice channel
25 if not (ctx.author.voice and ctx.author.voice.channel): 28 if not (ctx.author.voice and ctx.author.voice.channel):
26 await ctx.respond("Musisz być na kanale głosowym, aby odtworzyć TTS!", ephemeral=True) 29 await ctx.respond("Musisz być na kanale głosowym, aby odtworzyć TTS!", ephemeral=True)
30 logger.info("tts: User is not in a voice channel")
27 os.remove('tts.mp3') 31 os.remove('tts.mp3')
28 return 32 return
29 channel = ctx.author.voice.channel 33 channel = ctx.author.voice.channel