Changed Param method of Command

This commit is contained in:
nefrace 2023-01-24 03:10:57 +03:00
parent d035524ebc
commit c0143707e9
1 changed files with 5 additions and 1 deletions

View File

@ -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 {