Files
payphone/payphone/core/masks.py
T

119 lines
5.6 KiB
Python

import random
from payphone.core import constants
MASKS = {
"ferret": 1278176917123760139 if constants.IS_DEBUG else 1278173356423909448,
"octopus": 1278176904410697880 if constants.IS_DEBUG else 1278173331421397072,
"cat": 1278176891290783824 if constants.IS_DEBUG else 1278173317034934282,
"monkey": 1278176881195094049 if constants.IS_DEBUG else 1278173297456185344,
"panda": 1278176868767629455 if constants.IS_DEBUG else 1278173272390762538,
"sheep": 1278176856910073946 if constants.IS_DEBUG else 1278173251914432563,
"horse": 1278176842116894760 if constants.IS_DEBUG else 1278173237582237708,
"bee": 1278176823846506577 if constants.IS_DEBUG else 1278173216652787826,
"wild boar": 1278176806498996235 if constants.IS_DEBUG else 1278173196658413649,
"duck": 1278176794591232102 if constants.IS_DEBUG else 1278173181483679918,
"chicken": 1278176781790216233 if constants.IS_DEBUG else 1278173167218589726,
"elephant": 1278176771413512213 if constants.IS_DEBUG else 1278173150063886346,
"cow": 1278176761565413483 if constants.IS_DEBUG else 1278173125024153733,
"deer": 1278176744691597312 if constants.IS_DEBUG else 1278173110105014406,
"turkey": 1278176730619576321 if constants.IS_DEBUG else 1278173091796877363,
"dog": 1278176719932751903 if constants.IS_DEBUG else 1278173070846201856,
"beaver": 1278176709530882091 if constants.IS_DEBUG else 1278173051485425705,
"camel": 1278176699921465394 if constants.IS_DEBUG else 1278173035018584086,
"koala": 1278176687493746709 if constants.IS_DEBUG else 1278173021345021952,
"hippo": 1278176675846295603 if constants.IS_DEBUG else 1278173007419932804,
"ostrich": 1278176661317095494 if constants.IS_DEBUG else 1278172994669248523,
"rhino": 1278176650340864000 if constants.IS_DEBUG else 1278172980848885832,
"squirrel": 1278176637627924570 if constants.IS_DEBUG else 1278172965590274088,
"chamaleon": 1278176625392877648 if constants.IS_DEBUG else 1278172953305022496,
"frog": 1278176614512857088 if constants.IS_DEBUG else 1278172937043710094,
"skunk": 1278176604509442079 if constants.IS_DEBUG else 1278172923495976981,
"walrus": 1278176554723311678 if constants.IS_DEBUG else 1278172912368619603,
"hedgehog": 1278176541750067252 if constants.IS_DEBUG else 1278172899911405678,
"pig": 1278176531415564332 if constants.IS_DEBUG else 1278172885239861338,
"hen": 1278176518643646485 if constants.IS_DEBUG else 1278172871302184994,
"turtle": 1278176507428343891 if constants.IS_DEBUG else 1278172858199314455,
"mouse": 1278175957047578696 if constants.IS_DEBUG else 1278172846442414081,
"rabbit": 1278175944007487489 if constants.IS_DEBUG else 1278172831921999945,
"goat": 1278175933915856938 if constants.IS_DEBUG else 1278172815421472808,
"lion": 1278175922964664382 if constants.IS_DEBUG else 1278172803534684235,
"wolf": 1278175902047535165 if constants.IS_DEBUG else 1278172791052570687,
"snake": 1278175869331968061 if constants.IS_DEBUG else 1278172776259260547,
"llama": 1278175850008674325 if constants.IS_DEBUG else 1278172764913799168,
"crab": 1278175835634925620 if constants.IS_DEBUG else 1278172752322232330,
"owl": 1278175822947029152 if constants.IS_DEBUG else 1278172738309193749,
"bat": 1278175813572886550 if constants.IS_DEBUG else 1278172726426865724,
"zebra": 1278175799962505216 if constants.IS_DEBUG else 1278172715114565753,
"fox": 1278175788818104474 if constants.IS_DEBUG else 1278172702955274292,
"gorilla": 1278175775891259456 if constants.IS_DEBUG else 1278172687797194824,
"sloth": 1278175765661356175 if constants.IS_DEBUG else 1278172676837343242,
"puffer fish": 1278175753497743360 if constants.IS_DEBUG else 1278172665093558294,
"bear": 1278175741569142867 if constants.IS_DEBUG else 1278172653076746301,
"giraffe": 1278175732601983006 if constants.IS_DEBUG else 1278172640296702073,
"penguin": 1278175721956573236 if constants.IS_DEBUG else 1278172627629899808,
"parrot": 1278175706798489642 if constants.IS_DEBUG else 1278172600702337074,
}
CAT_MASKS = {
"dinosaur": 1278255435652010014 if constants.IS_DEBUG else 1278254725833297965,
"shleepy cat": 1278255475066146816 if constants.IS_DEBUG else 1278254779767984181,
"cozy cat": 1278255420124696663 if constants.IS_DEBUG else 1278254704324771893,
"coquette cat": 1278255408254816300 if constants.IS_DEBUG else 1278254684200636428,
"panic cat": 1278255451993145345 if constants.IS_DEBUG else 1278254760700674098,
}
def get_random_mask(not_int: list[str] = [], masks: dict[str, int] = MASKS) -> str:
"""Returns a random mask.
Args:
not_int (list[str], optional): Masks to exclude. Defaults to [].
masks (dict[str, int], optional): The masks. Defaults to MASKS.
Returns:
str: The mask.
"""
return random.choice([mask for mask in masks.keys() if mask not in not_int])
def get_mask_name(mask: str) -> str:
"""Returns the name of the mask.
Args:
mask (str): The mask.
Returns:
str: The name of the mask.
"""
return mask.title()
def get_mask_image_url(mask: str) -> str:
"""Returns the URL of the mask image.
Args:
mask (str): The mask.
Returns:
str: The URL of the mask image.
"""
return f"https://cdn.discordapp.com/emojis/{MASKS[mask] if mask in MASKS else CAT_MASKS[mask]}.png"
def get_mask_emoji(mask: str) -> str:
"""Returns the emoji of the mask.
Args:
mask (str): The mask.
Returns:
str: The emoji of the mask.
"""
return f"<:{mask.replace(" ", "")}:{MASKS[mask] if mask in MASKS else CAT_MASKS[mask]}>"