-
Notifications
You must be signed in to change notification settings - Fork 13
/
threesome.inline.js
86 lines (74 loc) · 2.79 KB
/
threesome.inline.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
'use strict';
module.exports = (bot) => {
return {
answer: (query) => {
const randomSeparator = () => {
const content = [
'…', '…', '…', '…', '…', '…',
'……', '……', '……', '……',
'………', '………',
'!', '!!',
'、、', '、、、',
];
return content[Math.floor(Math.random() * content.length)];
};
const randomText = () => {
const content = [
'啊', '啊', '啊', '啊', '啊',
'啊啊', '啊啊', '啊啊', '啊啊',
'啊啊啊', '啊啊啊', '啊啊啊',
'嗯', '嗯', '嗯', '嗯',
'嗯嗯', '嗯嗯',
'唔', '唔',
'唔嗯', '唔嗯',
'唔哇', '唔哇',
'哇啊', '哇啊啊',
'好舒服', '好棒', '继续', '用力', '不要停',
'不要', '那里不可以', '好变态', '要坏掉啦',
];
let text = content[Math.floor(Math.random() * content.length)];
while (text.length < 20 && Math.random() < 0.25) {
text += randomSeparator() + content[Math.floor(Math.random() * content.length)];
}
return text;
};
let text = randomText() + randomSeparator();
let tokens = null;
// notice: the implementation in the stats module should be consistent with this one
if (query.query.match('@')) {
tokens = query.query.split('@');
} else {
tokens = query.query.split(' ');
}
for (const i in tokens) {
if (tokens[i]) {
text += tokens[i] + randomSeparator() + randomText() + randomSeparator();
}
}
return bot.answerInlineQuery(query.id, [{
type: 'article',
id: 'CONTENT',
title: '娇喘',
input_message_content: {
message_text: text,
},
}], {
cache_time: 0,
is_personal: true,
});
},
banned: (query) => {
return bot.answerInlineQuery(query.id, [{
type: 'article',
id: 'BANNED',
title: '娇喘',
input_message_content: {
message_text: '妈的 JB 都没我啪个毛',
},
}], {
cache_time: 0,
is_personal: true,
});
},
};
};