Master#1
Conversation
yuta0801
left a comment
There was a problem hiding this comment.
I read the code but not running, so check the runtime error yourself
|
|
||
| client.on('message', async msg => { | ||
| const guild = await data.getServer(msg.guild.id).then(g => g.toJSON()) | ||
| const user = await data.getUser(msg.author.id).then(u => u.toJSON()) |
There was a problem hiding this comment.
Is there a specific reason to use toJSON?
AFAIK, it provides getters so you can access data directly without converting to plain object.
There was a problem hiding this comment.
I didn't know this at that moment but I know this now, so I'll fix this.
| if (args[1] === 'config') { | ||
| if (args[2] === 'set') { | ||
| if (!args[4]) sendDeletable('Not enough args.') | ||
| const config = require(__dirname + '/../config.yml') |
There was a problem hiding this comment.
Please note that this may be cached
|
Other improvement plan:
|
Wait, it's running for me(with latest master branch commit); what's the error you got? |
|
@acrylic-style I can't get any error because didn't run the bot, so runtime errors checks are not included in this review |
No description provided.