From 43d0f7f9bcc29a8e35419466d5ce557bba9bbd73 Mon Sep 17 00:00:00 2001 From: Daste Date: Fri, 10 Mar 2023 17:10:27 +0100 Subject: [PATCH] Utility: Make command error messages ephemeral --- nagatoro/extensions/utility.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/nagatoro/extensions/utility.py b/nagatoro/extensions/utility.py index 27177cf..c3e41c1 100644 --- a/nagatoro/extensions/utility.py +++ b/nagatoro/extensions/utility.py @@ -29,18 +29,21 @@ async def avatar( if profile == "server": if itx.guild is None: return await itx.response.send_message( - f"The server profile is only supported on servers" + f"The server profile is only supported on servers", + ephemeral=True, ) elif isinstance(user, User): return await itx.response.send_message( - f"{user} is not a member of this server" + f"{user} is not a member of this server", + ephemeral=True, ) elif isinstance(user, Member): if user.guild_avatar is None: return await itx.response.send_message( - f"{user} doesn't have a server avatar" + f"{user} doesn't have a server avatar", + ephemeral=True, ) else: avatar = user.guild_avatar @@ -57,7 +60,8 @@ async def avatar( if format == "gif" and not avatar.is_animated(): return await itx.response.send_message( - f"{user} doesn't have an animated avatar, please use a different format" + f"{user} doesn't have an animated avatar, please use a different format", + ephemeral=True, ) elif format is None: @@ -86,11 +90,15 @@ async def banner( user = await self.bot.fetch_user(user.id) if user.banner is None: - return await itx.response.send_message(f"{user} doesn't have a banner") + return await itx.response.send_message( + f"{user} doesn't have a banner", + ephemeral=True, + ) if format == "gif" and not user.banner.is_animated(): return await itx.response.send_message( - f"{user} doesn't have an animated banner, please use a different format" + f"{user} doesn't have an animated banner, please use a different format", + ephemeral=True, ) if format is None: