aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2025-09-26 09:39:32 +0200
committersalmonik <raisersoft@proton.me>2025-09-26 09:39:32 +0200
commitbfc9d1314e090fb0dfe6004bf7829733e2f73602 (patch)
treeaa53be8e8e7d0fd8c34b89c0ea4dabaffcc7803f
parentbump requirements (diff)
parentMerge pull request 'usunąłem sperme' (#2) from Pucio/senator-sperma:main in... (diff)
downloadsenator-sperma-bfc9d1314e090fb0dfe6004bf7829733e2f73602.tar.gz
senator-sperma-bfc9d1314e090fb0dfe6004bf7829733e2f73602.zip
Merge remote-tracking branch 'origin/main'
Diffstat (limited to '')
-rw-r--r--.idea/.gitignore8
-rw-r--r--TODO.md1
-rw-r--r--cogs/vclogs.py14
3 files changed, 10 insertions, 13 deletions
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 13566b8..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
1# Default ignored files
2/shelf/
3/workspace.xml
4# Editor-based HTTP Client requests
5/httpRequests/
6# Datasource local storage ignored files
7/dataSources/
8/dataSources.local.xml
diff --git a/TODO.md b/TODO.md
index 5d7d62e..8655d2e 100644
--- a/TODO.md
+++ b/TODO.md
@@ -25,3 +25,4 @@
25 25
26## String settings 26## String settings
27 - User can easily change user visible strings in a settings file 27 - User can easily change user visible strings in a settings file
28
diff --git a/cogs/vclogs.py b/cogs/vclogs.py
index 01297a6..7bf179c 100644
--- a/cogs/vclogs.py
+++ b/cogs/vclogs.py
@@ -70,10 +70,14 @@ class VcLogs(commands.Cog):
70 70
71 # Connect to the voice channel if not already connected 71 # Connect to the voice channel if not already connected
72 voice_client = discord.utils.get(self.bot.voice_clients, guild=channel.guild) 72 voice_client = discord.utils.get(self.bot.voice_clients, guild=channel.guild)
73 if not isinstance(voice_client, discord.VoiceClient): 73 try:
74 voice_client = await channel.connect() 74 if not isinstance(voice_client, discord.VoiceClient):
75 elif voice_client.channel != channel: 75 voice_client = await channel.connect()
76 await voice_client.move_to(channel) 76 elif voice_client.channel != channel:
77 await voice_client.move_to(channel)
78 except discord.errors.ClientException as e:
79 if str(e) == "Not connected to voice.":
80 voice_client = await channel.connect()
77 81
78 # Play the TTS audio 82 # Play the TTS audio
79 if not voice_client.is_playing(): 83 if not voice_client.is_playing():
@@ -143,4 +147,4 @@ class VcLogs(commands.Cog):
143 147
144 148
145def setup(bot): 149def setup(bot):
146 bot.add_cog(VcLogs(bot)) \ No newline at end of file 150 bot.add_cog(VcLogs(bot))