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
339 stars 135 forks source link

Bug: custom functions return themselves #550

Closed papaaj closed 8 months ago

papaaj commented 9 months ago

Bug Type

Function

Bugged Function

when you use a custom function (no matter where) it returns the things which you wanted it to return and the function name (for example $functionName)

I use github version of aoi.js if that's important

Version of aoi.js

v6.6.1

Version of Node.js

v20.10.0 (LTS)

Excepted Output

custom functions shouldnt return theirselves ($functionName)

Relevant log output

No response

Code of Conduct

Faf4a commented 9 months ago

Custom functions are completely bugged, @USERSATOSHI wanted to rewrite interpreter to fix that. Please bare with him.

Leref commented 8 months ago

Wrong, the way it works sufficiently is by adding the create function before loading commands, as well if you use $eval, it will execute twice since it's executing the output + the send message since eval is tricked into thinking it's a message command still. This was already resolved with $eval being updated.