From 9b9499824b6db37b35ee3a168bc342f9864ee944 Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sat, 21 Mar 2020 19:46:07 +0100 Subject: Deseasonify: add class for branding config Since we'll be adding more env vars to control the branding manager, let's add a new config category. As a result, the cycle frequency constant name can be made shorter. --- bot/constants.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bot/constants.py') diff --git a/bot/constants.py b/bot/constants.py index 9afbc604..691e7760 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -6,7 +6,7 @@ from typing import NamedTuple __all__ = ( "bookmark_icon_url", - "AdventOfCode", "Channels", "Client", "Colours", "Emojis", "Hacktoberfest", "Month", "Roles", "Tokens", + "AdventOfCode", "Branding", "Channels", "Client", "Colours", "Emojis", "Hacktoberfest", "Month", "Roles", "Tokens", "WHITELISTED_CHANNELS", "STAFF_ROLES", "MODERATION_ROLES", "POSITIVE_REPLIES", "NEGATIVE_REPLIES", "ERROR_REPLIES", ) @@ -63,12 +63,15 @@ class Channels(NamedTuple): hacktoberfest_2019 = 628184417646411776 +class Branding: + cycle_frequency = int(environ.get("CYCLE_FREQUENCY", 3)) # 0: never, 1: every day, 2: every other day, ... + + class Client(NamedTuple): guild = int(environ.get("SEASONALBOT_GUILD", 267624335836053506)) prefix = environ.get("PREFIX", ".") token = environ.get("SEASONALBOT_TOKEN") debug = environ.get("SEASONALBOT_DEBUG", "").lower() == "true" - icon_cycle_frequency = 3 # 0: never, 1: every day, 2: every other day, ... class Colours: -- cgit v1.2.3