Exemple #1
0
    def __init__(self, bot):
        self.bot = bot
        self.embed_color = 0x91becc

        self.BlacklistedUsers = BlacklistedUsers()
        self.CommandController = CommandController()
        self.CogController = CogController()
        self.PrefixHandler = PrefixHandler()

        # Module configuration
        self.module_name = str(self.__class__.__name__)
        self.is_restricted_module = True
        self.module_dependencies = []

        qulib.module_configuration(self.module_name, self.is_restricted_module,
                                   self.module_dependencies)

        self.botstats_iter = 0

        self.left = '⬅️'
        self.right = '➡️'
        self.pagination_timeout = '⏹️'

        self.export_stats.start()  # pylint: disable=no-member

        print(f'Module {self.__class__.__name__} loaded')
Exemple #2
0
    def __init__(self, bot):
        self.bot = bot
        self.embed_color = 0xffd663

        self.PremiumHandler = premiumhandler.PremiumHandler()

        # Module configuration
        self.module_name = str(self.__class__.__name__)
        self.is_restricted_module = True
        self.module_dependencies = []

        qulib.module_configuration(self.module_name, self.is_restricted_module, self.module_dependencies)

        # Main Config.ini Configuration
        if 'Premium' not in config.sections():
            config.add_section('Premium')
            config.set('Premium', 'WebhookAuth', '<Enter Patreon webhook secret here>')

        with open(os.path.join(bot_path, 'config.ini'), 'w', encoding="utf_8") as config_file:
            config.write(config_file)
        config_file.close()

        with open(os.path.join(bot_path, 'config.ini'), 'r', encoding="utf_8") as config_file:
            config.read_file(config_file)
            self.patreon_auth = config.get('Premium', 'WebhookAuth')
        config_file.close()

        self.webhook_task = self.bot.loop.create_task(self.webhook())

        # Starting module-related tasks
        self.expired_premium_subscriptions.start()  # pylint: disable=no-member

        print(f'Module {self.__class__.__name__} loaded')
    def __init__(self, bot):
        self.bot = bot
        self.embed_color = 0xc10000
        print(f'Module {self.__class__.__name__} loaded')

        # Module configuration
        self.module_name = str(self.__class__.__name__)
        self.is_restricted_module = True
        self.module_dependencies = []

        qulib.module_configuration(self.module_name, self.is_restricted_module,
                                   self.module_dependencies)
Exemple #4
0
    def __init__(self, bot):
        self.bot = bot
        self.module_embed_color = 0x8aeb59
        bot.remove_command('help')

        # Module configuration
        self.module_name = str(self.__class__.__name__)
        self.is_restricted_module = True
        self.module_dependencies = []

        qulib.module_configuration(self.module_name, self.is_restricted_module,
                                   self.module_dependencies)

        print(f'Module {self.__class__.__name__} loaded')
Exemple #5
0
    def __init__(self, bot):
        self.bot = bot
        self.embed_color = 0x347aeb

        self.max_characters = 1500

        # Module configuration
        self.module_name = str(self.__class__.__name__)
        self.is_restricted_module = False
        self.module_dependencies = []

        qulib.module_configuration(self.module_name, self.is_restricted_module,
                                   self.module_dependencies)

        self.Toggles = servertoggles.ServerToggles()

        print(f'Module {self.__class__.__name__} loaded')
Exemple #6
0
    def __init__(self, bot):
        self.bot = bot
        self.embed_color = 0x91becc

        self.Localization = localizations.Localizations()
        self.PrefixHandler = prefixhandler.PrefixHandler()
        self.CommandController = ccontroller.CommandController()
        self.CogController = ccontroller.CogController()
        self.Toggles = servertoggles.ServerToggles()
        self.Modlog = ModlogSetup()

        # Module configuration
        self.module_name = str(self.__class__.__name__)
        self.is_restricted_module = True
        self.module_dependencies = []

        qulib.module_configuration(self.module_name, self.is_restricted_module,
                                   self.module_dependencies)

        print(f'Module {self.__class__.__name__} loaded')
Exemple #7
0
    def __init__(self, bot):
        self.bot = bot
        self.embed_color = 0x28b463

        # Module configuration
        self.module_name = str(self.__class__.__name__)
        self.is_restricted_module = False
        self.module_dependencies = []

        qulib.module_configuration(self.module_name, self.is_restricted_module,
                                   self.module_dependencies)

        qulib.user_database_init()

        self.GiveawayHandler = GiveawayHandler()

        if 'Economy' not in config.sections():
            config.add_section('Economy')
            if 'CurrencySymbol' not in config['Economy']:
                config.set('Economy', 'CurrencySymbol', '💵')
            if 'DailyAmount' not in config['Economy']:
                config.set('Economy', 'DailyAmount', '100')

        with open(os.path.join(bot_path, 'config.ini'), 'w',
                  encoding="utf_8") as config_file:
            config.write(config_file)
        config_file.close()

        with open(os.path.join(bot_path, 'config.ini'), 'r',
                  encoding="utf_8") as config_file:
            config.read_file(config_file)
            self.daily_amount = int(config.get('Economy', 'DailyAmount'))
            self.vote_reward = int(
                int(config.get('Economy', 'DailyAmount')) / 2)
            self.currency_symbol = config.get('Economy', 'CurrencySymbol')
        config_file.close()

        print(f'Module {self.__class__.__name__} loaded')