优化poke

This commit is contained in:
Jerry 2025-05-24 11:08:39 +08:00
parent 83a6cfc44e
commit 991105ec44

View File

@ -57,15 +57,17 @@ async function masterPoke(e) {
} }
async function chuochuo(e) { async function chuochuo(e) {
logger.info(e.target_id);
logger.info(e.operator_id);
const randomNum = Math.random(); const randomNum = Math.random();
if (randomNum < replyText) { if (randomNum < replyText) {
const returnData = await axios.get( const returnData = await axios.get(
`${configControl.get(`coreConfig`)?.coreUrl}/api/words/getText/poke` `${configControl.get(`coreConfig`)?.coreUrl}/api/words/getText/poke`
); );
if (returnData?.success) { if (returnData?.success) {
return await e.reply(returnData.data); return e.reply(returnData.data);
} else { } else {
return await e.reply(`戳一戳出错了!${configControl.get('nickName')}不知道该说啥好了..`); return e.reply(`戳一戳出错了!${configControl.get('nickName')}不知道该说啥好了..`);
} }
} else if (randomNum < replyText + replyVoice) { } else if (randomNum < replyText + replyVoice) {
const returnData = await axios.get( const returnData = await axios.get(