refactor(commands/voice/queue): separate typing trigger error handling
In case this exact call is ratelimited for some reason.
This commit is contained in:
@@ -153,13 +153,17 @@ async def queue_or_play(message, edited=False):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
async with message.channel.typing():
|
await message.channel.trigger_typing()
|
||||||
player = await audio.youtubedl.YTDLSource.from_url(
|
except Exception:
|
||||||
" ".join(query),
|
pass
|
||||||
loop=client.loop,
|
|
||||||
stream=True,
|
try:
|
||||||
)
|
player = await audio.youtubedl.YTDLSource.from_url(
|
||||||
player.volume = float(args.volume) / 100.0
|
" ".join(query),
|
||||||
|
loop=client.loop,
|
||||||
|
stream=True,
|
||||||
|
)
|
||||||
|
player.volume = float(args.volume) / 100.0
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await utils.reply(message, f"failed to queue: `{e}`")
|
await utils.reply(message, f"failed to queue: `{e}`")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user