From 1322c2b1c8215c452782d6f712c92f852eafb84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 29 Mar 2022 15:54:51 +0200 Subject: [PATCH] plugins/marquee: Ensure a message is sent before correcting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/marquee.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/marquee.py b/plugins/marquee.py index 2fea3ed6..66ec8b70 100644 --- a/plugins/marquee.py +++ b/plugins/marquee.py @@ -63,10 +63,12 @@ class Plugin(BasePlugin): 'Replicate the behavior in a message') @command_args_parser.raw - def command_marquee(self, args): + async def command_marquee(self, args): + if not args: + return None tab = self.api.current_tab() args = xhtml.clean_text(xhtml.convert_simple_to_full_colors(args)) - asyncio.ensure_future(tab.command_say(args)) + await tab.command_say(args) is_muctab = isinstance(tab, tabs.MucTab) msg_id = tab.last_sent_message["id"] jid = tab.jid