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
329 stars 130 forks source link

Bug: $setTimeout bug #605

Closed MistiDev closed 2 months ago

MistiDev commented 2 months ago

Bug Type

Function

Bugged Function

v6.8.0
function/callback ?

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

Version of aoi.js

v6.7.1

Version of Node.js

v20.10.0 (LTS)

Excepted Output

$setTimeout never ends, if you restart the bot, the timeout is always repeated, that is, it will send a "test" message

Relevant log output

No response

Code of Conduct

OmkumarMangukiya commented 2 months ago

use clearTimeout() it will clear the timeout and the bot wont send the test message

MistiDev commented 2 months ago

use clearTimeout() it will clear the timeout and the bot wont send the test message

this is a bug and i reported it, i can use clearTimeout() but the bug needs to be fixed

Faf4a commented 2 months ago

Update to latest, this was fixed