discord.ts
discord.ts copied to clipboard
CommandMessage: commandContent ("-cmd hello there" => "hello there")
trafficstars
this is example of command
-cmd hello there
I know we can read the parameters by slug
cmd :text :text2
but I wish to read full text
hello there
I can replace -cmd
but is there any alternative solution?
By Harry
Done https://github.com/OwenCalvin/discord.ts/commit/4af0a233bd1c703a8710441e12673525437b6d93
there is a problem with commit, command.commandContent is only output without prefix only
current passed regex for command `-cmd hello there`` is
/^-/i
expected output
/^-([\w-]+)\s
message.content.split(' ').slice(1).join(' ')