progval / Limnoria

A robust, full-featured, and user/programmer-friendly Python IRC bot, with many existing plugins.
https://docs.limnoria.net/
Other
621 stars 174 forks source link

aka gives me : Error: "<location>" is not a valid command #1586

Closed klapvogn closed 3 months ago

klapvogn commented 3 months ago

I'm trying to :

aka add whelp "Weather: +w/+w2 [<location>] (uses weatherstack, and openweathermap, respectively), +fc [<location>] (openweathermap), +setweather <location> (set
default, to not require <location> for +w/+w2). Locations are saved per *!ident@host so you may need to update your
location if these change."

but everytime I get : Error: "<location>" is not a valid command

what am I doing wrong?

progval commented 3 months ago

There are two mistakes:

  1. you did not escape [<location>] so Limnoria interprets the brackets as you wanting to use a nested command. You can use quotes to escape them
  2. (the next error you'll get after this one) Akas are commands, so you need to prepend the echo command

So:

aka add whelp "echo \"Weather: +w/+w2 [<location>] (uses weatherstack, ...)\""

instead of

aka add whelp "Weather: +w/+w2 [<location>] (uses weatherstack, ...)"
klapvogn commented 3 months ago

thanks for the quick and fast help :)