framework icon indicating copy to clipboard operation
framework copied to clipboard

The "\n" character is not a valid argument separator.

Open GhomKrosmonaute opened this issue 3 years ago • 0 comments

If you have the following command type :

import * as app from "../app.js"

export default new app.Command({
  name: "hello",
  channelType: "all",
  description: "Say hello to a person",
  positional: [
    {
      name: "firstname",
      description: "First name",
    },
    {
      name: "lastname",
      description: "Last name",
    },
  ],
  async run(message) {
    return message.send(`Hello ${message.args.firstname} ${message.args.lastname}`);
  },
})

Its use could look like !hello Camille Abella and scatter the positionables over several lines should be possible, unfortunately the line breaks are not considered by the Yargs parser as valid argument separators.

GhomKrosmonaute avatar Dec 19 '21 20:12 GhomKrosmonaute