aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar shtlrs <[email protected]>2023-03-25 14:14:09 +0100
committerGravatar shtlrs <[email protected]>2023-03-25 14:14:09 +0100
commita92f8f41fb20f0083c3c44f074badba302270259 (patch)
tree42f5e1c6dede06b037396c907161c91850150236
parentBump beautifulsoup4 from 4.11.2 to 4.12.0 (#2480) (diff)
get rid of site config variable
-rw-r--r--bot/constants.py12
-rw-r--r--bot/exts/filters/antimalware.py6
2 files changed, 6 insertions, 12 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 4186472b1..d9e0b755c 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -527,10 +527,9 @@ class _BaseURLs(EnvConfig):
github_bot_repo = "https://github.com/python-discord/bot"
# Site
- site = "pythondiscord.com"
- site_schema = "https://"
site_api = "site.default.svc.cluster.local/api"
site_api_schema = "http://"
+ site_paste = "https://paste.pythondiscord.com"
BaseURLs = _BaseURLs()
@@ -545,13 +544,8 @@ class _URLs(_BaseURLs):
connect_max_retries = 3
connect_cooldown = 5
- site_staff: str = "".join([BaseURLs.site_schema, BaseURLs.site, "/staff"])
- site_paste = "".join(["paste.", BaseURLs.site])
-
- # Site endpoints
- site_logs_view: str = "".join([BaseURLs.site_schema, BaseURLs.site, "/staff/bot/logs"])
- paste_service: str = "".join([BaseURLs.site_schema, "paste.", BaseURLs.site, "/{key}"])
-
+ paste_service: str = "".join([BaseURLs.site_paste, "/{key}"])
+ site_logs_view: str = "https://pythondiscord.com/staff/bot/logs"
URLs = _URLs()
diff --git a/bot/exts/filters/antimalware.py b/bot/exts/filters/antimalware.py
index ff39700a6..0a72a6db7 100644
--- a/bot/exts/filters/antimalware.py
+++ b/bot/exts/filters/antimalware.py
@@ -5,7 +5,7 @@ from discord import Embed, Message, NotFound
from discord.ext.commands import Cog
from bot.bot import Bot
-from bot.constants import Channels, Filter, URLs
+from bot.constants import BaseURLs, Channels, Filter
from bot.exts.events.code_jams._channels import CATEGORY_NAME as JAM_CATEGORY_NAME
from bot.log import get_logger
@@ -13,13 +13,13 @@ log = get_logger(__name__)
PY_EMBED_DESCRIPTION = (
"It looks like you tried to attach a Python file - "
- f"please use a code-pasting service such as {URLs.site_schema}{URLs.site_paste}"
+ f"please use a code-pasting service such as {BaseURLs.site_paste}"
)
TXT_LIKE_FILES = {".txt", ".csv", ".json"}
TXT_EMBED_DESCRIPTION = (
"You either uploaded a `{blocked_extension}` file or entered a message that was too long. "
- f"Please use our [paste bin]({URLs.site_schema}{URLs.site_paste}) instead."
+ f"Please use our [paste bin]({BaseURLs.site_paste}) instead."
)
DISALLOWED_EMBED_DESCRIPTION = (