mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-10 17:15:47 +02:00
Add db through docker, configure alembic & fix pylint warning
This commit is contained in:
parent
3a35718d84
commit
9518bbe168
5 changed files with 120 additions and 11 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import discord
|
||||
from discord import Message
|
||||
from discord.ext import commands
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
|
|
@ -15,9 +14,14 @@ class Didier(commands.Bot):
|
|||
activity = discord.Activity(type=discord.ActivityType.playing, name=settings.DISCORD_STATUS_MESSAGE)
|
||||
status = discord.Status.online
|
||||
|
||||
intents = discord.Intents.default()
|
||||
intents.members = True
|
||||
intents.message_content = True
|
||||
intents = discord.Intents(
|
||||
guilds=True,
|
||||
members=True,
|
||||
message_content=True,
|
||||
emojis=True,
|
||||
messages=True,
|
||||
reactions=True,
|
||||
)
|
||||
|
||||
super().__init__(
|
||||
command_prefix=get_prefix, case_insensitive=True, intents=intents, activity=activity, status=status
|
||||
|
|
@ -27,10 +31,3 @@ class Didier(commands.Bot):
|
|||
def db_session(self) -> AsyncSession:
|
||||
"""Obtain a database session"""
|
||||
return DBSession()
|
||||
|
||||
async def on_ready(self):
|
||||
"""Event triggered when the bot is ready"""
|
||||
print(settings.DISCORD_READY_MESSAGE)
|
||||
|
||||
async def on_message(self, message: Message, /) -> None:
|
||||
print(message.content)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue