diff options
| author | 2021-06-01 11:20:10 -0500 | |
|---|---|---|
| committer | 2021-06-01 11:20:10 -0500 | |
| commit | fe529ddb89f34f8274b7c979a9508966b14c8d7f (patch) | |
| tree | f98c51c877f13856a6886e5a48de728dbd3e6253 | |
| parent | changes asked for by chris (diff) | |
checked if user returns None
| -rw-r--r-- | bot/exts/evergreen/avatar_modification/avatar_modify.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |