Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
owengombas opened this issue Jun 4, 2020 · 3 comments
Open
Labels
enhancement New feature or request v4 Issue related to v4 (@Command)
Projects

Comments

@owengombas
Copy link
Owner

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

@owengombas owengombas created this issue from a note in discord.ts (TO DO) Jun 4, 2020
@owengombas owengombas added enhancement New feature or request todo 🗒️ labels Jun 4, 2020
@owengombas
Copy link
Owner Author

@samarmeena
Copy link
Contributor

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

@owengombas owengombas reopened this Jun 5, 2020
@orangixx
Copy link

orangixx commented Dec 8, 2020

message.content.split(' ').slice(1).join(' ')

@owengombas owengombas added v4 Issue related to v4 (@Command) and removed todo 🗒️ labels Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v4 Issue related to v4 (@Command)
Projects
discord.ts
  
TO DO
Development

No branches or pull requests

3 participants