Skip to content

Commit

Permalink
dump full error message
Browse files Browse the repository at this point in the history
support full ticket
  • Loading branch information
takayama-lily committed Dec 28, 2020
1 parent f57ebee commit 933c61b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function createBot() {
api.setBot(bot, config.rate_limit_interval);
bot.on("system.login.slider", ()=>{
process.stdin.once("data", (input)=>{
input = String(input).trim().replace("ticket:", "").trim().replace(/"/g, "");
bot.sliderLogin(input);
});
});
Expand Down
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const fs = require("fs");
try {
require("./config.js");
} catch (e) {
console.log(e.message);
console.log(e);
console.log(`
请重命名 config.sample.js 文件
未找到config.js文件或配置有语法错误
`);
process.exit(0);
}
Expand All @@ -33,8 +33,8 @@ try {
fs.writeFileSync(testfile, "");
fs.unlinkSync(testfile);
} catch(e) {
console.log(e);
console.log("数据文件夹不可写,进程退出。");
console.log(e.message);
process.exit(0);
}

Expand Down

0 comments on commit 933c61b

Please sign in to comment.