• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

DB.connect error (or misdocumented)

Mmoi

Active Member
Contributor
Hi,

I just went through an error in the database connect function.
It does call the callback only on error.
Doc
callback (function) Callback gets called on success / error; If an error occured, exactly one parameter containing the error will be handed to the callback

So, when there is a success, we can't know it without dirty checks (for example for creating needed tables or views). And moreover: it's asynchronous (the bad one, the one that doesn't use promesses (as of ECMAScript 6))

I'm using sinusbot v.0.13.37-9791176 (current stable at the time of download)

Just to let you know ;)
Mmoi
 

irgendwr

no longer active, "retired" staff member
is awesome!
V.I.P.
is uber awesome!
Contributor
Insider
And moreover: it's asynchronous (the bad one, the one that doesn't use promesses (as of ECMAScript 6))
We can't use promises since the engine uses es5.

Can't test the callback thing right now but if it doesn't work it's a bug, thank you for reporting it.
 

Mmoi

Active Member
Contributor
Following the process, creating a lot a querys / execs results at a sinusbot crash (globally, not just the script).
If you're interested in looking the logs, please tell me.
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Could you please send the logs via PM? Will look into the issue.
 
Top