aoijs / aoi.js

aoi.js - The most advanced string-based package to create a Discord Bot fast and powerful.
https://aoi.js.org
Apache License 2.0
332 stars 132 forks source link

Bug: timeout bug #566

Closed MistiDev closed 5 months ago

MistiDev commented 5 months ago

Bug Type

Handler

Bugged Function

module.exports = [{
  name: "test",
  code: `$setTimeout[test;10s;{"channelID":"$channelID"}]`
},{
  name: "test",
  type: "timeout",
  code: `$channelSendMessage[$timeoutData[channelID];bug]`
}]

Version of aoi.js

v6.6.1

Version of Node.js

v20.10.0 (LTS)

Excepted Output

After the timeout expired, a "bug" message should have been sent to the chat

Relevant log output

C:\Users\viptr\Documents\Projects\WP BOT\node_modules\@akarui\aoi.db\dist\cjs\KeyValue\src\FileManager.js:35
        const hash = key.split("").reduce((a, b) => {
                         ^

TypeError: key.split is not a function
    at #hash (C:\Users\viptr\Documents\Projects\WP BOT\node_modules\@akarui\aoi.db\dist\cjs\KeyValue\src\FileManager.js:35:26)    at FileManager.remove (C:\Users\viptr\Documents\Projects\WP BOT\node_modules\@akarui\aoi.db\dist\cjs\KeyValue\src\FileManager.js:71:32)
    at Table.delete (C:\Users\viptr\Documents\Projects\WP BOT\node_modules\@akarui\aoi.db\dist\cjs\KeyValue\src\Table.js:164:27)
    at KeyValue.delete (C:\Users\viptr\Documents\Projects\WP BOT\node_modules\@akarui\aoi.db\dist\cjs\KeyValue\src\database.js:267:36)     
    at Database.delete (C:\Users\viptr\Documents\Projects\WP BOT\node_modules\aoi.js\src\classes\Database.js:61:32)
    at Timeout._onTimeout (C:\Users\viptr\Documents\Projects\WP BOT\node_modules\aoi.js\src\handler\Custom\timeout.js:128:49)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.10.0

After the message was sent, the bot turned off and an error appeared in the console

Code of Conduct

MistiDev commented 5 months ago

v6.8.0

Faf4a commented 5 months ago

Resolved? I believe @USERSATOSHI pushed a fix.