mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-08 16:04:51 +00:00
Allow empty and multi-character prefixes in Filters.command
This commit is contained in:
parent
36a1015ec9
commit
2125415f8f
1 changed files with 3 additions and 2 deletions
|
|
@ -155,8 +155,9 @@ class Filters:
|
||||||
|
|
||||||
def f(_, m):
|
def f(_, m):
|
||||||
if m.text and m.text.startswith(_.p):
|
if m.text and m.text.startswith(_.p):
|
||||||
c = m.text[1:].split(_.s)[0]
|
t = m.text.split(_.s)
|
||||||
m.command = ([c] + m.text.split(_.s)[1:]) if c in _.c else None
|
c, a = t[0][len(_.p):], t[1:]
|
||||||
|
m.command = ([c] + a) if c in _.c else None
|
||||||
|
|
||||||
return bool(m.command)
|
return bool(m.command)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue