From fe529ddb89f34f8274b7c979a9508966b14c8d7f Mon Sep 17 00:00:00 2001 From: Kronifer <44979306+Kronifer@users.noreply.github.com> Date: Tue, 1 Jun 2021 11:20:10 -0500 Subject: checked if user returns None --- bot/exts/evergreen/avatar_modification/avatar_modify.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bot') diff --git a/bot/exts/evergreen/avatar_modification/avatar_modify.py b/bot/exts/evergreen/avatar_modification/avatar_modify.py index 4ed7f79d..98f5f132 100644 --- a/bot/exts/evergreen/avatar_modification/avatar_modify.py +++ b/bot/exts/evergreen/avatar_modification/avatar_modify.py @@ -127,6 +127,9 @@ class AvatarModify(commands.Cog): if text is None: async with ctx.typing(): user = await self._fetch_user(ctx.author.id) + if not user: + await ctx.send(f"{Emojis.cross_mark} Could not get user info.") + return image_bytes = await user.avatar_url_as(size=1024).read() file_name = file_safe_name("reverse_avatar", ctx.author.display_name) -- cgit v1.2.3