mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Use getattr to get outgoing attribute in filters.me (#1137)
* Use getattr to get outgoing attribute from the message in me_filter. Fixes #1136. Signed-off-by: Aliwoto <woto@kaizoku.cyou> * Update filters.py Signed-off-by: Aliwoto <woto@kaizoku.cyou> Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
This commit is contained in:
parent
b848e05225
commit
31b32184c9
1 changed files with 1 additions and 1 deletions
|
|
@ -164,7 +164,7 @@ all = create(all_filter)
|
||||||
|
|
||||||
# region me_filter
|
# region me_filter
|
||||||
async def me_filter(_, __, m: Message):
|
async def me_filter(_, __, m: Message):
|
||||||
return bool(m.from_user and m.from_user.is_self or m.outgoing)
|
return bool(m.from_user and m.from_user.is_self or getattr(m, "outgoing", False))
|
||||||
|
|
||||||
|
|
||||||
me = create(me_filter)
|
me = create(me_filter)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue