aboutsummaryrefslogtreecommitdiffstats
path: root/bot/constants.py
diff options
context:
space:
mode:
authorGravatar Suhail <[email protected]>2020-02-06 21:40:40 +0000
committerGravatar Suhail <[email protected]>2020-02-06 21:40:40 +0000
commit9e758d49a905b5e0c7ee8e722c331157888b7ba9 (patch)
tree64e95c43444cd9b65bd8f939d9da4dc7736089f8 /bot/constants.py
parentPost results and boards to initial channel (diff)
parentUpdate CODEOWNERS (diff)
Merge branch 'master' into battleships
Diffstat (limited to 'bot/constants.py')
-rw-r--r--bot/constants.py83
1 files changed, 74 insertions, 9 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 8902d918..eca4f67b 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -1,28 +1,35 @@
import logging
from os import environ
from typing import NamedTuple
-
-from bot.bot import SeasonalBot
+from datetime import datetime
__all__ = (
- "AdventOfCode", "Channels", "Client", "Colours", "Emojis", "Hacktoberfest", "Roles",
- "Tokens", "ERROR_REPLIES", "bot"
+ "bookmark_icon_url",
+ "AdventOfCode", "Channels", "Client", "Colours", "Emojis", "Hacktoberfest", "Roles", "Tokens",
+ "WHITELISTED_CHANNELS", "STAFF_ROLES", "MODERATION_ROLES",
+ "POSITIVE_REPLIES", "NEGATIVE_REPLIES", "ERROR_REPLIES",
)
log = logging.getLogger(__name__)
+bookmark_icon_url = (
+ "https://images-ext-2.discordapp.net/external/zl4oDwcmxUILY7sD9ZWE2fU5R7n6QcxEmPYSE5eddbg/"
+ "%3Fv%3D1/https/cdn.discordapp.com/emojis/654080405988966419.png?width=20&height=20"
+)
+
class AdventOfCode:
leaderboard_cache_age_threshold_seconds = 3600
- leaderboard_id = 363275
+ leaderboard_id = 631135
leaderboard_join_code = str(environ.get("AOC_JOIN_CODE", None))
leaderboard_max_displayed_members = 10
- year = 2018
+ year = int(environ.get("AOC_YEAR", datetime.utcnow().year))
role_id = int(environ.get("AOC_ROLE_ID", 518565788744024082))
class Channels(NamedTuple):
admins = 365960823622991872
+ advent_of_code = int(environ.get("AOC_CHANNEL_ID", 517745814039166986))
announcements = int(environ.get("CHANNEL_ANNOUNCEMENTS", 354619224620138496))
big_brother_logs = 468507907357409333
bot = 267659945086812160
@@ -53,6 +60,7 @@ class Channels(NamedTuple):
python_discussion = 267624335836053506
show_your_projects = int(environ.get("CHANNEL_SHOW_YOUR_PROJECTS", 303934982764625920))
show_your_projects_discussion = 360148304664723466
+ hacktoberfest_2019 = 628184417646411776
class Client(NamedTuple):
@@ -72,12 +80,14 @@ class Colours:
soft_green = 0x68c290
soft_red = 0xcd6d6d
yellow = 0xf9f586
+ purple = 0xb734eb
class Emojis:
star = "\u2B50"
christmas_tree = "\U0001F384"
check = "\u2611"
+ envelope = "\U0001F4E8"
terning1 = "<:terning1:431249668983488527>"
terning2 = "<:terning2:462339216987127808>"
@@ -86,6 +96,12 @@ class Emojis:
terning5 = "<:terning5:431249716328792064>"
terning6 = "<:terning6:431249726705369098>"
+ issue = "<:IssueOpen:629695470327037963>"
+ issue_closed = "<:IssueClosed:629695470570307614>"
+ pull_request = "<:PROpen:629695470175780875>"
+ pull_request_closed = "<:PRClosed:629695470519713818>"
+ merge = "<:PRMerged:629695470570176522>"
+
class Lovefest:
role_id = int(environ.get("LOVEFEST_ROLE_ID", 542431903886606399))
@@ -118,6 +134,58 @@ class Tokens(NamedTuple):
youtube = environ.get("YOUTUBE_API_KEY")
+# Default role combinations
+MODERATION_ROLES = Roles.moderator, Roles.admin, Roles.owner
+STAFF_ROLES = Roles.helpers, Roles.moderator, Roles.admin, Roles.owner
+
+# Whitelisted channels
+WHITELISTED_CHANNELS = (
+ Channels.bot, Channels.seasonalbot_commands,
+ Channels.off_topic_0, Channels.off_topic_1, Channels.off_topic_2,
+ Channels.devtest,
+)
+
+# Bot replies
+NEGATIVE_REPLIES = [
+ "Noooooo!!",
+ "Nope.",
+ "I'm sorry Dave, I'm afraid I can't do that.",
+ "I don't think so.",
+ "Not gonna happen.",
+ "Out of the question.",
+ "Huh? No.",
+ "Nah.",
+ "Naw.",
+ "Not likely.",
+ "No way, José.",
+ "Not in a million years.",
+ "Fat chance.",
+ "Certainly not.",
+ "NEGATORY.",
+ "Nuh-uh.",
+ "Not in my house!",
+]
+
+POSITIVE_REPLIES = [
+ "Yep.",
+ "Absolutely!",
+ "Can do!",
+ "Affirmative!",
+ "Yeah okay.",
+ "Sure.",
+ "Sure thing!",
+ "You're the boss!",
+ "Okay.",
+ "No problem.",
+ "I got you.",
+ "Alright.",
+ "You got it!",
+ "ROGER THAT",
+ "Of course!",
+ "Aye aye, cap'n!",
+ "I'll allow it.",
+]
+
ERROR_REPLIES = [
"Please don't do that.",
"You have to stop.",
@@ -130,6 +198,3 @@ ERROR_REPLIES = [
"Noooooo!!",
"I can't believe you've done this",
]
-
-
-bot = SeasonalBot(command_prefix=Client.prefix)