From dff6d47110a0ffdba8a2cf6198b3d9547b370e97 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Wed, 4 Sep 2024 19:55:40 +0300 Subject: Fix run --- src/petthecord/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/petthecord/main.py b/src/petthecord/main.py index 0e3056f..b6f3450 100644 --- a/src/petthecord/main.py +++ b/src/petthecord/main.py @@ -25,12 +25,12 @@ def main() -> None: ) args = parser.parse_args() - bot = Bot() + bot = Bot(args.host, args.port) if (token := getenv("PETTHECORD_TOKEN")) is not None: bot.run(token) elif (token_path := getenv("PETTHECORD_TOKEN_FILE")) is not None: with open(token_path) as f: token = f.read() - bot.run(token, args.host, args.port) + bot.run(token) else: print(f"{argv[0]}: Neither PETTHECORD_TOKEN nor PETTHECORD_TOKEN_FILE are set", file=stderr) -- cgit 1.4.1