<commit_before>
import discord
from discord.ext import commands

import clients
from utilities import checks

def setup(bot):
	bot.add_cog(Pokemon(bot))

class Pokemon:
	
	def __init__(self, bot):
		self.bot = bot
	
	@commands.group(aliases = ["pokémon"], invoke_without_command = True)
	@checks.not_forbidden()
	async def pokemon(self, ctx, id_or_name : str):
		'''WIP'''
		# TODO: colors?, egg groups?, forms?, genders?, habitats?, 
		#		pokeathlon stats?, shapes?, stats?, version groups?
		await ctx.invoke(self.bot.get_command("help"), ctx.invoked_with)
	
	@pokemon.command()
	@checks.not_forbidden()
	async def ability(self, ctx, id_or_name : str):
		'''
		WIP
		Abilities provide passive effects for Pokémon in battle or in the overworld
		Pokémon have multiple possible abilities but can have only one ability at a time
		Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Ability) for greater detail
		'''
		async with clients.aiohttp_session.get("https://pokeapi.co/api/v2/ability/" + id_or_name) as resp:
			data = await resp.json()
			if resp.status == 404:
				return await ctx.embed_reply(f":no_entry: Error: {data['detail']}")
		await ctx.embed_reply(title = f"{data['name'].capitalize()} ({data['id']})", 
								fields = (("Generation", data["generation"]["name"]),))
	
	@pokemon.command()
	@checks.not_forbidden()
	async def berry(self, ctx, id_or_name : str):
		'''
		Berries
		Small fruits that can provide HP and status condition restoration, stat enhancement, and even damage negation when eaten by Pokémon
		Check out [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Berry) for greater detail
		'''
		async with clients.aiohttp_session.get("http://pokeapi.co/api/v2/berry/" + id_or_name) as resp:
			data = await resp.json()
			if resp.status == 404:
				return await ctx.embed_reply(f":no_entry: Error: {data['detail']}")
		await ctx.embed_reply(title = f"{data['name'].capitalize()} ({data['id']})", 
								fields = (("Item Name", data["item"]["name"].capitalize()), 
											("Growth Time", f"{data['growth_time']}h*4"), ("Max Harvest", data["max_harvest"]), <commit_msg>[Discord] Update pokemon berry command to use https API link<commit_after>
import discord
from discord.ext import commands

import clients
from utilities import checks

def setup(bot):
	bot.add_cog(Pokemon(bot))

class Pokemon:
	
	def __init__(self, bot):
		self.bot = bot
	
	@commands.group(aliases = ["pokémon"], invoke_without_command = True)
	@checks.not_forbidden()
	async def pokemon(self, ctx, id_or_name : str):
		'''WIP'''
		# TODO: colors?, egg groups?, forms?, genders?, habitats?, 
		#		pokeathlon stats?, shapes?, stats?, version groups?
		await ctx.invoke(self.bot.get_command("help"), ctx.invoked_with)
	
	@pokemon.command()
	@checks.not_forbidden()
	async def ability(self, ctx, id_or_name : str):
		'''
		WIP
		Abilities provide passive effects for Pokémon in battle or in the overworld
		Pokémon have multiple possible abilities but can have only one ability at a time
		Check out [Bulbapedia](http://bulbapedia.bulbagarden.net/wiki/Ability) for greater detail
		'''
		async with clients.aiohttp_session.get("https://pokeapi.co/api/v2/ability/" + id_or_name) as resp:
			data = await resp.json()
			if resp.status == 404:
				return await ctx.embed_reply(f":no_entry: Error: {data['detail']}")
		await ctx.embed_reply(title = f"{data['name'].capitalize()} ({data['id']})", 
								fields = (("Generation", data["generation"]["name"]),))
	
	@pokemon.command()
	@checks.not_forbidden()
	async def berry(self, ctx, id_or_name : str):
		'''
		Berries
		Small fruits that can provide HP and status condition restoration, stat enhancement, and even damage negation when eaten by Pokémon
		Check out [Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Berry) for greater detail
		'''
		async with clients.aiohttp_session.get("https://pokeapi.co/api/v2/berry/" + id_or_name) as resp:
			data = await resp.json()
			if resp.status == 404:
				return await ctx.embed_reply(f":no_entry: Error: {data['detail']}")
		await ctx.embed_reply(title = f"{data['name'].capitalize()} ({data['id']})", 
								fields = (("Item Name", data["item"]["name"].capitalize()), 
											("Growth Time", f"{data['growth_time']}h*4"), ("Max Harvest", data["max_harvest"]), 
{'fraction_non_alphanumeric': 0.15219421101774042, 'fraction_numerical': 0.004201680672268907, 'mean_word_length': 4.683023872679045, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, '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': '201239', 'n_tokens_mistral': 1588, 'n_tokens_neox': 1428, 'n_words': 373}