plugins/marquee: Ensure a message is sent before correcting
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
4f9e734a7f
commit
1322c2b1c8
1 changed files with 4 additions and 2 deletions
|
@ -63,10 +63,12 @@ class Plugin(BasePlugin):
|
||||||
'Replicate the <marquee/> behavior in a message')
|
'Replicate the <marquee/> behavior in a message')
|
||||||
|
|
||||||
@command_args_parser.raw
|
@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()
|
tab = self.api.current_tab()
|
||||||
args = xhtml.clean_text(xhtml.convert_simple_to_full_colors(args))
|
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)
|
is_muctab = isinstance(tab, tabs.MucTab)
|
||||||
msg_id = tab.last_sent_message["id"]
|
msg_id = tab.last_sent_message["id"]
|
||||||
jid = tab.jid
|
jid = tab.jid
|
||||||
|
|
Loading…
Reference in a new issue