Esempio n. 1
0
def setup(bot: MangoPi):
    """
    Function necessary for loading Cogs.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to add Cog
    """
    bot.add_cog(ModTools(bot))
    print("Load Cog:\tModTools")
Esempio n. 2
0
def teardown(bot: MangoPi):
    """
    Function to be called upon unloading this Cog.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to remove Cog
    """
    bot.remove_cog("ModTools")
    print("Unload Cog:\tModTools")
Esempio n. 3
0
def setup(bot: MangoPi):
    """
    Function necessary for loading Cogs. This will update Logging's data from mongoDB.

    Parameters
    ----------
    bot : commands.Bot
        pass in bot reference to add Cog
    """
    bot.add_cog(Logging(bot))
    print("Load Cog:\tLogging")
Esempio n. 4
0
def setup(bot: MangoPi):
    """
    Function necessary for loading Cogs. This will update AntiRaid's data from mongoDB.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to add Cog
    """
    bot.add_cog(AntiRaid(bot))
    print("Load Cog:\tAntiRaid")
Esempio n. 5
0
def teardown(bot: MangoPi):
    """
    Method for Cog unload, this function will print to Console that Reminder Cog got unload.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to unload the Cog
    """
    bot.remove_cog("Test")
    print("Unload Cog:\tReminder")
Esempio n. 6
0
def teardown(bot: MangoPi):
    """
    Function to be called upon unloading this Cog. This will restore bot command_prefix to bot default.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to remove Cog and restore command_prefix
    """
    bot.command_prefix = commands.when_mentioned_or(bot.default_prefix)
    bot.remove_cog("Prefix")
    print("Unload Cog:\tPrefix")
Esempio n. 7
0
def teardown(bot: MangoPi):
    """
    Function to be called upon unloading this Cog.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to remove Cog
    """
    bot.remove_cog("Ignores")
    bot.ignore_check = offline
    print("Unload Cog:\tIgnore")
Esempio n. 8
0
def setup(bot: MangoPi):
    """
    Essential function for Cog loading that calls the update method of Reminder Cog (to fetch data from Mongo)
    before adding it to the bot.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to append the Cog
    """
    bot.add_cog(Reminder(bot))
    print("Load Cog:\tReminder")
Esempio n. 9
0
def setup(bot: MangoPi):
    """
    Function necessary for loading Cogs. This will update Ignore data from mongoDB.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to add Cog
    """
    temp = Ignore(bot)
    temp.update()
    bot.add_cog(temp)
    bot.ignore_check = temp.ignore_check
    print("Load Cog:\tIgnore")
Esempio n. 10
0
def setup(bot: MangoPi):
    """
    Function necessary for loading Cogs. This will update Prefix's data from mongoDB and append get_prefix to
    bot command_prefix.

    Parameters
    ----------
    bot : MangoPi
        pass in bot reference to add Cog and modify command_prefix
    """
    temp = Prefix(bot)
    temp.update()
    bot.add_cog(temp)
    bot.command_prefix = temp.get_prefix
    print("Load Cog:\tPrefix")
Esempio n. 11
0
from Components.MangoPi import MangoPi

# References:
# https://www.youtube.com/playlist?list=PLW3GfRiBCHOiEkjvQj0uaUB1Q-RckYnj9
# https://www.youtube.com/playlist?list=PLpbRB6ke-VkvP1W2d_nLa1Ott3KrDx2aN

# Resources:
# https://flatuicolors.com/
# https://discordpy.readthedocs.io/

MangoPi()