docs: 更新依赖与文档

This commit is contained in:
lyz05
2022-11-11 10:14:52 +08:00
parent 4a92afa504
commit d71ee113a0
5 changed files with 859 additions and 952 deletions

View File

@@ -1,8 +1,10 @@
# 阿里云函数计算 Django项目
# Fly.io Express项目
包含如下子项目
- airportsub: 用于机场订阅
- danmaku用于弹幕解析
- ipinfo: 用纯真IP数据库查询IP信息
- tgbot: Telegram机器人
- schedule: 定时任务
# 依赖
- chai: 断言库

1786
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,23 +6,26 @@
"start": "node --expose-gc --max-old-space-size=200 ./bin/www",
"dev": "nodemon --expose-gc --max-old-space-size=200 ./bin/www",
"test": "nyc -a mocha --recursive",
"deploy": "flyctl deploy"
"deploy": "flyctl deploy",
"logs": "flyctl logs"
},
"dependencies": {
"ali-oss": "^6.17.1",
"axios": "^1.1.3",
"chai": "^4.3.7",
"chai-http": "^4.3.0",
"cookie": "^0.5.0",
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"dotenv": "^16.0.3",
"ejs": "^3.1.8",
"express": "~4.16.1",
"express": "~4.18.2",
"filesize": "^10.0.5",
"got": "^11.8.2",
"http-errors": "~1.6.3",
"js-yaml": "^4.1.0",
"leancloud-storage": "^4.13.4",
"lib-qqwry": "^1.3.2",
"lib-qqwry": "^1.2.0",
"moment": "^2.29.4",
"morgan": "~1.9.1",
"node-cron": "^3.0.2",
@@ -30,12 +33,9 @@
"pako": "^1.0.11",
"whacko": "^0.19.1",
"xml-js": "^1.6.11",
"xml2js": "^0.4.23",
"yaml": "^2.1.3"
"xml2js": "^0.4.23"
},
"devDependencies": {
"chai": "^4.3.6",
"chai-http": "^4.3.0",
"mocha": "^10.1.0",
"nodemon": "^2.0.20",
"nyc": "^15.1.0"

View File

@@ -16,7 +16,7 @@ function subcache() {
});
}
cron.schedule('0 12 * * *', () => {
cron.schedule('0 12/3 * * *', () => {
subcache();
});
//TODO 添加自动删除一个月前的日志

View File

@@ -1,6 +1,6 @@
// Import modules
const whacko = require('whacko');
const YAML = require('yaml');
const yaml = require('js-yaml');
const TelegramBot = require('node-telegram-bot-api');
const goindex = require('./goindex');
const axios = require('axios');
@@ -68,7 +68,7 @@ module.exports = (TOKEN) => {
bot.onText(/\/sub/, async (msg) => {
const database = await (await client.get("SUB/database.yaml")).content.toString();
const data = YAML.parse(database);
const data = yaml.load(database);
const users = data.user;
for (let user in users) {
if (users[user].chatID == msg.chat.id) {
@@ -82,6 +82,7 @@ module.exports = (TOKEN) => {
bot.sendMessage(msg.chat.id, `您已经成功注册,请等待管理员审核`);
});
//猜数游戏
bot.onText(/\/game/, (msg) => {
const chatID = msg.chat.id;
const guess = parseInt(msg.text.replace("/game", ""));