pyraxo / sylphy

👑 the better discord bot framework
GNU Affero General Public License v3.0
95 stars 24 forks source link

Invalid arguments on commands #14

Closed dotkitkat closed 7 years ago

dotkitkat commented 7 years ago

args1 I wrote an example ping command that takes a member as an input: https://paste.safe.moe/xitikemiti.js But I get the above image as an error when I don't specify a member. I think it has something to do with the fact that I don't have any i18n setup. I can't find anything on the wiki about i18n nor can I find any bots with an example. Also, when I do specify a member, trying to access any Eris properties like .mention comes up as undefined.

dotkitkat commented 7 years ago

After finally searching around, I found that Yui had some locales. However, when I make my own and load them, all the strings load and work, except for INSUFFICIENT_ARGS. I have checked every one, making adjustments to ON_COOLDOWN and it did reflect in the bot, but INSUFFICIENT_ARGS still came up with the above error message. This also happens with member.NOT_FOUND, using this locale config.

Is there any documentation, anywhere, on locales? Maybe even just an example of all locale options? I feel like I'm missing something.

pyraxo commented 7 years ago

strange. will look into it asap.

thanks for the heads up!

what's the response of INSUFFICIENT_ARGS? is it the same as the first message? @dotkitkat

pyraxo commented 7 years ago

@dotkitkat does your file directory look something like this:

locales
  - en
    - default.json
    - anotherfile.json
  - jp
    - default.json
main.js

the locale folder should contain folders which are named after the locale, that contain json files

EDIT: whoops, never mind, was missing dem curly braces