🎨 适配新版gsuid_core

This commit is contained in:
Wuyi无疑 2023-03-26 19:13:57 +08:00
parent 019a968397
commit 46d4ff7f6b
5 changed files with 18 additions and 7 deletions

View File

@ -101,7 +101,7 @@ async def check_ann_state():
bot = gss.active_bot[BOT_ID]
for group_id in sub_list[bot_id]:
await bot.target_send(
img, 'group', group_id, bot_id, ''
img, 'group', group_id, bot_id, '', ''
)
await asyncio.sleep(random.uniform(1, 3))
except Exception as e:

View File

@ -59,13 +59,17 @@ async def send_daily_mihoyo_bbs_sign(ev: Optional[Event] = None):
for bot_id in im_private:
for user_id in im_private[bot_id]:
msg = im_private[bot_id][user_id]
await bot.target_send(msg, 'direct', user_id, bot_id, '')
await bot.target_send(
msg, 'direct', user_id, bot_id, '', ''
)
await asyncio.sleep(5 + random.randint(1, 3))
if ev:
target_type = 'group' if ev.group_id else 'direct'
target_id = ev.group_id if ev.group_id else ev.user_id
for BOT_ID in gss.active_bot:
bot = gss.active_bot[BOT_ID]
await bot.target_send(im, target_type, target_id, ev.bot_id, '')
await bot.target_send(
im, target_type, target_id, ev.bot_id, '', ''
)
await asyncio.sleep(5 + random.randint(1, 3))
logger.info('米游币获取已结束。')

View File

@ -40,7 +40,7 @@ async def notice_job():
bot = gss.active_bot[BOT_ID]
for user_id in result[bot_id]['direct']:
msg = result[bot_id]['direct'][user_id]
await bot.target_send(msg, 'direct', user_id, bot_id, '')
await bot.target_send(msg, 'direct', user_id, bot_id, '', '')
await asyncio.sleep(0.5)
logger.info('[推送检查] 私聊推送完成')
for gid in result[bot_id]['group']:
@ -49,7 +49,7 @@ async def notice_job():
msg_list.append(MessageSegment.at(user_id))
msg = result[bot_id]['group'][gid][user_id]
msg_list.append(MessageSegment.text(msg))
await bot.target_send(msg_list, 'group', gid, bot_id, '')
await bot.target_send(msg_list, 'group', gid, bot_id, '', '')
await asyncio.sleep(0.5)
logger.info('[推送检查] 群聊推送完成')

View File

@ -60,7 +60,7 @@ async def send_daily_sign():
for bot_id in gss.active_bot:
for single in private_msg_list[qid]:
await gss.active_bot[bot_id].target_send(
single['msg'], 'direct', qid, single['bot_id'], ''
single['msg'], 'direct', qid, single['bot_id'], '', ''
)
except Exception as e:
logger.warning(f'[每日全部签到] QQ {qid} 私聊推送失败!错误信息:{e}')
@ -87,7 +87,12 @@ async def send_daily_sign():
try:
for bot_id in gss.active_bot:
await gss.active_bot[bot_id].target_send(
msg_title, 'group', gid, group_msg_list[gid]['bot_id'], ''
msg_title,
'group',
gid,
group_msg_list[gid]['bot_id'],
'',
'',
)
except Exception as e:
logger.warning(f'[每日全部签到]群 {gid} 推送失败!错误信息:{e}')

View File

@ -30,6 +30,7 @@ async def check_msg():
update_log['send_to'],
update_log['bot_id'],
'',
'',
)
else:
await bot.target_send(
@ -38,6 +39,7 @@ async def check_msg():
update_log['send_to'],
update_log['bot_id'],
'',
'',
)
logger.info('遗留信息检查完毕!')
except Exception: