owengombas / discord.ts

🤖 Create your discord bot by using TypeScript and decorators!

Home Page:https://owencalvin.github.io/discord.ts/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CommandMessage: commandContent ("-cmd hello there" => "hello there")

owengombas opened this issue · comments

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

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(' ')