# Path: cogs/utils/checks.py
# def is_owner_check(author):
# def is_owner():
# def is_admin_check(channel, ctx, user=None):
# def is_admin():
# def is_not_PM():
# 
# Path: cogs/audio.py
# class AudioPlayerNotFoundError(UserError):
# 	def __init__(self, message):
# 		super().__init__(message)


import disnake
import os
import re
import logging
from disnake.ext import commands
from __main__ import settings, botdata, httpgetter
from cogs.utils.helpers import *
from cogs.utils.clip import *
from cogs.utils import checks
from .mangocog import *
from cogs.audio import AudioPlayerNotFoundError
			data["id"] = species_data["id"]
		data["wiki_url"] = f"http://www.serebii.net/pokedex-sm/{data['id']:03d}.shtml"


		if form_data:
			data["sprites"] = form_data["sprites"]
			name = localize(form_data["names"], "name")
			if name:
				data["localized_name"] = name
			if form_data.get("is_mega"):
				data["wiki_url"] += "#mega"

		return data, species_data

	# returns True on success, False on failure
	async def play_pokecry(self, ctx, poke_id, namestring, old=False):
		is_mega = "mega" in str(namestring).lower()

		name = str(poke_id)
		if old:
			name = f"old/{name}"
		if is_mega:
			name = f"{name}-mega"

		try:
			clip = await self.get_clip(f"url:http://dillerm.io/data/pokemon_cries/{name}.ogg", ctx)
			clip.volume = 0.1
			await self.play_clip(clip, ctx)
		except Http404Error:
			return False

# Path: cogs/utils/checks.py
# def is_owner_check(author):
# def is_owner():
# def is_admin_check(channel, ctx, user=None):
# def is_admin():
# def is_not_PM():
# 
# Path: cogs/audio.py
# class AudioPlayerNotFoundError(UserError):
# 	def __init__(self, message):
# 		super().__init__(message)


# Path: cogs/pokemon.py
import disnake
import os
import re
import logging
from disnake.ext import commands
from __main__ import settings, botdata, httpgetter
from cogs.utils.helpers import *
from cogs.utils.clip import *
from cogs.utils import checks
from .mangocog import *
from cogs.audio import AudioPlayerNotFoundError

			data["id"] = species_data["id"]
		data["wiki_url"] = f"http://www.serebii.net/pokedex-sm/{data['id']:03d}.shtml"


		if form_data:
			data["sprites"] = form_data["sprites"]
			name = localize(form_data["names"], "name")
			if name:
				data["localized_name"] = name
			if form_data.get("is_mega"):
				data["wiki_url"] += "#mega"

		return data, species_data

	# returns True on success, False on failure
	async def play_pokecry(self, ctx, poke_id, namestring, old=False):
		is_mega = "mega" in str(namestring).lower()

		name = str(poke_id)
		if old:
			name = f"old/{name}"
		if is_mega:
			name = f"{name}-mega"

		try:
			clip = await self.get_clip(f"url:http://dillerm.io/data/pokemon_cries/{name}.ogg", ctx)
			clip.volume = 0.1
			await self.play_clip(clip, ctx)
		except Http404Error:
			return False

		except AudioPlayerNotFoundError: