aboutsummaryrefslogtreecommitdiffstats
path: root/bot/constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/constants.py')
-rw-r--r--bot/constants.py106
1 files changed, 84 insertions, 22 deletions
diff --git a/bot/constants.py b/bot/constants.py
index bf6c5a40..6999f321 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -11,12 +11,13 @@ __all__ = (
"Client",
"Colours",
"Emojis",
- "Hacktoberfest",
"Icons",
"Lovefest",
"Month",
"Roles",
"Tokens",
+ "Wolfram",
+ "RedisConfig",
"MODERATION_ROLES",
"STAFF_ROLES",
"WHITELISTED_CHANNELS",
@@ -51,6 +52,7 @@ class Channels(NamedTuple):
devalerts = 460181980097675264
devlog = int(environ.get("CHANNEL_DEVLOG", 622895325144940554))
dev_contrib = 635950537262759947
+ dev_branding = 753252897059373066
help_0 = 303906576991780866
help_1 = 303906556754395136
help_2 = 303906514266226689
@@ -66,22 +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_2019 = 628184417646411776
+ 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"
+ 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
@@ -92,10 +111,11 @@ class Colours:
dark_green = 0x1f8b4c
orange = 0xe67e22
pink = 0xcf84e0
+ purple = 0xb734eb
soft_green = 0x68c290
+ soft_orange = 0xf9cb54
soft_red = 0xcd6d6d
yellow = 0xf9f586
- purple = 0xb734eb
class Emojis:
@@ -106,12 +126,12 @@ class Emojis:
trashcan = "<:trashcan:637136429717389331>"
ok_hand = ":ok_hand:"
- terning1 = "<:terning1:431249668983488527>"
- terning2 = "<:terning2:462339216987127808>"
- terning3 = "<:terning3:431249694467948544>"
- terning4 = "<:terning4:579980271475228682>"
- terning5 = "<:terning5:431249716328792064>"
- terning6 = "<:terning6:431249726705369098>"
+ dice_1 = "<:dice_1:755891608859443290>"
+ dice_2 = "<:dice_2:755891608741740635>"
+ dice_3 = "<:dice_3:755891608251138158>"
+ dice_4 = "<:dice_4:755891607882039327>"
+ dice_5 = "<:dice_5:755891608091885627>"
+ dice_6 = "<:dice_6:755891607680843838>"
issue = "<:IssueOpen:629695470327037963>"
issue_closed = "<:IssueClosed:629695470570307614>"
@@ -119,9 +139,10 @@ class Emojis:
pull_request_closed = "<:PRClosed:629695470519713818>"
merge = "<:PRMerged:629695470570176522>"
-
-class Hacktoberfest(NamedTuple):
- voice_id = 514420006474219521
+ status_online = "<:status_online:470326272351010816>"
+ status_idle = "<:status_idle:470326266625785866>"
+ status_dnd = "<:status_dnd:470326272082313216>"
+ status_offline = "<:status_offline:470326266537705472>"
class Icons:
@@ -161,7 +182,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
@@ -174,6 +195,7 @@ class Roles(NamedTuple):
verified = 352427296948486144
helpers = 267630620367257601
rockstars = 458226413825294336
+ core_developers = 587606783669829632
class Tokens(NamedTuple):
@@ -187,6 +209,28 @@ class Tokens(NamedTuple):
github = environ.get("GITHUB_TOKEN")
+class Wolfram(NamedTuple):
+ user_limit_day = int(environ.get("WOLFRAM_USER_LIMIT_DAY", 10))
+ guild_limit_day = int(environ.get("WOLFRAM_GUILD_LIMIT_DAY", 67))
+ 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
@@ -194,10 +238,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