Skip to content

Commit

Permalink
Merge pull request #3 from Astrian/dev
Browse files Browse the repository at this point in the history
update readme and add debug module
  • Loading branch information
Astrian Zheng authored Apr 5, 2019
2 parents 13e7e34 + 7342921 commit 68eed53
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
56 changes: 56 additions & 0 deletions debug.js
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- 一键部署至 Heroku
- 快速签到 / 签退
- 登记玩家等级与 AP(经验值)
- 限定 PoC 访问 Bot
- 限定 PoC 访问 Bot,支持多 PoC 操作
- 联动 Airtable 服务,快速根据 AP 差额生成全阵营榜单、独立阵营榜单,并可链接访问

## 部署方法
Expand Down Expand Up @@ -77,6 +77,6 @@

## TODO

- 支援多个 PoC 进行操作
- ~~支援多个 PoC 进行操作~~(已经支持)
- 快速登记 RSVP 信息
- OCR 识别 agent AP/等级资料

0 comments on commit 68eed53

Please sign in to comment.