<commit_before>package com.tisawesomeness.minecord.command.utility;

import java.awt.Color;

import com.tisawesomeness.minecord.command.Command;
import com.tisawesomeness.minecord.item.Item;
import com.tisawesomeness.minecord.item.Recipe;
import com.tisawesomeness.minecord.util.MessageUtils;

import net.dv8tion.jda.core.EmbedBuilder;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;

public class RecipeCommand extends Command {
	
	public CommandInfo getInfo() {
		return new CommandInfo(
			"recipe",
			"Looks up a recipe.",
			"<item name|id>",
			null,
			1000,
			false,
			false,
			true
		);
	}

	public Result run(String[] args, MessageReceivedEvent e) throws Exception {
		
		//Check for argument length.
		if (args.length == 0) {
			return new Result(Outcome.WARNING, ":warning: You must specify an item!");
		}
		//Search through the item database
		Item[] items = new Item[Recipe.values().length];
		for (int i = 0; i < items.length; i++) {
			items[i] = Recipe.values()[i].item;
			System.out.println(items[i].name());
		}
		Item item = Item.search(items, Item.prepareArgs(args));
		Recipe recipe = null;
		if (item != null) {
			recipe = Recipe.valueOf(item.name());
		}
		
		MessageUtils.log(
			"Recipe command executed" +
			"\nCommand: `" + e.getMessage().getContentDisplay() + "`" +
			"\nRecipe: `" + recipe + "`"
		);
		
		//If nothing is found
		if (recipe == null) {
			return new Result(Outcome.WARNING,
				":warning: That item does not exist or does not have a recipe! " +
				"\n" + "Did you spell it correctly?");<commit_msg>Begone spam<commit_after>package com.tisawesomeness.minecord.command.utility;

import java.awt.Color;

import com.tisawesomeness.minecord.command.Command;
import com.tisawesomeness.minecord.item.Item;
import com.tisawesomeness.minecord.item.Recipe;
import com.tisawesomeness.minecord.util.MessageUtils;

import net.dv8tion.jda.core.EmbedBuilder;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;

public class RecipeCommand extends Command {
	
	public CommandInfo getInfo() {
		return new CommandInfo(
			"recipe",
			"Looks up a recipe.",
			"<item name|id>",
			null,
			1000,
			false,
			false,
			true
		);
	}

	public Result run(String[] args, MessageReceivedEvent e) throws Exception {
		
		//Check for argument length.
		if (args.length == 0) {
			return new Result(Outcome.WARNING, ":warning: You must specify an item!");
		}
		//Search through the item database
		Item[] items = new Item[Recipe.values().length];
		for (int i = 0; i < items.length; i++) {
			items[i] = Recipe.values()[i].item;
		}
		Item item = Item.search(items, Item.prepareArgs(args));
		Recipe recipe = null;
		if (item != null) {
			recipe = Recipe.valueOf(item.name());
		}
		
		MessageUtils.log(
			"Recipe command executed" +
			"\nCommand: `" + e.getMessage().getContentDisplay() + "`" +
			"\nRecipe: `" + recipe + "`"
		);
		
		//If nothing is found
		if (recipe == null) {
			return new Result(Outcome.WARNING,
				":warning: That item does not exist or does not have a recipe! " +
				"\n" + "Did you spell it correctly?");
{'fraction_non_alphanumeric': 0.1393548387096774, 'fraction_numerical': 0.005161290322580645, 'mean_word_length': 3.663157894736842, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1565139', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1029, 'n_words': 259}