env vars testing

This commit is contained in:
2026-01-04 05:36:35 -06:00
parent 34f34e3def
commit 4ddcd2b374
6 changed files with 24 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import config
import os
import asyncio
import discord
from discord.ext import commands
@@ -16,10 +16,9 @@ from garfpy import (
)
gapikey = config.GIF_TOKEN
garfkey = config.GARFBOT_TOKEN
txtmodel = config.TXT_MODEL
imgmodel = config.IMG_MODEL
garfkey = os.getenv("GARFBOT_TOKEN")
txtmodel = os.getenv("TXT_MODEL")
imgmodel = os.getenv("IMG_MODEL")
intents = discord.Intents.default()
intents.members = True
@@ -181,7 +180,7 @@ async def on_message(message):
async def garfbot_connect():
while True:
try:
await garfbot.start(garfkey)
await garfbot.start(garfkey) # type: ignore
except Exception as e:
e = str(e)
logger.error(f"Garfbot couldn't connect! {e}")