From 2866624ab2b57201da26c528ba2471be19d94da8 Mon Sep 17 00:00:00 2001 From: ArtemIsmagilov <118372045+ArtemIsmagilov@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:25:57 +0400 Subject: [PATCH] not needed convert args to -> tuple -> list (#532) * not needed convert args to -> tuple -> list * fix check reply on is None --- mmpy_bot/function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmpy_bot/function.py b/mmpy_bot/function.py index 7b6b0ded..c738937e 100644 --- a/mmpy_bot/function.py +++ b/mmpy_bot/function.py @@ -155,10 +155,10 @@ def __call__(self, message: Message, *args): assert len(args) <= 1 # There is only one group, (.*)? if len(args) == 1: # Turn space-separated string into list - args = tuple(shlex.split(args[0])) + args = shlex.split(args[0]) try: ctx = self.function.make_context( - info_name=self.plugin.__class__.__name__, args=list(args) + info_name=self.plugin.__class__.__name__, args=args ) ctx.params.update({"self": self.plugin, "message": message}) return self.function.invoke(ctx)