mirror of https://github.com/Mai-with-u/MaiBot.git
增加提及必回复功能开关
parent
215ac0f139
commit
d429dd7f1a
|
|
@ -135,15 +135,23 @@ class ChatBot:
|
||||||
|
|
||||||
await self.storage.store_message(message, chat, topic[0] if topic else None)
|
await self.storage.store_message(message, chat, topic[0] if topic else None)
|
||||||
|
|
||||||
is_mentioned = is_mentioned_bot_in_message(message)
|
if ( f"[CQ:at,qq={global_config.BOT_QQ},name=" in message_cq.raw_message ) and global_config.at_bot_inevitable_reply:
|
||||||
reply_probability = await willing_manager.change_reply_willing_received(
|
reply_probability = 1
|
||||||
chat_stream=chat,
|
logger.info(f"被@,回复概率设置为100%")
|
||||||
is_mentioned_bot=is_mentioned,
|
else:
|
||||||
config=global_config,
|
is_mentioned = is_mentioned_bot_in_message(message)
|
||||||
is_emoji=message.is_emoji,
|
if is_mentioned and global_config.metioned_bot_inevitable_reply:
|
||||||
interested_rate=interested_rate,
|
reply_probability = 1
|
||||||
sender_id=str(message.message_info.user_info.user_id),
|
logger.info(f"被提及,回复概率设置为100%")
|
||||||
)
|
else:
|
||||||
|
reply_probability = await willing_manager.change_reply_willing_received(
|
||||||
|
chat_stream=chat,
|
||||||
|
is_mentioned_bot=is_mentioned,
|
||||||
|
config=global_config,
|
||||||
|
is_emoji=message.is_emoji,
|
||||||
|
interested_rate=interested_rate,
|
||||||
|
sender_id=str(message.message_info.user_info.user_id),
|
||||||
|
)
|
||||||
|
|
||||||
if global_config.enable_think_flow:
|
if global_config.enable_think_flow:
|
||||||
current_willing_old = willing_manager.get_willing(chat_stream=chat)
|
current_willing_old = willing_manager.get_willing(chat_stream=chat)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue