<commit_before>"""
🔮 Spooky fortunes and assistance for witches
"""
from future.standard_library import hooks

with hooks():
    from urllib.error import HTTPError
    from urllib.parse import quote

from util import hook, http


@hook.command
def tarot(inp):
    ".tarot <cardname> -- finds a card by name"
    search = quote(inp)

    try:
        card = http.get_json(f"https://tarot-api.com/find/{search}")
    except HTTPError:
        return "the spirits are displeased."

    return card["name"] + ": " + ", ".join(card["keywords"])


def fortune():
    ".fortune -- returns one random card and it's fortune"
<commit_msg>We still need this to but autohelp false and comment out the help<commit_after>"""
🔮 Spooky fortunes and assistance for witches
"""
from future.standard_library import hooks

with hooks():
    from urllib.error import HTTPError
    from urllib.parse import quote

from util import hook, http


@hook.command
def tarot(inp):
    ".tarot <cardname> -- finds a card by name"
    search = quote(inp)

    try:
        card = http.get_json(f"https://tarot-api.com/find/{search}")
    except HTTPError:
        return "the spirits are displeased."

    return card["name"] + ": " + ", ".join(card["keywords"])

@hook.command(autohelp=False)
def fortune():
    """
    .fortune -- returns one random card and it's fortune
    """

{'fraction_non_alphanumeric': 0.12509252405625462, 'fraction_numerical': 0.0, 'mean_word_length': 3.251572327044025, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3575378', 'n_tokens_mistral': 429, 'n_tokens_neox': 421, 'n_words': 137}