2
0
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:
Dan
2021-05-06 19:20:12 +02:00
parent 4fc4501445
commit 636ff776d6
2 changed files with 9 additions and 1 deletions

View File

@@ -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")