Update qy.js
Browse files
qy.js
CHANGED
@@ -3,11 +3,8 @@ import fetch from "node-fetch"
|
|
3 |
|
4 |
const filepath = 'data/musickey'
|
5 |
const minNum = 30; // 最小刷取次数
|
6 |
-
const maxNum = 221; //
|
7 |
-
const num = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;
|
8 |
const mids = ['000I3h8U1xyw4s', '001eTbYA4Vplky','000I3h8U1xyw4s','004FRxOR3aBtuC','0023CVP23SH17s','002UK3lU1vPyNG','003zg96x0kUs8b','004KKQeM0S10e1','002E0Xl92dNK1D','002wVQqH2kD7Dw']; // 可选的音乐ID数组
|
9 |
-
const mid = mids[Math.floor(Math.random() * mids.length)]; // 随机选择一个音乐ID
|
10 |
-
|
11 |
fs.mkdirSync(filepath, { recursive: true });
|
12 |
export class example extends plugin {
|
13 |
constructor() {
|
@@ -43,6 +40,8 @@ export class example extends plugin {
|
|
43 |
async inquire(e) { e.reply('请扫码查看'); return e.reply([segment.image('https://gitee.com/Tloml-Starry/Plugin-Example/raw/master/PICTRUE/听歌排行榜.png')]) }
|
44 |
async Get_Time(e) {
|
45 |
const user_id = e.user_id
|
|
|
|
|
46 |
const user_file = `${filepath}/${user_id}.json`
|
47 |
if (!fs.existsSync(user_file)) { return e.reply('请先发送#Q音登录,登录验证后再发送#刷听歌时长') }
|
48 |
const READ = fs.readFileSync(user_file, 'utf8')
|
|
|
3 |
|
4 |
const filepath = 'data/musickey'
|
5 |
const minNum = 30; // 最小刷取次数
|
6 |
+
const maxNum = 221; // 最大刷取次数,不要超过412
|
|
|
7 |
const mids = ['000I3h8U1xyw4s', '001eTbYA4Vplky','000I3h8U1xyw4s','004FRxOR3aBtuC','0023CVP23SH17s','002UK3lU1vPyNG','003zg96x0kUs8b','004KKQeM0S10e1','002E0Xl92dNK1D','002wVQqH2kD7Dw']; // 可选的音乐ID数组
|
|
|
|
|
8 |
fs.mkdirSync(filepath, { recursive: true });
|
9 |
export class example extends plugin {
|
10 |
constructor() {
|
|
|
40 |
async inquire(e) { e.reply('请扫码查看'); return e.reply([segment.image('https://gitee.com/Tloml-Starry/Plugin-Example/raw/master/PICTRUE/听歌排行榜.png')]) }
|
41 |
async Get_Time(e) {
|
42 |
const user_id = e.user_id
|
43 |
+
const num = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;//随机次数
|
44 |
+
const mid = mids[Math.floor(Math.random() * mids.length)]; // 随机选择一个音乐ID
|
45 |
const user_file = `${filepath}/${user_id}.json`
|
46 |
if (!fs.existsSync(user_file)) { return e.reply('请先发送#Q音登录,登录验证后再发送#刷听歌时长') }
|
47 |
const READ = fs.readFileSync(user_file, 'utf8')
|