aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/api.py2
-rw-r--r--bot/constants.py1
-rw-r--r--bot/exts/utils/ping.py2
-rw-r--r--config-default.yml3
4 files changed, 5 insertions, 3 deletions
diff --git a/bot/api.py b/bot/api.py
index d93f9f2ba..6ce9481f4 100644
--- a/bot/api.py
+++ b/bot/api.py
@@ -53,7 +53,7 @@ class APIClient:
@staticmethod
def _url_for(endpoint: str) -> str:
- return f"{URLs.site_schema}{URLs.site_api}/{quote_url(endpoint)}"
+ return f"{URLs.site_api_schema}{URLs.site_api}/{quote_url(endpoint)}"
async def close(self) -> None:
"""Close the aiohttp session."""
diff --git a/bot/constants.py b/bot/constants.py
index 95e22513f..91e41e334 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -530,6 +530,7 @@ class URLs(metaclass=YAMLGetter):
site: str
site_api: str
site_schema: str
+ site_api_schema: str
# Site endpoints
site_logs_view: str
diff --git a/bot/exts/utils/ping.py b/bot/exts/utils/ping.py
index 572fc934b..e62811b91 100644
--- a/bot/exts/utils/ping.py
+++ b/bot/exts/utils/ping.py
@@ -37,7 +37,7 @@ class Latency(commands.Cog):
bot_ping = f"{bot_ping:.{ROUND_LATENCY}f} ms"
try:
- delay = await aioping.ping(URLs.site, family=socket.AddressFamily.AF_INET) * 1000
+ delay = await aioping.ping(URLs.site_api, family=socket.AddressFamily.AF_INET) * 1000
site_ping = f"{delay:.{ROUND_LATENCY}f} ms"
except TimeoutError:
diff --git a/config-default.yml b/config-default.yml
index d3b267159..d7415c821 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -335,7 +335,8 @@ keys:
urls:
# PyDis site vars
site: &DOMAIN "pythondiscord.com"
- site_api: &API !JOIN ["api.", *DOMAIN]
+ site_api: &API "pydis-api.default.svc.cluster.local"
+ site_api_schema: "http://"
site_paste: &PASTE !JOIN ["paste.", *DOMAIN]
site_schema: &SCHEMA "https://"
site_staff: &STAFF !JOIN ["staff.", *DOMAIN]