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

feat($index) + improvements #533

Closed Faf4a closed 8 months ago

Faf4a commented 9 months ago

Fixed a random console.log that was forgotten.

Deprecated {selectMenuOption:} as it's also deprecated from discord.js, we should starting to use {stringInput:} and so on.

Faf4a commented 9 months ago

Also, @USERSATOSHI how does aoi.js handle the parser select menus? Couldn't find any const of select menus anywhere.

I'd like to add parsers for roles/channels and mentionables.

USERSATOSHI commented 9 months ago

Also, @USERSATOSHI how does aoi.js handle the parser select menus? Couldn't find any const of select menus anywhere.

I'd like to add parsers for roles/channels and mentionables.

it is at same place you added stringInput support

Faf4a commented 9 months ago

Should $createGuild and $editClientAboutMe (no idea what this function should be called) exist in aoi.js? I mean, there is no discord.js method for this, and would require direct access to the api. (only for the about me one)

USERSATOSHI commented 8 months ago

Should $createGuild and $editClientAboutMe (no idea what this function should be called) exist in aoi.js? I mean, there is no discord.js method for this, and would require direct access to the api. (only for the about me one)

createguild is fine but using an api based function is kinda a no go cause we dont know when that api would go down or something

tho keep the createGuild in a separate pr

Faf4a commented 8 months ago

createguild is fine but using an api based function is kinda a no go cause we dont know when that api would go down or something

tho keep the createGuild in a separate pr

alright

Faf4a commented 8 months ago

The custom function "fix" would need to be reviewed.

The main issue was that it escaped the brackets, that's fixed with RegEx.

However, the double sending in eval could only be solved by removing the code property which is used in eval from aoi.js-type-custom-functions.

Faf4a commented 8 months ago

Interesting enough, aoi.js custom functions aren't registered as functions according to the interpreter?

Whenever using custom functions within a command, it'll return the function itself, however the function does appear in the cache and functions array.

No clue what happened there (tested with and without my changes)

Faf4a commented 8 months ago

Reverted modifications of the core and so on, functions are still to be reviewed.

Faf4a commented 8 months ago

Added $index to return the current loop index.

Faf4a commented 8 months ago

@USERSATOSHI ready for review :)