Skip to content

Commit

Permalink
🐛 fix request
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Nov 16, 2024
1 parent f9bf220 commit bbfb903
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/admin/member.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def member_join_tell(
):
"""用户入群提醒"""
welcome = f"欢迎新人加入{(await ctx.scene.summary()).name}!进群了就别想跑哦~"
await ctx.scene.send_message(MessageChain([Notice(ctx.client), welcome]))
await ctx.scene.send_message(MessageChain([Notice(ctx.endpoint), welcome]))


@listen(MetadataModified)
Expand Down
4 changes: 2 additions & 2 deletions plugins/admin/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async def auto_accept(ctx: Context, opt: Match[bool], bot: RaianBotService):


@listen(RequestReceived)
@dispatch(Filter().dispatch(RequestReceived).assert_true(lambda e: e.request.request_type == "elizabeth::new_friend"))
@dispatch(Filter().dispatch(RequestReceived).assert_true(lambda e: e.request.request_type in ("elizabeth::new_friend", "onebot11::friend")))
async def get_friend_accept(ctx: Context, event: RequestReceived, bot: RaianBotService, conf: BotConfig):
"""
收到好友申请
Expand Down Expand Up @@ -67,7 +67,7 @@ async def waiter(w_ctx: Context, msg: MessageChain):

@listen(RequestReceived)
@dispatch(
Filter().dispatch(RequestReceived).assert_true(lambda e: e.request.request_type == "elizabeth::invited_join_group")
Filter().dispatch(RequestReceived).assert_true(lambda e: e.request.request_type in ("elizabeth::invited_join_group", "onebot11::group.invite"))
)
async def bot_invite(ctx: Context, event: RequestReceived, bot: RaianBotService, conf: BotConfig):
"""
Expand Down
2 changes: 1 addition & 1 deletion plugins/weibo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ async def wlist(ctx: Context, db: DatabaseService, conf: BotConfig):
FIRST_STARTUP = False


@every(1, "minute")
@every(3, "minute")
@record("微博动态自动获取", False)
async def update(avilla: Avilla):
global FIRST_STARTUP
Expand Down

0 comments on commit bbfb903

Please sign in to comment.