dev #7
19
src/main.py
19
src/main.py
@ -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():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user