mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-20 02:26:32 +01:00
debug voice
This commit is contained in:
parent
6306200c49
commit
1e9d4a4f94
1 changed files with 11 additions and 3 deletions
|
@ -234,9 +234,18 @@ class Events(commands.Cog):
|
||||||
await message.channel.trigger_typing()
|
await message.channel.trigger_typing()
|
||||||
await message.reply("Unmute me >:(", file=discord.File(file))
|
await message.reply("Unmute me >:(", file=discord.File(file))
|
||||||
else:
|
else:
|
||||||
|
def after(e):
|
||||||
|
asyncio.run_coroutine_threadsafe(
|
||||||
|
voice.disconnect(),
|
||||||
|
self.bot.loop
|
||||||
|
)
|
||||||
|
if e is not None:
|
||||||
|
console.log(f"Error playing audio: {e}")
|
||||||
|
|
||||||
|
src = discord.FFmpegPCMAudio(str(file.absolute()), stderr=subprocess.DEVNULL)
|
||||||
voice.play(
|
voice.play(
|
||||||
discord.FFmpegPCMAudio(str(file), stderr=subprocess.DEVNULL),
|
src,
|
||||||
after=lambda _: asyncio.run_coroutine_threadsafe(
|
after=lambda e: asyncio.run_coroutine_threadsafe(
|
||||||
voice.disconnect(),
|
voice.disconnect(),
|
||||||
self.bot.loop
|
self.bot.loop
|
||||||
)
|
)
|
||||||
|
@ -246,7 +255,6 @@ class Events(commands.Cog):
|
||||||
await message.reply(file=discord.File(file))
|
await message.reply(file=discord.File(file))
|
||||||
|
|
||||||
if "linux" in message.content.lower() and self.bot.user in message.mentions:
|
if "linux" in message.content.lower() and self.bot.user in message.mentions:
|
||||||
console.log(f"Responding to {message.author} with linux copypasta")
|
|
||||||
try:
|
try:
|
||||||
with open("./assets/copypasta.txt", "r") as f:
|
with open("./assets/copypasta.txt", "r") as f:
|
||||||
await message.reply(f.read())
|
await message.reply(f.read())
|
||||||
|
|
Loading…
Reference in a new issue