From d85fb260e74bffcf9374b44285ad6d461d9eb7dd Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Wed, 6 Nov 2019 14:41:18 -0800 Subject: [PATCH] [Audio] Expose FriendlyException on play command (#3085) * [Audio] Expose FriendlyException on play command * Add changelog --- changelog.d/audio/3085.enhance.1.rst | 1 + redbot/cogs/audio/audio.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog.d/audio/3085.enhance.1.rst diff --git a/changelog.d/audio/3085.enhance.1.rst b/changelog.d/audio/3085.enhance.1.rst new file mode 100644 index 000000000..4106637b2 --- /dev/null +++ b/changelog.d/audio/3085.enhance.1.rst @@ -0,0 +1 @@ +Expose FriendlyExceptions to users on the play command. diff --git a/redbot/cogs/audio/audio.py b/redbot/cogs/audio/audio.py index e25cbda83..e442b80af 100644 --- a/redbot/cogs/audio/audio.py +++ b/redbot/cogs/audio/audio.py @@ -2835,6 +2835,8 @@ class Audio(commands.Cog): if not tracks: self._play_lock(ctx, False) embed = discord.Embed(title=_("Nothing found."), colour=await ctx.embed_colour()) + if result.exception_message: + embed.set_footer(text=result.exception_message) if await self.config.use_external_lavalink() and query.is_local: embed.description = _( "Local tracks will not work "