Skip to content
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

Bot crash after 1min #6

Closed
vincentdchn opened this issue Jun 2, 2021 · 9 comments
Closed

Bot crash after 1min #6

vincentdchn opened this issue Jun 2, 2021 · 9 comments

Comments

@vincentdchn
Copy link

vincentdchn commented Jun 2, 2021

Hello,

I have this error whatever I do with the bot :

/home/ubuntu/DiscordRoleManager-master/start.js:109
bot.createMessage(config.mainChannelID, "⚠ " + rows[rowNumber].temporaryRole + " for user " + member.user.username + " does not exist! Please check your role assignment").catch((err) => { console.log(err) });
^

TypeError: Cannot read property 'user' of undefined
at Statement. (/home/ubuntu/DiscordRoleManager-master/start.js:109:107)

And it stops the bot.

@vincentdchn vincentdchn changed the title Error after 1min Bot crash after 1min Jun 2, 2021
@acocalypso
Copy link
Owner

Can you check that you added the serverID in config.json?

"serverID": "7290611111111111"

@vincentdchn
Copy link
Author

Yes serverID is added

@acocalypso
Copy link
Owner

I setup a new branch with a migration from sqlite to mysql I try to catch such issues as well.

In your case member is undefined. Did you enable SERVER MEMBERS INTENT and PRESENCE INTENT for the bot on discordapp.com?

@vincentdchn
Copy link
Author

I setup a new branch with a migration from sqlite to mysql I try to catch such issues as well.

So I need to try again with this new branch ?

Yup, SERVER MEMBERS INTENT & PRESENCE INTENT are enabled

@acocalypso
Copy link
Owner

acocalypso commented Jun 2, 2021 via email

@vincentdchn
Copy link
Author

Ok thanks !

@acocalypso
Copy link
Owner

acocalypso commented Jun 4, 2021

You could try the new mysql branch. If you already have a sqlite3 Database the Data will automatically be converted.

You only need to create a new mysql database.

@vincentdchn
Copy link
Author

Ok super thank you !

@vincentdchn
Copy link
Author

It works thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants