env vars testing
This commit is contained in:
11
garfmain.py
11
garfmain.py
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user