mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-06 20:06:12 +08:00
fix full screen error when not connect to bot
This commit is contained in:
parent
fd7acea51a
commit
5eac7795d1
@ -47,11 +47,13 @@ async def fetch_and_send(target_type: str):
|
|||||||
send_user_list,
|
send_user_list,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
bot = nonebot.get_bot()
|
|
||||||
assert isinstance(bot, Bot)
|
|
||||||
to_send = await platform_manager[target_type].fetch_new_post(
|
to_send = await platform_manager[target_type].fetch_new_post(
|
||||||
target, send_userinfo_list
|
target, send_userinfo_list
|
||||||
)
|
)
|
||||||
|
if not to_send:
|
||||||
|
return
|
||||||
|
bot = nonebot.get_bot()
|
||||||
|
assert isinstance(bot, Bot)
|
||||||
for user, send_list in to_send:
|
for user, send_list in to_send:
|
||||||
for send_post in send_list:
|
for send_post in send_list:
|
||||||
logger.info("send to {}: {}".format(user, send_post))
|
logger.info("send to {}: {}".format(user, send_post))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user