func (cmd *Command) validate() error {
	if len(cmd.Command) == 0 || len(cmd.Command) > 32 {
		return errCommandLength(cmd.Command)
	}
	for x := 0; x < len(cmd.Command); x++ {
		b := cmd.Command[x]
		if b >= 'a' && b <= 'z' {
			continue
		}
		if b >= '0' && b <= '9' {
			continue
		}
		if b == '_' {
			continue
		}
		return errCommandValue(cmd.Command)
	}
	if len(cmd.Description) < 3 || len(cmd.Description) > 256 {
		return errDescLength(cmd.Command)
	}
	if cmd.Handler == nil {
		return errHandlerNil(cmd.Command)
	}
	return nil
}
validate will return an error if command is not valid.
package bot
import (
	"fmt"
)
type Command struct {
	Command string `json:"command"`
	Description string `json:"description"`
	Handler UpdateHandler `json:"-"`
}