-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Astrian/dev
update readme and add debug module
- Loading branch information
Showing
2 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters