diff options
author | 2020-11-30 15:18:56 +0100 | |
---|---|---|
committer | 2020-11-30 15:18:56 +0100 | |
commit | 8b5b70c04a82ccc6e941e6c439478335121ae69a (patch) | |
tree | 4eeb61fe217ac477c49cfdfa97edf697706b2abf /bot/constants.py | |
parent | Merge branch 'master' into tic-tac-toe (diff) | |
parent | Merge pull request #532 from python-discord/sebastiaan/ci/add-core-dev-approv... (diff) |
Merge branch 'master' into tic-tac-toe
Diffstat (limited to 'bot/constants.py')
-rw-r--r-- | bot/constants.py | 80 |
1 files changed, 62 insertions, 18 deletions
diff --git a/bot/constants.py b/bot/constants.py index 90c440fd..7ca43fc8 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -17,6 +17,7 @@ __all__ = ( "Roles", "Tokens", "Wolfram", + "RedisConfig", "MODERATION_ROLES", "STAFF_ROLES", "WHITELISTED_CHANNELS", @@ -67,23 +68,39 @@ class Channels(NamedTuple): off_topic_2 = 463035268514185226 python = 267624335836053506 reddit = 458224812528238616 - seasonalbot_commands = int(environ.get("CHANNEL_SEASONALBOT_COMMANDS", 607247579608121354)) - seasonalbot_voice = int(environ.get("CHANNEL_SEASONALBOT_VOICE", 606259004230074378)) + community_bot_commands = int(environ.get("CHANNEL_COMMUNITY_BOT_COMMANDS", 607247579608121354)) staff_lounge = 464905259261755392 verification = 352442727016693763 python_discussion = 267624335836053506 - show_your_projects = int(environ.get("CHANNEL_SHOW_YOUR_PROJECTS", 303934982764625920)) - show_your_projects_discussion = 360148304664723466 hacktoberfest_2020 = 760857070781071431 + voice_chat = 412357430186344448 + + # Core Dev Sprint channels + sprint_announcements = 755958119963557958 + sprint_information = 753338352136224798 + sprint_organisers = 753340132639375420 + sprint_general = 753340631538991305 + sprint_social1_cheese_shop = 758779754789863514 + sprint_social2_pet_shop = 758780951978573824 + sprint_escape_room = 761031075942105109 + sprint_stdlib = 758553316732698634 + sprint_asyncio = 762904152438472714 + sprint_typing = 762904690341838888 + sprint_discussion_capi = 758553358587527218 + sprint_discussion_triage = 758553458365300746 + sprint_discussion_design = 758553492662255616 + sprint_discussion_mentor = 758553536623280159 + sprint_documentation = 761038271127093278 class Client(NamedTuple): - guild = int(environ.get("SEASONALBOT_GUILD", 267624335836053506)) + name = "Sir Lancebot" + guild = int(environ.get("BOT_GUILD", 267624335836053506)) prefix = environ.get("PREFIX", ".") - token = environ.get("SEASONALBOT_TOKEN") - sentry_dsn = environ.get("SEASONALBOT_SENTRY_DSN") - debug = environ.get("SEASONALBOT_DEBUG", "").lower() == "true" - github_bot_repo = "https://github.com/python-discord/seasonalbot" + token = environ.get("BOT_TOKEN") + sentry_dsn = environ.get("BOT_SENTRY_DSN") + debug = environ.get("BOT_DEBUG", "").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 @@ -182,7 +199,7 @@ if Client.month_override is not None: class Roles(NamedTuple): - admin = int(environ.get("SEASONALBOT_ADMIN_ROLE_ID", 267628507062992896)) + admin = int(environ.get("BOT_ADMIN_ROLE_ID", 267628507062992896)) announcements = 463658397560995840 champion = 430492892331769857 contributor = 295488872404484098 @@ -215,6 +232,22 @@ class Wolfram(NamedTuple): key = environ.get("WOLFRAM_API_KEY") +class RedisConfig(NamedTuple): + host = environ.get("REDIS_HOST", "redis.default.svc.cluster.local") + port = environ.get("REDIS_PORT", 6379) + password = environ.get("REDIS_PASSWORD") + use_fakeredis = environ.get("USE_FAKEREDIS", "false").lower() == "true" + + +class Wikipedia: + total_chance = 3 + + +class Source: + github = "https://github.com/python-discord/sir-lancebot" + github_avatar_url = "https://avatars1.githubusercontent.com/u/9919" + + # Default role combinations MODERATION_ROLES = Roles.moderator, Roles.admin, Roles.owner STAFF_ROLES = Roles.helpers, Roles.moderator, Roles.admin, Roles.owner @@ -222,10 +255,28 @@ STAFF_ROLES = Roles.helpers, Roles.moderator, Roles.admin, Roles.owner # Whitelisted channels WHITELISTED_CHANNELS = ( Channels.bot, - Channels.seasonalbot_commands, + Channels.community_bot_commands, Channels.off_topic_0, Channels.off_topic_1, Channels.off_topic_2, + Channels.voice_chat, + + # Core Dev Sprint Channels + Channels.sprint_announcements, + Channels.sprint_information, + Channels.sprint_organisers, + Channels.sprint_general, + Channels.sprint_social1_cheese_shop, + Channels.sprint_social2_pet_shop, + Channels.sprint_escape_room, + Channels.sprint_stdlib, + Channels.sprint_asyncio, + Channels.sprint_typing, + Channels.sprint_discussion_capi, + Channels.sprint_discussion_triage, + Channels.sprint_discussion_design, + Channels.sprint_discussion_mentor, + Channels.sprint_documentation, ) # Bot replies @@ -281,10 +332,3 @@ POSITIVE_REPLIES = [ "Aye aye, cap'n!", "I'll allow it.", ] - -class Wikipedia: - total_chance = 3 - -class Source: - github = "https://github.com/python-discord/seasonalbot" - github_avatar_url = "https://avatars1.githubusercontent.com/u/9919" |