def cog(bot: commands.Bot): cog = Voting(bot) insert_extension("Vote", 0, True, True) bot.add_cog(cog) dpytest.configure(bot) logger.info("Tests starting") return cog
def __init__(self, bot): """ Initialises class variables :param bot: The client of the bot being used """ self.bot = bot self._last_member = None insert_extension("Greetings", 0, True, True)
def setup(bot: koalabot) -> None: """ Load this cog to the KoalaBot. :param bot: the bot client for KoalaBot """ if TWITCH_SECRET is None or TWITCH_KEY is None: logger.error("TwitchAlert not started. API keys not found in environment.") insert_extension("TwitchAlert", 0, False, False) else: bot.add_cog(TwitchAlert(bot)) logger.info("TwitchAlert is ready.")
def __init__(self, bot): """ discord cog to manage the voting interface :param bot: the bot that the cog is being run on :param db_manager: a database manager (allows testing on a clean database) """ self.bot = bot insert_extension("Vote", 0, True, True) self.vote_manager = VoteManager() self.vote_manager.load_from_db() self.running = False
def setup(bot: koalabot) -> None: """ Load this cog to the koalabot. :param bot: the bot client for KoalaBot """ if GMAIL_EMAIL is None or GMAIL_PASSWORD is None: logger.warning( "Verification not started. API keys not found in environment.") insert_extension("Verify", 0, False, False) else: bot.add_cog(Verification(bot)) logger.info("Verification is ready.")
def __init__(self, bot: discord.ext.commands.Bot): """ Initialises local variables :param bot: The bot client for this cog """ self.bot = bot insert_extension("TwitchAlert", 0, True, True) self.ta_database_manager = TwitchAlertDBManager(bot) # self.ta_database_manager.translate_names_to_ids() self.loop_thread = None self.loop_team_thread = None self.running = False self.stop_loop = False
def __init__(self, bot): self.bot = bot insert_extension("Verify", 0, True, True)
def __init__(self, bot): self.bot = bot self.messages = {} self.roles = {} insert_extension("Announce", 0, True, True) self.announce_database_manager = AnnounceDBManager()
def __init__(self, bot): self.bot = bot insert_extension("TextFilter", 0, True, True) self.tf_database_manager = TextFilterDBManager(bot)