mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-30 22:05:28 +00:00
Fix duplicated commands in Message.command
Also add more test cases Related to #676
This commit is contained in:
@@ -103,6 +103,14 @@ async def test_with_mention():
|
||||
async def test_with_args():
|
||||
f = filters.command("start")
|
||||
|
||||
m = Message("/start")
|
||||
await f(c, m)
|
||||
assert m.command == ["start"]
|
||||
|
||||
m = Message("/start@username")
|
||||
await f(c, m)
|
||||
assert m.command == ["start"]
|
||||
|
||||
m = Message("/start a b c")
|
||||
await f(c, m)
|
||||
assert m.command == ["start"] + list("abc")
|
||||
|
Reference in New Issue
Block a user