mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
I hate voice
This commit is contained in:
parent
2054a3ee5a
commit
72d4460e08
1 changed files with 2 additions and 5 deletions
|
@ -228,7 +228,7 @@ class Events(commands.Cog):
|
|||
if message.author.voice is not None and message.author.voice.channel is not None:
|
||||
voice: discord.VoiceClient = None
|
||||
if message.guild.me.voice is not None:
|
||||
voice = message.guild.me.voice
|
||||
voice = message.guild.voice_client
|
||||
else:
|
||||
voice = await message.author.voice.channel.connect()
|
||||
|
||||
|
@ -251,10 +251,7 @@ class Events(commands.Cog):
|
|||
src = discord.FFmpegPCMAudio(str(file.absolute()), stderr=subprocess.DEVNULL)
|
||||
voice.play(
|
||||
src,
|
||||
after=lambda e: asyncio.run_coroutine_threadsafe(
|
||||
voice.disconnect(),
|
||||
self.bot.loop
|
||||
)
|
||||
after=after
|
||||
)
|
||||
else:
|
||||
await message.channel.trigger_typing()
|
||||
|
|
Loading…
Reference in a new issue