diff --git a/command.go b/command.go index f52d490..ff0a0ae 100644 --- a/command.go +++ b/command.go @@ -26,7 +26,11 @@ func (c *Command) String() string { } func (c *Command) Param(text string) string { - return strings.TrimPrefix(text, "/"+c.Body+" ") + strs := strings.SplitN(text, " ", 2) + if len(strs) > 1 { + return strs[1] + } + return "" } func MakeCommandList(format string, commands ...*Command) string {