from hata import Embed, ERROR_CODES, Color, BUILTIN_EMOJIS, Client from hata.ext.command_utils import ChooseMenu, Pagination from hata.backend.utils import from_json from hata.ext.slash import InteractionResponse, abort, Button, Row from hata.ext.slash.menus import Menu from hata.discord.http import LIBRARY_USER_AGENT from hata.backend.headers import USER_AGENT, CONTENT_TYPE from bot_utils.tools import BeautifulSoup, choose, pop_one, choose_notsame WORD_MATCH_RP = re.compile('[^a-zA-z0-9]+') HEADERS = {USER_AGENT: LIBRARY_USER_AGENT} BOORU_COLOR = Color.from_html('#138a50') SAFE_BOORU = 'http://safebooru.org/index.php?page=dapi&s=post&q=index&tags=' NSFW_BOORU = 'http://gelbooru.com/index.php?page=dapi&s=post&q=index&tags=' TOUHOU_REQUIRED = { 'solo', } TOUHOU_BANNED = { 'underwear', 'sideboob', 'pov_feet', 'underboob', 'upskirt', 'sexually_suggestive',
Token = os.environ.get('Token') APPLICATION_ID = os.environ.get('APPLICATION_ID') GUILD = Guild.precreate(os.environ.get('GUILD_ID')) Pichu = Client(Token, application_id=APPLICATION_ID) setup_ext_slash(Pichu) # emotes CAT_FISH = Emoji.precreate(os.environ.get('CAT_FISH')) CAT_SAD = Emoji.precreate(os.environ.get('CAT_SAD')) CAT_WAY = Emoji.precreate(os.environ.get('CAT_WAY')) NEKOGIRL_KISS = Emoji.precreate(os.environ.get("NEKOGIRL_KISS")) NEKOGIRL_PEEK = Emoji.precreate(os.environ.get('NEKOGIRL_PEEK')) # colors CAT_FACT_COLOR = Color.from_html('#F6D33C') OwO_COLOR = Color.from_html('#FF69B4') NEKOGIRL_COLOR = Color.from_html('#FFB6C1') CAT_COLOR = Color.from_html('#000000') # data CAT_FACTS = [ "A house cat’s genome is 95.6 percent tiger, and they share many behaviors with their jungle ancestors, says Layla Morgan Wilde, a cat behavior expert and the founder of Cat Wisdom 101. These behaviors include scent marking by scratching, prey play, prey stalking, pouncing, chinning, and urine marking.", "Cats are believed to be the only mammals who don’t taste sweetness.", "Cats are nearsighted, but their peripheral vision and night vision are much better than that of humans.", "Cats are supposed to have 18 toes (five toes on each front paw; four toes on each back paw).", "Cats can jump up to six times their length.", "Cats’ claws all curve downward, which means that they can’t climb down trees head-first. Instead, they have to back down the trunk.", "Cats’ collarbones don’t connect to their other bones, as these bones are buried in their shoulder muscles.", "Cats have 230 bones, while humans only have 206.", "Cats have an extra organ that allows them to taste scents on the air, which is why your cat stares at you with her mouth open from time to time.",
ROLE__NEKO_DUNGEON__EVENT_WINNER = Role.precreate(771989284231053323) ROLE__NEKO_DUNGEON__EVENT_PARTICIPANT = Role.precreate(801608590720106496) ROLE__NEKO_DUNGEON__HEART_BOOST = Role.precreate(846320725580709908) ROLE__NEKO_DUNGEON__ADMIN = Role.precreate(403581319139033090) ROLE__NEKO_DUNGEON__EMOJI_MANAGER = Role.precreate(864748298116268053) INVITE__NEKO_DUNGEON = Invite.precreate('3cH2r5d') CATEGORY__NEKO_DUNGEON__BOTS = ChannelCategory.precreate(445191611727478795) CATEGORY__NEKO_DUNGEON__BIG_BRO = ChannelCategory.precreate(829104265049538620) EMOJI__HEART_CURRENCY = Emoji.precreate(603533301516599296, name='youkai_kokoro') COLOR__SATORI_HELP = Color.from_rgb(118, 0, 161) COLOR__KOISHI_HELP = Color.from_html('#ffd21e') COLOR__FLAN_HELP = Color.from_rgb(230, 69, 0) COLOR__MARISA_HELP = Color.from_html('#e547ed') COLOR__EVENT = Color(2316923) LINK__KOISHI_GIT = 'https://github.com/HuyaneMatsu/Koishi' LINK__HATA_GIT = 'https://github.com/HuyaneMatsu/hata' LINK__HATA_DOCS = 'https://www.astil.dev/project/hata/docs/hata' LINK__PASTE = 'https://hastebin.com/' LINK__HATA_SLASH = 'https://github.com/HuyaneMatsu/hata/blob/master/docs/topics/slash.md' USER__DISBOARD = User.precreate(302050872383242240, is_bot=True) DEFAULT_CATEGORY_NAME = 'Uncategorized' def category_name_rule(name):