mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-07-04 14:19:19 +00:00
优化poke
This commit is contained in:
parent
da96f6eca8
commit
a953863362
20
apps/poke.js
20
apps/poke.js
@ -41,13 +41,13 @@ async function pokeMaster(e) {
|
|||||||
}
|
}
|
||||||
e.reply(`你几把谁啊,敢戳我主人,胆子好大啊你🤚😡🤚`);
|
e.reply(`你几把谁啊,敢戳我主人,胆子好大啊你🤚😡🤚`);
|
||||||
await tool.sleep(1000);
|
await tool.sleep(1000);
|
||||||
e.bot.sendApi('group_poke', { group_id: this.e.group_id, user_id: e.operator_id });
|
e.bot.sendApi('group_poke', { group_id: e.group_id, user_id: e.operator_id });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function masterPoke(e) {
|
async function masterPoke(e) {
|
||||||
logger.info(`跟主人一起戳!`);
|
logger.info(`跟主人一起戳!`);
|
||||||
e.bot.sendApi('group_poke', { group_id: this.e.group_id, user_id: e.target_id });
|
e.bot.sendApi('group_poke', { group_id: e.group_id, user_id: e.target_id });
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,14 +69,19 @@ async function chuochuo(e) {
|
|||||||
if (returnData?.success) {
|
if (returnData?.success) {
|
||||||
let message = returnData?.data;
|
let message = returnData?.data;
|
||||||
message = cleanText(message);
|
message = cleanText(message);
|
||||||
return;
|
return await this.e.bot.sendApi('get_ai_record', {
|
||||||
//await this.e.bot.sendApi('') // TODO 🐎呀忘了api是啥了
|
group_id: e.group_id,
|
||||||
|
character: 'lucy-voice-hoige',
|
||||||
|
text: message,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return await e.reply(`戳一戳出错了!${configControl.get('nickName')}不知道该说啥好了..`);
|
return await e.reply(`戳一戳出错了!${configControl.get('nickName')}不知道该说啥好了..`);
|
||||||
}
|
}
|
||||||
} else if (randomNum < replyText + replyVoice + mutePick) {
|
} else if (randomNum < replyText + replyVoice + mutePick) {
|
||||||
// TODO 判断是否管理
|
|
||||||
let mutetype = Math.ceil(Math.random() * 4);
|
let mutetype = Math.ceil(Math.random() * 4);
|
||||||
|
if (!Bot.pickMember(e.group_id, this.e.uin).getInfo()?.role === ('admin' || 'owner')) {
|
||||||
|
mutetype = 5;
|
||||||
|
}
|
||||||
if (mutetype === 1) {
|
if (mutetype === 1) {
|
||||||
e.reply('我生气了!砸挖撸多!木大!木大木大!');
|
e.reply('我生气了!砸挖撸多!木大!木大木大!');
|
||||||
await tool.sleep(1000);
|
await tool.sleep(1000);
|
||||||
@ -110,6 +115,11 @@ async function chuochuo(e) {
|
|||||||
await e.group.muteMember(e.operator_id, 60 * muteTime);
|
await e.group.muteMember(e.operator_id, 60 * muteTime);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (mutetype === 5) {
|
||||||
|
e.reply('哼,要不是我不是管理,早🈲盐你了!');
|
||||||
|
await tool.sleep(1000);
|
||||||
|
e.bot.sendApi('group_poke', { group_id: this.e.group_id, user_id: e.operator_id });
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const returnType = Math.round(Math.random() * 3);
|
const returnType = Math.round(Math.random() * 3);
|
||||||
if (returnType === 1) {
|
if (returnType === 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user