Changed Param method of Command
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user