dev #7

Merged
wirehack7 merged 8 commits from dev into main 2025-05-01 14:51:46 +02:00
Showing only changes of commit 2312e00cdc - Show all commits

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():