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

I do nothing and this error happens, bot shutsdown after #1

Closed
LightslicerGP opened this issue Oct 8, 2024 · 3 comments
Closed

I do nothing and this error happens, bot shutsdown after #1

LightslicerGP opened this issue Oct 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@LightslicerGP
Copy link

LightslicerGP commented Oct 8, 2024

c:\Users\LightslicerGP\node_modules\aoi.sqlite\classes\Database.js:210
      this.client.db.prepare(sql).run(query);
                                  ^

TypeError: SQLite3 can only bind numbers, strings, bigints, buffers, and null
    at c:\Users\LightslicerGP\node_modules\aoi.sqlite\classes\Database.js:210:35
    at sqliteTransaction (c:\Users\LightslicerGP\node_modules\better-sqlite3\lib\methods\transaction.js:65:24)
    at SQLDatabase.deleteMany (c:\Users\LightslicerGP\node_modules\aoi.sqlite\classes\Database.js:214:7)
    at handleResidueData (c:\Users\LightslicerGP\node_modules\aoi.js\src\events\Custom\handleResidueData.js:2:21)
    at Timeout._onTimeout (c:\Users\LightslicerGP\node_modules\aoi.sqlite\classes\Database.js:79:73)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)

no idea, here and there the bot just gives an error like this and then it breaks. i have no clue

@LightslicerGP
Copy link
Author

c:\Users\LightslicerGP\node_modules\aoi.sqlite\classes\Database.js:210
      this.client.db.prepare(sql).run(query);
                                  ^

TypeError: SQLite3 can only bind numbers, strings, bigints, buffers, and null
    at c:\Users\LightslicerGP\node_modules\aoi.sqlite\classes\Database.js:210:35
    at sqliteTransaction (c:\Users\LightslicerGP\node_modules\better-sqlite3\lib\methods\transaction.js:65:24)
    at SQLDatabase.deleteMany (c:\Users\LightslicerGP\node_modules\aoi.sqlite\classes\Database.js:214:7)
    at handleResidueData (c:\Users\LightslicerGP\node_modules\aoi.js\src\events\Custom\handleResidueData.js:2:21)
    at Timeout._onTimeout (c:\Users\LightslicerGP\node_modules\aoi.sqlite\classes\Database.js:79:73)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)

once again

@LightslicerGP
Copy link
Author

      let validQuery = typeof query === 'object' ? JSON.stringify(query) : query; // added according to chatgpt 10/10/24
      this.client.db.prepare(sql).run(validQuery);

trying this, possibly fixes it (yes i asked chatgpt but like what am i meant to do i dont know enough js or get what is happening)

@Faf4a Faf4a added the bug Something isn't working label Oct 11, 2024
@Faf4a
Copy link
Owner

Faf4a commented Nov 22, 2024

should be fixed, reinstall

lmk if you have any other issues

@Faf4a Faf4a closed this as completed Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants