Skip to content

Commit

Permalink
not needed convert args to -> tuple -> list (#532)
Browse files Browse the repository at this point in the history
* not needed convert args to -> tuple -> list

* fix check reply on is None
  • Loading branch information
ArtemIsmagilov authored Dec 5, 2024
1 parent b1e36ac commit 2866624
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmpy_bot/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2866624

Please sign in to comment.