diff --git a/debug.js b/debug.js new file mode 100644 index 0000000..6715d29 --- /dev/null +++ b/debug.js @@ -0,0 +1,56 @@ +// Local debug module +const debug = require('debug')('rsvpbot:debug.js') + +const API = require('./api') + +async function main(tgid) { + debug('checking poc identity...') + let info = await API.checkpoc(tgid) + debug(info) + debug('\n') + + debug('checking ap logging status...') + await API.checkapstatus(info.faction, info.location, tgid) + debug('completed') + debug('\n') + + debug('fetching agents first-letter list with checkin...') + let firstletterdict = await API.checkupagents(info.faction, info.location, null, 'in', tgid) + debug(firstletterdict) + debug('\n') + + debug('fetching K-letter-starting-id agents with checkin...') + let kagentslist = await API.checkupagents(info.faction, info.location, 'K', 'in', tgid) + debug(kagentslist) + debug('\n') + + debug('set agent into ap-logging status') + await API.checkstatus(info.faction, info.location, 'sampleagent', 'in', tgid) + debug('\n') + + debug('set agent "sampleagent" ap and level with checkin') + await API.logaplevel(info.faction, info.location, '16', 40000000, tgid) + debug('\n') + + debug('fetching agents first-letter list with checkout...') + firstletterdict = await API.checkupagents(info.faction, info.location, null, 'out', tgid) + debug(firstletterdict) + debug('\n') + + debug('fetching K-letter-starting-id agents with checkout...') + kagentslist = await API.checkupagents(info.faction, info.location, 'K', 'out', tgid) + debug(kagentslist) + debug('\n') + + debug('set agent Kirrior into ap-logging status') + await API.checkstatus(info.faction, info.location, 'sampleagent', 'out', tgid) + debug('\n') + + debug('set agent "sampleagent" ap and level with checkout') + await API.logaplevel(info.faction, info.location, '16', 50000000, tgid) + debug('\n') + + debug('debug test done.') +} + +main(54785179) diff --git a/readme.md b/readme.md index 6c65c33..f939303 100644 --- a/readme.md +++ b/readme.md @@ -8,7 +8,7 @@ - 一键部署至 Heroku - 快速签到 / 签退 - 登记玩家等级与 AP(经验值) -- 限定 PoC 访问 Bot +- 限定 PoC 访问 Bot,支持多 PoC 操作 - 联动 Airtable 服务,快速根据 AP 差额生成全阵营榜单、独立阵营榜单,并可链接访问 ## 部署方法 @@ -77,6 +77,6 @@ ## TODO -- 支援多个 PoC 进行操作 +- ~~支援多个 PoC 进行操作~~(已经支持) - 快速登记 RSVP 信息 - OCR 识别 agent AP/等级资料