From ae9afac95481a9bb5f3c96e2920ec372a8939cc8 Mon Sep 17 00:00:00 2001 From: Matteo Bertucci Date: Tue, 6 Apr 2021 14:51:21 +0200 Subject: Properly handle the lack of nomination of a user --- bot/exts/recruitment/talentpool/_cog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/exts/recruitment/talentpool/_cog.py b/bot/exts/recruitment/talentpool/_cog.py index eeba1b187..a49543806 100644 --- a/bot/exts/recruitment/talentpool/_cog.py +++ b/bot/exts/recruitment/talentpool/_cog.py @@ -338,9 +338,9 @@ class TalentPool(WatchChannel, Cog, name="Talentpool"): @has_any_role(*MODERATION_ROLES) async def get_review(self, ctx: Context, user_id: int) -> None: """Get the user's review as a markdown file.""" - review = StringIO((await self.reviewer.make_review(user_id))[0]) + review = (await self.reviewer.make_review(user_id))[0] if review: - file = discord.File(review, f"{user_id}_review.md") + file = discord.File(StringIO(review), f"{user_id}_review.md") await ctx.send(file=file) else: await ctx.send(f"There doesn't appear to be an active nomination for {user_id}") -- cgit v1.2.3