Example #1
0
async def _set_bot_configs(bot):
    bot.uptime = datetime.datetime.now()
    bot.description = str(constants.DESCRIPTION)
    bot.help_command = commands.DefaultHelpCommand(dm_help=True)
    bot.settings = BotUtils.get_all_ini_file_settings(
        constants.SETTINGS_FILENAME)
    bot.settings["bot_webpage_url"] = str(constants.BOT_WEBPAGE_URL)
    bot.settings["version"] = constants.VERSION
    bot.settings["full_db_name"] = BotUtils.get_full_db_name(bot)
    bot.settings["EmbedOwnerColor"] = BotUtils.get_color_settings(
        bot.settings["EmbedOwnerColor"])
    bot.settings["EmbedColor"] = BotUtils.get_color_settings(
        bot.settings["EmbedColor"])
Example #2
0
# |*****************************************************
# * Copyright         : Copyright (C) 2019
# * Author            : ddc
# * License           : GPL v3
# * Python            : 3.6
# |*****************************************************
# # -*- coding: utf-8 -*-

from enum import Enum
from src.cogs.bot.utils import bot_utils as BotUtils
from src.cogs.bot.utils import constants

file_values = BotUtils.get_all_ini_file_settings(constants.SETTINGS_FILENAME)

class CoolDowns(Enum):
    AdminCooldown = int(file_values["AdminCooldown"])
    BlacklistCooldown = int(file_values["BlacklistCooldown"])
    CustomCmdCooldown = int(file_values["CustomCmdCooldown"])
    ConfigCooldown = int(file_values["ConfigCooldown"])
    MiscCooldown = int(file_values["MiscCooldown"])
    MuteCooldown = int(file_values["MuteCooldown"])
    OwnerCooldown = int(file_values["OwnerCooldown"])
    RollDiceCooldown = int(file_values["RollDiceCooldown"])
Example #3
0
async def _set_other_cogs_configs(bot):
    bot.gw2_settings = BotUtils.get_all_ini_file_settings(
        Gw2Constants.GW2_SETTINGS_FILENAME)
    bot.gw2_settings["EmbedColor"] = BotUtils.get_color_settings(
        bot.gw2_settings["EmbedColor"])
Example #4
0
# |*****************************************************
# * Copyright         : Copyright (C) 2019
# * Author            : ddc
# * License           : GPL v3
# * Python            : 3.6
# |*****************************************************
# # -*- coding: utf-8 -*-

from enum import Enum
from src.cogs.bot.utils import bot_utils as BotUtils
import src.cogs.gw2.utils.gw2_constants as Gw2Constants

file_values = BotUtils.get_all_ini_file_settings(
    Gw2Constants.GW2_SETTINGS_FILENAME)


class GW2CoolDowns(Enum):
    AccountCooldown = int(file_values["AccountCooldown"])
    ApiKeysCooldown = int(file_values["ApiKeysCooldown"])
    DailyCooldown = int(file_values["DailyCooldown"])
    LastSessionCooldown = int(file_values["LastSessionCooldown"])
    MiscCooldown = int(file_values["MiscCooldown"])
    WvwCooldown = int(file_values["WvwCooldown"])