reply with the file when possible

This commit is contained in:
nexy7574 2023-03-22 16:11:12 +00:00
parent c52a908064
commit 809638b1dc
2 changed files with 6 additions and 1 deletions

View file

@ -1,4 +1,4 @@
{ {
"python.linting.pycodestyleEnabled": true, "python.linting.pycodestyleEnabled": true,
"python.linting.enabled": true "python.linting.enabled": false
} }

View file

@ -242,6 +242,11 @@ class Events(commands.Cog):
try: try:
voice = await message.author.voice.channel.connect(timeout=10, reconnect=False) voice = await message.author.voice.channel.connect(timeout=10, reconnect=False)
except asyncio.TimeoutError: except asyncio.TimeoutError:
await message.channel.trigger_typing()
await message.reply(
"I'd play the song but discord's voice servers are shit.",
file=discord.File(file)
)
region = message.author.voice.channel.rtc_region region = message.author.voice.channel.rtc_region
console.log( console.log(
"Timed out connecting to voice channel: {0.name} in {0.guild.name} " "Timed out connecting to voice channel: {0.name} in {0.guild.name} "