mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-05 15:41:56 +00:00
fix(ai): 修改at消息处理逻辑并优化戳一戳消息处理 resolves #3
This commit is contained in:
parent
01fe6c183c
commit
7629e7134e
@ -138,8 +138,8 @@ async function extractUserMessage(msg, nickname, e) {
|
||||
}
|
||||
if (at.length > 0) {
|
||||
at.forEach((at) => {
|
||||
if (at === e.bot.uin) {
|
||||
returnMessage += `[${e.sender?.nickname},id:${e.user_id}]@(at)了你,你的id是${at}\n`;
|
||||
if (at == e.bot.uin) {
|
||||
//returnMessage += `[${e.sender?.nickname},id:${e.user_id}]@(at)了你,你的id是${at}\n`;
|
||||
} else {
|
||||
returnMessage += `[${e.sender?.nickname},id:${e.user_id}]@(at)了一个人,id是${at}\n`;
|
||||
}
|
||||
@ -347,7 +347,7 @@ async function sendResponse(e, messages) {
|
||||
break;
|
||||
|
||||
case 'at':
|
||||
e.reply(segment.at(message.id));
|
||||
if(message.id != e.bot.uin)e.reply(segment.at(message.id));
|
||||
break;
|
||||
|
||||
case 'poke':
|
||||
@ -431,7 +431,9 @@ async function handleMemeMessage(e, message) {
|
||||
|
||||
async function handlePokeMessage(e, message) {
|
||||
try {
|
||||
if(message.id != e.bot.uin){
|
||||
await Group.groupPoke(e, message.id, e.group_id);
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error(`[crystelf-ai] 戳一戳失败: ${error.message}`);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user