Ajout de la gestion des personnages avec des commandes personnalisées et intégration de la base de données
This commit is contained in:
commit
15b9549bcb
11 changed files with 70 additions and 0 deletions
27
main-bot.py
Normal file
27
main-bot.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import discord
|
||||
import aiosqlite
|
||||
from discord.ext import commands
|
||||
from discord import app_commands
|
||||
import logging
|
||||
import sys
|
||||
from public_env import *
|
||||
from GammaRPBot_Define import GammaRPBot
|
||||
formatter = discord.utils._ColourFormatter()
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
handler.setFormatter(formatter)
|
||||
logging.basicConfig(level=logging.INFO, handlers=[handler])
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
|
||||
intents = discord.Intents.all()
|
||||
bot = GammaRPBot(intents)
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
bot.db = await aiosqlite.connect("main.db")
|
||||
await bot.load_extension("perso_commands")
|
||||
await bot.tree.sync()
|
||||
print(f"Logged in as {bot.user}")
|
||||
|
||||
bot.run(bot_token)
|
Loading…
Add table
Add a link
Reference in a new issue