From 92c76c5cd30337f88d4d5dbf3cd8aefa72d64714 Mon Sep 17 00:00:00 2001 From: Christopher Bailey Date: Sat, 17 Jul 2021 19:58:17 -0400 Subject: [PATCH] Adds env var for `--token`: `SXM_DISCORD_TOKEN` --- HISTORY.rst | 5 +++++ sxm_discord/__init__.py | 2 +- sxm_discord/player.py | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 376924f..7cb72fb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,11 @@ History ======= +0.2.1 (2021-08-17) +------------------ + +* Adds env var for `--token`: `SXM_DISCORD_TOKEN` + 0.2.0 (2021-08-17) ------------------ diff --git a/sxm_discord/__init__.py b/sxm_discord/__init__.py index 21346ac..d69db72 100644 --- a/sxm_discord/__init__.py +++ b/sxm_discord/__init__.py @@ -6,6 +6,6 @@ __author__ = """Christopher Bailey""" __email__ = "cbailey@mort.is" -__version__ = "0.2.0" +__version__ = "0.2.1" __all__ = ["DiscordPlayer"] diff --git a/sxm_discord/player.py b/sxm_discord/player.py index a2b1cfe..399aa12 100644 --- a/sxm_discord/player.py +++ b/sxm_discord/player.py @@ -12,7 +12,13 @@ class DiscordPlayer(BasePlayer): params: List[click.Parameter] = [ - Option("--token", required=True, type=str, help="Discord bot token"), + Option( + "--token", + required=True, + type=str, + help="Discord bot token", + envvar="SXM_DISCORD_TOKEN", + ), Option( "--root-command", type=str,