-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Master #1
base: stable
Are you sure you want to change the base?
Master #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the code but not running, so check the runtime error yourself
index.js
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.