Example #1
0
def get_post_formatted_message(bot: Bot) -> Callable:
    """Magic function returning the `post_formatted_message` function."""
    cog = bot.get_cog("ModerationLog")
    if not cog:
        raise ValueError("The ModerationLog cog can't be found.")

    return cog.post_formatted_message