func Search(cmdInfo CommandInfo) {
	if len(cmdInfo.CmdOps) == 1 {
		return
	}
	if strings.ToLower(cmdInfo.CmdOps[1]) == "north" || strings.ToLower(cmdInfo.CmdOps[1]) == "south" {
		// ByMonth search
		byMonth(cmdInfo.CmdOps[1:], cmdInfo)
		return
	}
	formatStr := toLowerAndFormat(cmdInfo.CmdOps[1:])
	entry, err := cmdInfo.Service.Entry.ByName(formatStr, "bug_and_fish")
	searchItem := formatName(cmdInfo.CmdOps[1:])
	if err != nil {
		// If entry was not found in database
		word := strings.Split(searchItem, " ")
		vals := cmdInfo.Service.Entry.FindLike(toLowerAndFormat(word), "bug_and_fish")
		var fields []*discordgo.MessageEmbedField
		for _, val := range vals {
			fields = append(fields, createFields(strings.Title(val.Type), strings.Title(removeUnderscore(val.Name)), true))
		}
		if len(fields) == 0 {
			// If no similar entries were found
			msg := cmdInfo.createMsgEmbed(searchItem, errThumbURL, "No similar entries found.", errColor, fields)
			cmdInfo.Ses.ChannelMessageSendEmbed(cmdInfo.BotChID, msg)
			return
		}
		msg := cmdInfo.createMsgEmbed(searchItem, errThumbURL, "Entry Not Found in Database... Perhaps you meant...?", errColor, fields)
		cmdInfo.Ses.ChannelMessageSendEmbed(cmdInfo.BotChID, msg)
		return
	}
	nHemi, sHemi := parseHemi(entry.NorthSt, entry.NorthEnd, entry.SouthSt, entry.SouthEnd)
	fields := format(
		createFields("Price", strconv.Itoa(entry.SellPrice)+" Bells", true),
		createFields("Location", removeUnderscore(entry.Location), true),
		createFields("Time", removeUnderscore(entry.Time), false),
		createFields("Northern Hemisphere", nHemi, false),
		createFields("Southern Hemisphere", sHemi, false),
	)
	msg := cmdInfo.createMsgEmbed(searchItem, entry.Image, strings.Title(entry.Type), searchColor, fields)
	cmdInfo.Ses.ChannelMessageSendEmbed(cmdInfo.BotChID, msg)
}
// Search will look up a possible insect or fish in the database and display to the user
Search will look up a possible insect or fish in the database and display to the user
// Search will look up a possible insect or fish in the database and display to the user
func Search(cmdInfo CommandInfo) {
	if len(cmdInfo.CmdOps) == 1 {
		return
	}
	if strings.ToLower(cmdInfo.CmdOps[1]) == "north" || strings.ToLower(cmdInfo.CmdOps[1]) == "south" {
		byMonth(cmdInfo.CmdOps[1:], cmdInfo)
		return
	}
	formatStr := toLowerAndFormat(cmdInfo.CmdOps[1:])
	entry, err := cmdInfo.Service.Entry.ByName(formatStr, "bug_and_fish")
	searchItem := formatName(cmdInfo.CmdOps[1:])
	if err != nil {
		word := strings.Split(searchItem, " ")
		vals := cmdInfo.Service.Entry.FindLike(toLowerAndFormat(word), "bug_and_fish")
		var fields []*discordgo.MessageEmbedField
		for _, val := range vals {
			fields = append(fields, createFields(strings.Title(val.Type), strings.Title(removeUnderscore(val.Name)), true))
		}
		if len(fields) == 0 {
			msg := cmdInfo.createMsgEmbed(searchItem, errThumbURL, "No similar entries found.", errColor, fields)
			cmdInfo.Ses.ChannelMessageSendEmbed(cmdInfo.BotChID, msg)
			return
		}
		msg := cmdInfo.createMsgEmbed(searchItem, errThumbURL, "Entry Not Found in Database... Perhaps you meant...?", errColor, fields)
		cmdInfo.Ses.ChannelMessageSendEmbed(cmdInfo.BotChID, msg)
		return
	}
	nHemi, sHemi := parseHemi(entry.NorthSt, entry.NorthEnd, entry.SouthSt, entry.SouthEnd)
	fields := format(
		createFields("Price", strconv.Itoa(entry.SellPrice)+" Bells", true),
		createFields("Location", removeUnderscore(entry.Location), true),
		createFields("Time", removeUnderscore(entry.Time), false),
		createFields("Northern Hemisphere", nHemi, false),
		createFields("Southern Hemisphere", sHemi, false),
	)
	msg := cmdInfo.createMsgEmbed(searchItem, entry.Image, strings.Title(entry.Type), searchColor, fields)
	cmdInfo.Ses.ChannelMessageSendEmbed(cmdInfo.BotChID, msg)
}
func Search ( cmdInfo CommandInfo ) { if len ( cmdInfo . CmdOps ) == 1 { return } if strings . ToLower ( cmdInfo . CmdOps [ 1 ] ) == " " || strings . ToLower ( cmdInfo . CmdOps [ 1 ] ) == " " { byMonth ( cmdInfo . CmdOps [ 1 : ] , cmdInfo ) return } formatStr := toLowerAndFormat ( cmdInfo . CmdOps [ 1 : ] ) entry , err := cmdInfo . Service . Entry . ByName ( formatStr , " " ) searchItem := formatName ( cmdInfo . CmdOps [ 1 : ] ) if err != nil { word := strings . Split ( searchItem , " " ) vals := cmdInfo . Service . Entry . FindLike ( toLowerAndFormat ( word ) , " " ) var fields [ ] * discordgo . MessageEmbedField for _ , val := range vals { fields = append ( fields , createFields ( strings . Title ( val . Type ) , strings . Title ( removeUnderscore ( val . Name ) ) , true ) ) } if len ( fields ) == 0 { msg := cmdInfo . createMsgEmbed ( searchItem , errThumbURL , " " , errColor , fields ) cmdInfo . Ses . ChannelMessageSendEmbed ( cmdInfo . BotChID , msg ) return } msg := cmdInfo . createMsgEmbed ( searchItem , errThumbURL , " " , errColor , fields ) cmdInfo . Ses . ChannelMessageSendEmbed ( cmdInfo . BotChID , msg ) return } nHemi , sHemi := parseHemi ( entry . NorthSt , entry . NorthEnd , entry . SouthSt , entry . SouthEnd ) fields := format ( createFields ( " " , strconv . Itoa ( entry . SellPrice ) + " " , true ) , createFields ( " " , removeUnderscore ( entry . Location ) , true ) , createFields ( " " , removeUnderscore ( entry . Time ) , false ) , createFields ( " " , nHemi , false ) , createFields ( " " , sHemi , false ) , ) msg := cmdInfo . createMsgEmbed ( searchItem , entry . Image , strings . Title ( entry . Type ) , searchColor , fields ) cmdInfo . Ses . ChannelMessageSendEmbed ( cmdInfo . BotChID , msg ) }
Search will look up a possible insect or fish in the database and display to the user
Search will look up a possible insect or fish in the database and display to the user
// ByMonth search // If entry was not found in database // If no similar entries were found