mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-18 08:40:44 +08:00
Compare commits
No commits in common. "d91d23bfcb37fd6960a30e4d6c87f6a4f9937614" and "19f8ab03d1a5dd699c8066bc262e4214885cea07" have entirely different histories.
d91d23bfcb
...
19f8ab03d1
15
README.md
15
README.md
@ -35,17 +35,12 @@
|
|||||||
> 选择redis缓存,请正确填写`host,port,password,db`选项
|
> 选择redis缓存,请正确填写`host,port,password,db`选项
|
||||||
|
|
||||||
3. 安装项目依赖
|
3. 安装项目依赖
|
||||||
> 打开Bug龙终端: docker exec -it qinglong bash
|
4. > 打开Bug龙终端: docker exec -it qinglong bash
|
||||||
```bash
|
```bash
|
||||||
cd /ql/data/scripts/qitoqito_psyduck/
|
cd /ql/data/scripts/qitoqito_psyduck/
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
4. 安装LibreSSL
|
5. 将Bug龙订阅的执行后改为
|
||||||
```bash
|
|
||||||
cd /ql/data/scripts/qitoqito_psyduck/sh && chmod +x libressl.sh && ./libressl.sh && node ./libressl.js
|
|
||||||
```
|
|
||||||
> 安装完成,在config.ini添加curlPath=/opt/psyduck/curl/bin/psyduck-curl
|
|
||||||
4. 将Bug龙订阅的执行后改为
|
|
||||||
```
|
```
|
||||||
cp -a /ql/data/repo/qitoqito_psyduck/. /ql/data/scripts/qitoqito_psyduck && task qitoqito_psyduck/qlCreate.js now
|
cp -a /ql/data/repo/qitoqito_psyduck/. /ql/data/scripts/qitoqito_psyduck && task qitoqito_psyduck/qlCreate.js now
|
||||||
```
|
```
|
||||||
@ -63,7 +58,7 @@ jdSign=http://ip:17840/sign
|
|||||||
### 2. Redis 服务配置
|
### 2. Redis 服务配置
|
||||||
```bash
|
```bash
|
||||||
# 部署 Redis 服务
|
# 部署 Redis 服务
|
||||||
docker run -itd --name redis -p 6379:6379 --restart=always redis --requirepass 你的密码
|
docker run -itd --name redis -p 6379:6379 redis --requirepass 你的密码
|
||||||
|
|
||||||
# 配置文件修改
|
# 配置文件修改
|
||||||
host= # Redis地址,只需ip地址
|
host= # Redis地址,只需ip地址
|
||||||
@ -208,8 +203,6 @@ proxy= # 代理ip
|
|||||||
3. 推送失败
|
3. 推送失败
|
||||||
- 验证通知配置
|
- 验证通知配置
|
||||||
- 检查网络连接
|
- 检查网络连接
|
||||||
4. 活动火爆
|
|
||||||
- Docker容器网络选择host
|
|
||||||
- 安装libressl
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export class Main extends Template {
|
|||||||
referer: 'https://h5.m.jd.com/pb/015686010/Bc9WX7MpCW7nW9QjZ5N3fFeJXMH/index.html'
|
referer: 'https://h5.m.jd.com/pb/015686010/Bc9WX7MpCW7nW9QjZ5N3fFeJXMH/index.html'
|
||||||
},
|
},
|
||||||
tempExpire: 86400000,
|
tempExpire: 86400000,
|
||||||
readme: `如要使用自定义助力码,请在框架目录/inviter创建jd_task_farmNew.json,按需修改[{"user":"a","inviteCode":"abc"},{"user":"b","inviteCode":"efg"}]`,
|
readme: `如要使用自定义助力码,请在框架目录/inviter创建jd_task_plantBean.json,按需修改[{"user":"a","inviteCode":"abc"},{"user":"b","inviteCode":"efg"}]`,
|
||||||
turn: 4,
|
turn: 4,
|
||||||
crontab: 3,
|
crontab: 3,
|
||||||
interval: 1000,
|
interval: 1000,
|
||||||
|
|||||||
@ -5,38 +5,34 @@ export class Message {
|
|||||||
this.func = process.psyDuck
|
this.func = process.psyDuck
|
||||||
this.msg = this.func.message
|
this.msg = this.func.message
|
||||||
this.title = `🐽 消息提醒: ${this.func.profile.title}`
|
this.title = `🐽 消息提醒: ${this.func.profile.title}`
|
||||||
this.msgAry = message.map(d => d.join("\n"))
|
message.push([`PsyDuck [https://github.com/qitoqito/psyduck]`])
|
||||||
|
this.message = message.map(d => d.join("\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
async send(msgAry) {
|
async send(msgAry) {
|
||||||
const result = this.splitArrays(this.msgAry);
|
if (this.msg.hasOwnProperty('TELEGRAM_TOKEN')) {
|
||||||
for (let message of result) {
|
await this.tgNotify()
|
||||||
message.push([`PsyDuck [https://github.com/qitoqito/psyduck]`])
|
}
|
||||||
this.message = message
|
if (this.msg.hasOwnProperty('BARK_TOKEN')) {
|
||||||
if (this.msg.hasOwnProperty('TELEGRAM_TOKEN')) {
|
await this.barkNotify()
|
||||||
await this.tgNotify()
|
}
|
||||||
}
|
if (this.msg.hasOwnProperty('PUSHPLUS_TOKEN')) {
|
||||||
if (this.msg.hasOwnProperty('BARK_TOKEN')) {
|
await this.ppNotify()
|
||||||
await this.barkNotify()
|
}
|
||||||
}
|
if (this.msg.hasOwnProperty('FTQQ_TOKEN')) {
|
||||||
if (this.msg.hasOwnProperty('PUSHPLUS_TOKEN')) {
|
await this.ftqqNotify()
|
||||||
await this.ppNotify()
|
}
|
||||||
}
|
if (this.msg.hasOwnProperty('DINGTALK_TOKEN')) {
|
||||||
if (this.msg.hasOwnProperty('FTQQ_TOKEN')) {
|
await this.ddNotify()
|
||||||
await this.ftqqNotify()
|
}
|
||||||
}
|
if (this.msg.hasOwnProperty('IGOT_TOKEN')) {
|
||||||
if (this.msg.hasOwnProperty('DINGTALK_TOKEN')) {
|
await this.igotNotify()
|
||||||
await this.ddNotify()
|
}
|
||||||
}
|
if (this.msg.hasOwnProperty('WEIXIN_TOKEN')) {
|
||||||
if (this.msg.hasOwnProperty('IGOT_TOKEN')) {
|
await this.wechatNotify()
|
||||||
await this.igotNotify()
|
}
|
||||||
}
|
if (this.msg.hasOwnProperty('WXAM_TOKEN')) {
|
||||||
if (this.msg.hasOwnProperty('WEIXIN_TOKEN')) {
|
await this.wxamNotify()
|
||||||
await this.wechatNotify()
|
|
||||||
}
|
|
||||||
if (this.msg.hasOwnProperty('WXAM_TOKEN')) {
|
|
||||||
await this.wxamNotify()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,26 +320,4 @@ export class Message {
|
|||||||
console.log('[Message] Telegram 发送通知消息失败')
|
console.log('[Message] Telegram 发送通知消息失败')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
splitArrays(arr, maxLength = 200) {
|
|
||||||
const result = [];
|
|
||||||
let currentArray = [];
|
|
||||||
let currentLength = 0;
|
|
||||||
for (const subArray of arr) {
|
|
||||||
const subLength = subArray.split("\n").length;
|
|
||||||
if (currentLength + subLength<=maxLength) {
|
|
||||||
currentArray.push(subArray);
|
|
||||||
currentLength += subLength;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
result.push(currentArray);
|
|
||||||
currentArray = [subArray];
|
|
||||||
currentLength = subLength;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (currentArray.length>0) {
|
|
||||||
result.push(currentArray);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user