feat: init
This commit is contained in:
57
message.js
Normal file
57
message.js
Normal file
@@ -0,0 +1,57 @@
|
||||
let messages = [
|
||||
[
|
||||
"你好,是要男性健康方面的问题吗",
|
||||
"{voice}",
|
||||
"十我详谈吧,这里敏感词太多",
|
||||
"这里敏感词多",
|
||||
"这里有时候不常在,消息回复不及时",
|
||||
],
|
||||
[
|
||||
"{wechat}"
|
||||
],
|
||||
[
|
||||
"↑微訫号",
|
||||
"微訫号",
|
||||
"↑微訫号",
|
||||
"↑徽沁",
|
||||
"↑微沁",
|
||||
],
|
||||
[
|
||||
"十了说一下给你通过",
|
||||
"加上一对一给你解答",
|
||||
"加上详谈",
|
||||
"伽上詳談",
|
||||
"加上详细沟通一下你的情况",
|
||||
]
|
||||
];
|
||||
module.exports = {
|
||||
get: function () {
|
||||
let msg = [];
|
||||
for (let i = 0; i < messages.length; i++) {
|
||||
let item = messages[i]
|
||||
if (item.length == 1) {
|
||||
msg.push(item[0])
|
||||
continue
|
||||
}
|
||||
msg.push(item[Math.floor(Math.random() * item.length)])
|
||||
}
|
||||
|
||||
return msg.map((item) => {
|
||||
let voice = lib.store.voice()
|
||||
if (item == "{voice}") {
|
||||
if (voice == 'default') {
|
||||
return false
|
||||
}
|
||||
return { type: "voice", data: voice }
|
||||
}
|
||||
|
||||
item = item.replace("{wechat}", lib.store.wechat())
|
||||
return {
|
||||
type: "text",
|
||||
data: item
|
||||
}
|
||||
}).filter((item) => {
|
||||
return item !== false
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user