mirror of
https://github.com/allthingslinux/tux.git
synced 2024-10-03 00:53:12 +00:00
fix(cases.py): replace UserConverter with bot.get_user and bot.fetch_user to handle cases where user is not found in cache
This commit is contained in:
parent
8f0c52bbfb
commit
21da371278
1 changed files with 3 additions and 1 deletions
|
@ -152,7 +152,9 @@ class Cases(ModerationCogBase):
|
|||
await ctx.send("Case not found.", delete_after=30)
|
||||
return
|
||||
|
||||
user = await commands.UserConverter().convert(ctx, str(case.case_user_id))
|
||||
user = self.bot.get_user(case.case_user_id)
|
||||
if user is None:
|
||||
user = await self.bot.fetch_user(case.case_user_id)
|
||||
|
||||
await self._handle_case_response(ctx, case, "viewed", case.case_reason, user)
|
||||
|
||||
|
|
Loading…
Reference in a new issue