mirror of
https://github.com/nonebot/nonebot2.git
synced 2026-06-14 08:32:24 +00:00
Add mojo_weixin adapter
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
"""
|
||||
This filter intercepts all post data except ones of which 'post_type' is 'message'.
|
||||
"""
|
||||
|
||||
from filter import as_filter
|
||||
|
||||
|
||||
@as_filter(priority=10000)
|
||||
def _filter(ctx_msg):
|
||||
return ctx_msg.get('post_type') == 'message'
|
||||
@@ -0,0 +1,10 @@
|
||||
"""
|
||||
This filter intercepts messages that are from massive platforms.
|
||||
"""
|
||||
|
||||
from filter import as_filter
|
||||
|
||||
|
||||
@as_filter(priority=100)
|
||||
def _filter(ctx_msg):
|
||||
return not ctx_msg.get('is_massive_platform', False)
|
||||
Reference in New Issue
Block a user