aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-11-21 13:40:46 +0400
committerGravatar GitHub <[email protected]>2022-11-21 13:40:46 +0400
commitf9953f8f12b55cce0bcca76b9824ef91f4298483 (patch)
treee4c222945d497ea5d603612949c5fdfa438fa421
parentBump sentry-sdk from 1.10.1 to 1.11.0 (#1150) (diff)
parentMake The Latex API URL Configurable (diff)
Merge pull request #1151 from python-discord/latex-url
-rw-r--r--bot/exts/fun/latex.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/fun/latex.py b/bot/exts/fun/latex.py
index b5dada1c..311b4ac2 100644
--- a/bot/exts/fun/latex.py
+++ b/bot/exts/fun/latex.py
@@ -1,4 +1,5 @@
import hashlib
+import os
import re
import string
from io import BytesIO
@@ -23,7 +24,7 @@ FORMATTED_CODE_REGEX = re.compile(
re.DOTALL | re.IGNORECASE, # "." also matches newlines, case insensitive
)
-LATEX_API_URL = "https://rtex.probablyaweb.site/api/v2"
+LATEX_API_URL = os.getenv("LATEX_API_URL", "https://rtex.probablyaweb.site/api/v2")
PASTEBIN_URL = "https://paste.pythondiscord.com"
THIS_DIR = Path(__file__).parent