some fixes
Some checks failed
Safety Check / safety-check (pull_request) Successful in -2s
Code Quality Check / quality-check (pull_request) Failing after 13s

This commit is contained in:
wirehack7 2025-05-01 14:41:45 +02:00
parent 8f1c68aa04
commit 2312e00cdc
Signed by: wirehack7
GPG Key ID: C9F4CF85BA505ADC

View File

@ -1,16 +1,17 @@
"""Discord Bot zur Bildgenerierung mit NovelAI API."""
import io
import os
import sys
import random
import zipfile
import logging
import os
import random
import sys
import time
import zipfile
import discord
import requests
from discord import app_commands
from discord.ext import commands
import requests
# ENV Variablen
NOVELAI_API_TOKEN = os.getenv("NOVELAI_API_TOKEN")
@ -21,7 +22,7 @@ ALLOWED_CHANNEL_ID = int(os.getenv("DISCORD_CHANNEL_ID", "0"))
logging.basicConfig(
stream=sys.stdout,
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s"
format="%(asctime)s - %(levelname)s - %(message)s",
)
logger = logging.getLogger(__name__)
@ -31,11 +32,7 @@ if not all([NOVELAI_API_TOKEN, BOT_TOKEN, ALLOWED_CHANNEL_ID]):
)
intents = discord.Intents.default()
bot = commands.Bot(
command_prefix=commands.when_mentioned,
intents=intents
)
bot = commands.Bot(command_prefix=commands.when_mentioned, intents=intents)
@bot.event
async def on_ready():