diff options
author | 2022-02-14 23:41:14 +0000 | |
---|---|---|
committer | 2022-02-14 23:41:14 +0000 | |
commit | 657aaf5f613b0bd219d67c71f7dc37ede0bb6aab (patch) | |
tree | 548e48ae21a98d5e6e16e8619d1af4ee75fe8b7a /bot/constants.py | |
parent | fix: Add newlines in codeblock formatting (diff) | |
parent | Merge pull request #1026 from Shom770/fix-trivia-night (diff) |
Merge branch 'main' into merge-github-issues
Diffstat (limited to 'bot/constants.py')
-rw-r--r-- | bot/constants.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/bot/constants.py b/bot/constants.py index f4b1cab0..d39f7361 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -12,6 +12,7 @@ __all__ = ( "Channels", "Categories", "Client", + "Logging", "Colours", "Emojis", "Icons", @@ -23,6 +24,7 @@ __all__ = ( "Reddit", "RedisConfig", "RedirectOutput", + "PYTHON_PREFIX", "MODERATION_ROLES", "STAFF_ROLES", "WHITELISTED_CHANNELS", @@ -34,6 +36,9 @@ __all__ = ( log = logging.getLogger(__name__) +PYTHON_PREFIX = "!" + + @dataclasses.dataclass class AdventOfCodeLeaderboard: id: str @@ -50,7 +55,7 @@ class AdventOfCodeLeaderboard: def session(self) -> str: """Return either the actual `session` cookie or the fallback cookie.""" if self.use_fallback_session: - log.info(f"Returning fallback cookie for board `{self.id}`.") + log.trace(f"Returning fallback cookie for board `{self.id}`.") return AdventOfCode.fallback_session return self._session @@ -127,18 +132,24 @@ class Categories(NamedTuple): media = 799054581991997460 staff = 364918151625965579 + codejam_categories_name = "Code Jam" # Name of the codejam team categories + class Client(NamedTuple): name = "Sir Lancebot" guild = int(environ.get("BOT_GUILD", 267624335836053506)) prefix = environ.get("PREFIX", ".") token = environ.get("BOT_TOKEN") debug = environ.get("BOT_DEBUG", "true").lower() == "true" - file_logs = environ.get("FILE_LOGS", "false").lower() == "true" github_bot_repo = "https://github.com/python-discord/sir-lancebot" # Override seasonal locks: 1 (January) to 12 (December) month_override = int(environ["MONTH_OVERRIDE"]) if "MONTH_OVERRIDE" in environ else None + + +class Logging(NamedTuple): + debug = Client.debug + file_logs = environ.get("FILE_LOGS", "false").lower() == "true" trace_loggers = environ.get("BOT_TRACE_LOGGERS") @@ -194,7 +205,7 @@ class Emojis: # These icons are from Github's repo https://github.com/primer/octicons/ issue_open = "<:IssueOpen:852596024777506817>" - issue_closed = "<:IssueClosed:852596024739758081>" + issue_closed = "<:IssueClosed:927326162861039626>" issue_draft = "<:IssueDraft:852596025147523102>" # Not currently used by Github, but here for future. pull_request_open = "<:PROpen:852596471505223781>" pull_request_closed = "<:PRClosed:852596024732286976>" @@ -228,7 +239,6 @@ class Emojis: status_dnd = "<:status_dnd:470326272082313216>" status_offline = "<:status_offline:470326266537705472>" - stackoverflow_tag = "<:stack_tag:870926975307501570>" stackoverflow_views = "<:stack_eye:870926992692879371>" @@ -288,6 +298,7 @@ class Roles(NamedTuple): helpers = int(environ.get("ROLE_HELPERS", 267630620367257601)) core_developers = 587606783669829632 everyone = int(environ.get("BOT_GUILD", 267624335836053506)) + aoc_completionist = int(environ.get("AOC_COMPLETIONIST_ROLE_ID", 916691790181056532)) class Tokens(NamedTuple): |