优化提及
This commit is contained in:
@@ -62,10 +62,21 @@ def is_mentioned_bot_in_message(message: MessageRecv) -> tuple[bool, float]:
|
||||
f"消息中包含不合理的设置 is_mentioned: {message.message_info.additional_config.get('is_mentioned')}"
|
||||
)
|
||||
|
||||
if global_config.bot.nickname in message.processed_plain_text:
|
||||
is_mentioned = True
|
||||
|
||||
for alias_name in global_config.bot.alias_names:
|
||||
if alias_name in message.processed_plain_text:
|
||||
is_mentioned = True
|
||||
|
||||
# 判断是否被@
|
||||
if re.search(rf"@<(.+?):{global_config.bot.qq_account}>", message.processed_plain_text):
|
||||
is_at = True
|
||||
is_mentioned = True
|
||||
|
||||
# print(f"message.processed_plain_text: {message.processed_plain_text}")
|
||||
# print(f"is_mentioned: {is_mentioned}")
|
||||
# print(f"is_at: {is_at}")
|
||||
|
||||
if is_at and global_config.normal_chat.at_bot_inevitable_reply:
|
||||
reply_probability = 1.0
|
||||
|
||||
@@ -13,9 +13,9 @@ version = "2.6.0"
|
||||
#----以上是给开发人员阅读的,如果你只是部署了麦麦,不需要阅读----
|
||||
|
||||
[bot]
|
||||
qq_account = 1145141919810
|
||||
nickname = "麦麦"
|
||||
alias_names = ["麦叠", "牢麦"]
|
||||
qq_account = 1145141919810 # 麦麦的QQ账号
|
||||
nickname = "麦麦" # 麦麦的昵称
|
||||
alias_names = ["麦叠", "牢麦"] # 麦麦的别名
|
||||
|
||||
[personality]
|
||||
personality_core = "是一个积极向上的女大学生" # 建议50字以内
|
||||
@@ -84,8 +84,8 @@ response_willing_amplifier = 1 # 麦麦回复意愿放大系数,一般为1
|
||||
response_interested_rate_amplifier = 1 # 麦麦回复兴趣度放大系数,听到记忆里的内容时放大系数
|
||||
|
||||
emoji_response_penalty = 0 # 表情包回复惩罚系数,设为0为不回复单个表情包,减少单独回复表情包的概率
|
||||
mentioned_bot_inevitable_reply = false # 提及 bot 必然回复
|
||||
at_bot_inevitable_reply = false # @bot 必然回复
|
||||
mentioned_bot_inevitable_reply = true # 提及 bot 必然回复
|
||||
at_bot_inevitable_reply = true # @bot 必然回复
|
||||
|
||||
down_frequency_rate = 3 # 降低回复频率的群组回复意愿降低系数 除法
|
||||
talk_frequency_down_groups = [] #降低回复频率的群号码
|
||||
|
||||
Reference in New Issue
Block a user