mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-04 22:34:52 +00:00
Use sets instead of lists or tuples
For faster checks
This commit is contained in:
parent
793ecc2ab5
commit
f553e521ce
1 changed files with 3 additions and 3 deletions
|
|
@ -41,9 +41,9 @@ class Filters:
|
||||||
and (m.text[1:].split()[0] in _.c)
|
and (m.text[1:].split()[0] in _.c)
|
||||||
),
|
),
|
||||||
c=(
|
c=(
|
||||||
[command]
|
{command}
|
||||||
if not isinstance(command, list)
|
if not isinstance(command, list)
|
||||||
else command
|
else {c for c in command}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ class Filters:
|
||||||
venue = build("Venue", lambda _, m: bool(m.venue))
|
venue = build("Venue", lambda _, m: bool(m.venue))
|
||||||
|
|
||||||
private = build("Private", lambda _, m: bool(m.chat.type == "private"))
|
private = build("Private", lambda _, m: bool(m.chat.type == "private"))
|
||||||
group = build("Group", lambda _, m: bool(m.chat.type in ("group", "supergroup")))
|
group = build("Group", lambda _, m: bool(m.chat.type in {"group", "supergroup"}))
|
||||||
channel = build("Channel", lambda _, m: bool(m.chat.type == "channel"))
|
channel = build("Channel", lambda _, m: bool(m.chat.type == "channel"))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue