mirror of
https://github.com/allthingslinux/tux.git
synced 2024-10-02 16:43:12 +00:00
refactor: Update default prefixes for production and development environments
This commit is contained in:
parent
7b5c19f9d3
commit
8263108622
2 changed files with 4 additions and 4 deletions
|
@ -31,7 +31,7 @@ async def main() -> None:
|
|||
logger.info(f"Sentry setup intitalized: {sentry_sdk.is_initialized()}")
|
||||
|
||||
bot = Tux(
|
||||
command_prefix=CONST.PREFIX,
|
||||
command_prefix=CONST.DEFAULT_PREFIX,
|
||||
strip_after_prefix=True,
|
||||
case_insensitive=True,
|
||||
intents=discord.Intents.all(),
|
||||
|
|
|
@ -19,13 +19,13 @@ class Constants:
|
|||
|
||||
# Production env constants
|
||||
PROD_TOKEN: Final[str] = os.getenv("PROD_TOKEN", "")
|
||||
PROD_PREFIX: Final[str] = config["PREFIX"]["PROD"]
|
||||
DEFAULT_PROD_PREFIX: Final[str] = config["DEFAULT_PREFIX"]["PROD"]
|
||||
PROD_COG_IGNORE_LIST: Final[set[str]] = set(os.getenv("PROD_COG_IGNORE_LIST", "").split(","))
|
||||
|
||||
# Dev env constants
|
||||
DEV: Final[str | None] = os.getenv("DEV")
|
||||
DEV_TOKEN: Final[str] = os.getenv("DEV_TOKEN", "")
|
||||
DEV_PREFIX: Final[str] = config["PREFIX"]["DEV"]
|
||||
DEFAULT_DEV_PREFIX: Final[str] = config["DEFAULT_PREFIX"]["DEV"]
|
||||
DEV_COG_IGNORE_LIST: Final[set[str]] = set(os.getenv("DEV_COG_IGNORE_LIST", "").split(","))
|
||||
|
||||
# Debug env constants
|
||||
|
@ -33,7 +33,7 @@ class Constants:
|
|||
|
||||
# Final env constants
|
||||
TOKEN: Final[str] = DEV_TOKEN if DEV and DEV.lower() == "true" else PROD_TOKEN
|
||||
PREFIX: Final[str] = DEV_PREFIX if DEV and DEV.lower() == "true" else PROD_PREFIX
|
||||
DEFAULT_PREFIX: Final[str] = DEFAULT_DEV_PREFIX if DEV and DEV.lower() == "true" else DEFAULT_PROD_PREFIX
|
||||
COG_IGNORE_LIST: Final[set[str]] = DEV_COG_IGNORE_LIST if DEV and DEV.lower() == "true" else PROD_COG_IGNORE_LIST
|
||||
|
||||
# Sentry-related constants
|
||||
|
|
Loading…
Reference in a new issue