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
bafd31855b
commit
2f46563d01
16
apps/poke.js
16
apps/poke.js
@ -61,14 +61,20 @@ async function chuochuo(e) {
|
|||||||
logger.info(e.operator_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(
|
await axios
|
||||||
`${configControl.get(`coreConfig`)?.coreUrl}/api/words/getText/poke`
|
.get(`${configControl.get(`coreConfig`)?.coreUrl}/api/words/getText/poke`)
|
||||||
);
|
.then((res) => {
|
||||||
if (returnData?.success) {
|
if (res.data?.success) {
|
||||||
return e.reply(returnData.data);
|
return res.data.data;
|
||||||
} else {
|
} else {
|
||||||
return e.reply(`戳一戳出错了!${configControl.get('nickName')}不知道该说啥好了..`);
|
return e.reply(`戳一戳出错了!${configControl.get('nickName')}不知道该说啥好了..`);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
/*if (returnData?.success) {
|
||||||
|
return e.reply(returnData.data);
|
||||||
|
} else {
|
||||||
|
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(
|
||||||
`${configControl.get(`coreConfig`)?.coreUrl}/api/words/getText/poke`
|
`${configControl.get(`coreConfig`)?.coreUrl}/api/words/getText/poke`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user