func parseCmd(fullCmd, name, imgURL string) *newEvent {
	var event newEvent
	event.Name = name
	event.Img = imgURL
	f := func(c rune) bool {
		return !unicode.IsLetter(c) && !unicode.IsSpace(c) && !unicode.IsNumber(c)
	}
	commandBytes := bytes.FieldsFunc([]byte(fullCmd), f)
	var parsedCmd []string
	for _, e := range commandBytes {
		parsedCmd = append(parsedCmd, strings.ToLower(strings.TrimSpace(string(e))))
	}
	if !validEvent(parsedCmd) || len(parsedCmd) != 4 {
		return nil
	}
	for i := 0; i < len(parsedCmd); i += 2 {
		if strings.ToLower(parsedCmd[i]) == "limit" {
			event.Limit = strings.ToUpper(parsedCmd[i+1])
		}
		if strings.ToLower(parsedCmd[i]) == "msg" {
			event.Msg = strings.Title(parsedCmd[i+1])
		}
	}
	return &event
}
// parseCmd will attempt to parse a user's set event command.
//
// If successful, it will return a pointer to the new event
//
// else, it will return nil
parseCmd will attempt to parse a user's set event command.

If successful, it will return a pointer to the new event

else, it will return nil
// parseCmd will attempt to parse a user ' s set event command . // // If successful it will return a pointer to the new event // // else it will return nil
func parseCmd(fullCmd, name, imgURL string) *newEvent {
	var event newEvent
	event.Name = name
	event.Img = imgURL
	f := func(c rune) bool {
		return !unicode.IsLetter(c) && !unicode.IsSpace(c) && !unicode.IsNumber(c)
	}
	commandBytes := bytes.FieldsFunc([]byte(fullCmd), f)
	var parsedCmd []string
	for _, e := range commandBytes {
		parsedCmd = append(parsedCmd, strings.ToLower(strings.TrimSpace(string(e))))
	}
	if !validEvent(parsedCmd) || len(parsedCmd) != 4 {
		return nil
	}
	for i := 0; i < len(parsedCmd); i += 2 {
		if strings.ToLower(parsedCmd[i]) == "limit" {
			event.Limit = strings.ToUpper(parsedCmd[i+1])
		}
		if strings.ToLower(parsedCmd[i]) == "msg" {
			event.Msg = strings.Title(parsedCmd[i+1])
		}
	}
	return &event
}
func parseCmd ( fullCmd , name , imgURL string ) * newEvent { var event newEvent event . Name = name event . Img = imgURL f := func ( c rune ) bool { return ! unicode . IsLetter ( c ) && ! unicode . IsSpace ( c ) && ! unicode . IsNumber ( c ) } commandBytes := bytes . FieldsFunc ( [ ] byte ( fullCmd ) , f ) var parsedCmd [ ] string for _ , e := range commandBytes { parsedCmd = append ( parsedCmd , strings . ToLower ( strings . TrimSpace ( string ( e ) ) ) ) } if ! validEvent ( parsedCmd ) || len ( parsedCmd ) != 4 { return nil } for i := 0 ; i < len ( parsedCmd ) ; i += 2 { if strings . ToLower ( parsedCmd [ i ] ) == " " { event . Limit = strings . ToUpper ( parsedCmd [ i + 1 ] ) } if strings . ToLower ( parsedCmd [ i ] ) == " " { event . Msg = strings . Title ( parsedCmd [ i + 1 ] ) } } return & event }
parseCmd will attempt to parse a user's set event command.
parseCmd will attempt to parse a user ' s set event command .