From 2443f0fab1eae5624fb423223046b75b5e130de3 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Sun, 4 Feb 2024 19:29:26 +0100 Subject: [PATCH] Fix r9k for non-user messages --- plugins/imaging.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/imaging.py b/plugins/imaging.py index 07f1ba1..331717c 100644 --- a/plugins/imaging.py +++ b/plugins/imaging.py @@ -335,8 +335,9 @@ async def robot9000(self, ctx: commands.Context, *, text_query: Optional[str] = 'wcześniejszych wystąpień', ) embed.title = ( - f'🤖 Wykryłem {occurences_form} na serwerze obrazka wysłanego przez {sent_by.display_name} o ' - f'{base_image9000.sent_at.strftime("%-H:%M")}' + f'🤖 Wykryłem {occurences_form} na serwerze obrazka wysłanego ' + + f"przez {sent_by.display_name} " if sent_by is not None else "" + + f'o {base_image9000.sent_at.strftime("%-H:%M")}' ) else: embed = self.bot.generate_embed(