mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-17 16:10:43 +08:00
Compare commits
3 Commits
19f8ab03d1
...
d91d23bfcb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d91d23bfcb | ||
|
|
6f964a1ccc | ||
|
|
46901224d2 |
15
README.md
15
README.md
@ -35,12 +35,17 @@
|
|||||||
> 选择redis缓存,请正确填写`host,port,password,db`选项
|
> 选择redis缓存,请正确填写`host,port,password,db`选项
|
||||||
|
|
||||||
3. 安装项目依赖
|
3. 安装项目依赖
|
||||||
4. > 打开Bug龙终端: docker exec -it qinglong bash
|
> 打开Bug龙终端: docker exec -it qinglong bash
|
||||||
```bash
|
```bash
|
||||||
cd /ql/data/scripts/qitoqito_psyduck/
|
cd /ql/data/scripts/qitoqito_psyduck/
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
5. 将Bug龙订阅的执行后改为
|
4. 安装LibreSSL
|
||||||
|
```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
|
||||||
```
|
```
|
||||||
@ -58,7 +63,7 @@ jdSign=http://ip:17840/sign
|
|||||||
### 2. Redis 服务配置
|
### 2. Redis 服务配置
|
||||||
```bash
|
```bash
|
||||||
# 部署 Redis 服务
|
# 部署 Redis 服务
|
||||||
docker run -itd --name redis -p 6379:6379 redis --requirepass 你的密码
|
docker run -itd --name redis -p 6379:6379 --restart=always redis --requirepass 你的密码
|
||||||
|
|
||||||
# 配置文件修改
|
# 配置文件修改
|
||||||
host= # Redis地址,只需ip地址
|
host= # Redis地址,只需ip地址
|
||||||
@ -203,6 +208,8 @@ 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_plantBean.json,按需修改[{"user":"a","inviteCode":"abc"},{"user":"b","inviteCode":"efg"}]`,
|
readme: `如要使用自定义助力码,请在框架目录/inviter创建jd_task_farmNew.json,按需修改[{"user":"a","inviteCode":"abc"},{"user":"b","inviteCode":"efg"}]`,
|
||||||
turn: 4,
|
turn: 4,
|
||||||
crontab: 3,
|
crontab: 3,
|
||||||
interval: 1000,
|
interval: 1000,
|
||||||
|
|||||||
@ -5,34 +5,38 @@ 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}`
|
||||||
message.push([`PsyDuck [https://github.com/qitoqito/psyduck]`])
|
this.msgAry = message.map(d => d.join("\n"))
|
||||||
this.message = message.map(d => d.join("\n"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async send(msgAry) {
|
async send(msgAry) {
|
||||||
if (this.msg.hasOwnProperty('TELEGRAM_TOKEN')) {
|
const result = this.splitArrays(this.msgAry);
|
||||||
await this.tgNotify()
|
for (let message of result) {
|
||||||
}
|
message.push([`PsyDuck [https://github.com/qitoqito/psyduck]`])
|
||||||
if (this.msg.hasOwnProperty('BARK_TOKEN')) {
|
this.message = message
|
||||||
await this.barkNotify()
|
if (this.msg.hasOwnProperty('TELEGRAM_TOKEN')) {
|
||||||
}
|
await this.tgNotify()
|
||||||
if (this.msg.hasOwnProperty('PUSHPLUS_TOKEN')) {
|
}
|
||||||
await this.ppNotify()
|
if (this.msg.hasOwnProperty('BARK_TOKEN')) {
|
||||||
}
|
await this.barkNotify()
|
||||||
if (this.msg.hasOwnProperty('FTQQ_TOKEN')) {
|
}
|
||||||
await this.ftqqNotify()
|
if (this.msg.hasOwnProperty('PUSHPLUS_TOKEN')) {
|
||||||
}
|
await this.ppNotify()
|
||||||
if (this.msg.hasOwnProperty('DINGTALK_TOKEN')) {
|
}
|
||||||
await this.ddNotify()
|
if (this.msg.hasOwnProperty('FTQQ_TOKEN')) {
|
||||||
}
|
await this.ftqqNotify()
|
||||||
if (this.msg.hasOwnProperty('IGOT_TOKEN')) {
|
}
|
||||||
await this.igotNotify()
|
if (this.msg.hasOwnProperty('DINGTALK_TOKEN')) {
|
||||||
}
|
await this.ddNotify()
|
||||||
if (this.msg.hasOwnProperty('WEIXIN_TOKEN')) {
|
}
|
||||||
await this.wechatNotify()
|
if (this.msg.hasOwnProperty('IGOT_TOKEN')) {
|
||||||
}
|
await this.igotNotify()
|
||||||
if (this.msg.hasOwnProperty('WXAM_TOKEN')) {
|
}
|
||||||
await this.wxamNotify()
|
if (this.msg.hasOwnProperty('WEIXIN_TOKEN')) {
|
||||||
|
await this.wechatNotify()
|
||||||
|
}
|
||||||
|
if (this.msg.hasOwnProperty('WXAM_TOKEN')) {
|
||||||
|
await this.wxamNotify()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,4 +324,26 @@ 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