mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-12-16 13:40:53 +08:00
🐛 fix bug
This commit is contained in:
parent
dbc97f8c5b
commit
493cbbcff0
@ -137,7 +137,7 @@ async def _():
|
||||
|
||||
@run_preprocessor
|
||||
async def _(event: MessageEvent, matcher: Matcher):
|
||||
if matcher.plugin_name in hidden_plugins:
|
||||
if not matcher.plugin_name or matcher.plugin_name in hidden_plugins:
|
||||
return
|
||||
if isinstance(event, PrivateMessageEvent):
|
||||
session_id = event.user_id
|
||||
|
@ -173,13 +173,12 @@ async def get_gacha_log_img(user_id: str, uid: str, nickname: str):
|
||||
|
||||
def create_import_command(user_id: int):
|
||||
def file_rule(event: NoticeEvent):
|
||||
if event.get_user_id() != str(user_id):
|
||||
return False
|
||||
if isinstance(event, GroupUploadNoticeEvent):
|
||||
return True
|
||||
return event.notice_type == 'offline_file'
|
||||
if isinstance(event, GroupUploadNoticeEvent) or event.notice_type == 'offline_file':
|
||||
return event.get_user_id() == str(user_id)
|
||||
return False
|
||||
|
||||
import_cmd = on_notice(priority=12, rule=Rule(file_rule), expire_time=datetime.timedelta(minutes=5), temp=True)
|
||||
import_cmd.plugin_name = 'Paimon_Gacha_Log'
|
||||
|
||||
@import_cmd.handle()
|
||||
async def _(event: NoticeEvent):
|
||||
|
Loading…
x
Reference in New Issue
Block a user