Beispiel #1
0
def setup(bot: SeasonalBot) -> None:
    """Add/Load Games cog."""
    # Check does IGDB API key exist, if not, log warning and don't load cog
    if not Tokens.igdb:
        logger.warning("No IGDB API key. Not loading Games cog.")
        return
    bot.add_cog(Games(bot))
Beispiel #2
0
def setup(bot: SeasonalBot) -> None:
    """Load Space Cog."""
    if not Tokens.nasa:
        logger.warning("Can't find NASA API key. Not loading Space Cog.")
        return

    bot.add_cog(Space(bot))
Beispiel #3
0
def unload(bot: SeasonalBot) -> None:
    """
    Reinstates the original help command.

    This is run if the cog raises an exception on load, or if the extension is unloaded.
    """
    bot.remove_command('help')
    bot.add_command(bot._old_help)
Beispiel #4
0
def setup(bot: SeasonalBot) -> None:
    """
    The setup for the help extension.

    This is called automatically on `bot.load_extension` being run.
    Stores the original help command instance on the `bot._old_help` attribute for later
    reinstatement, before removing it from the command registry so the new help command can be
    loaded successfully.
    If an exception is raised during the loading of the cog, `unload` will be called in order to
    reinstate the original help command.
    """
    bot._old_help = bot.get_command('help')
    bot.remove_command('help')

    try:
        bot.add_cog(Help())
    except Exception:
        unload(bot)
        raise
Beispiel #5
0
def setup(bot: Bot) -> None:
    """Load the Extensions cog."""
    bot.add_cog(Extensions(bot))
Beispiel #6
0
def setup(bot: SeasonalBot) -> None:
    """Load BrandingManager cog."""
    bot.add_cog(BrandingManager(bot))
Beispiel #7
0
    jammer = 423054537079783434
    moderator = 267629731250176001
    muted = 277914926603829249
    owner = 267627879762755584
    verified = 352427296948486144
    helpers = 267630620367257601
    rockstars = 458226413825294336


class Tokens(NamedTuple):
    giphy = environ.get("GIPHY_TOKEN")
    aoc_session_cookie = environ.get("AOC_SESSION_COOKIE")
    omdb = environ.get("OMDB_API_KEY")
    youtube = environ.get("YOUTUBE_API_KEY")


ERROR_REPLIES = [
    "Please don't do that.",
    "You have to stop.",
    "Do you mind?",
    "In the future, don't do that.",
    "That was a mistake.",
    "You blew it.",
    "You're bad at computers.",
    "Are you trying to kill me?",
    "Noooooo!!",
    "I can't believe you've done this",
]

bot = SeasonalBot(command_prefix=Client.prefix)
Beispiel #8
0
def setup(bot: SeasonalBot) -> None:
    """Cog loader for pride facts."""
    bot.add_cog(PrideFacts(bot))
Beispiel #9
0
def setup(bot: SeasonalBot) -> None:
    """Spooky sound Cog load."""
    bot.add_cog(SpookySound(bot))
Beispiel #10
0
def setup(bot: SeasonalBot) -> None:
    """Easter Egg facts cog load."""
    bot.add_cog(EasterFacts(bot))