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: $updateCommands #602

Closed valentineu0 closed 3 weeks ago

valentineu0 commented 3 months ago

Bug Type

Function

Bugged Function

module.exports = [
    {
        name: "rr",
        $if: "old",
        code: `
        $if[$authorID==$clientOwnerIDs]
            $updateCommands
            Hot reload successfully completed.
        $endif
        `
    }
];

Version of aoi.js

v6.7.1

Version of Node.js

v20.10.0 (LTS)

Excepted Output

Files with the old loader loader.load(bla bla bla, "./commands") can be reloaded with $updateCommands, but this does not work on the new loader client.loadCommands("path", log true/false).

image image

Relevant log output

image

Code of Conduct

Faf4a commented 2 months ago

can't reproduce..?

supremesupreme commented 2 months ago

same lol

valentineu0 commented 2 months ago

Still command not updating unless bot is restarted

USERSATOSHI commented 2 months ago

does this still happen with v6.8.0?

valentineu0 commented 2 months ago

After v6.8, a single loadCommands runs the code properly, but when two different folders are requested to be loaded, a single loadCommands takes effect.

image image image

The reason why the error report was opened was fixed in v6.8 (except for the part I additionally stated above).

USERSATOSHI commented 2 months ago

After v6.8, a single loadCommands runs the code properly, but when two different folders are requested to be loaded, a single loadCommands takes effect.

image image image

The reason why the error report was opened was fixed in v6.8 (except for the part I additionally stated above).

this is intended as client.loadCommands doesn't do a single loader ,

it creates a loader , loads the cmd and closes itself

which is why if u use the second one , the first one would get override

I recommend using the old setup if u are doing multiple folder loading 👍

Leref commented 3 weeks ago

Issue been solved above, if there is needed for nested it can be added quickly but doesn't seem necessary.