mirror of
https://github.com/Fluffy-Bean/Lynxie.git
synced 2025-05-31 15:53:14 +00:00
Yeet database
This commit is contained in:
parent
666cdb113e
commit
f955cc3adc
3 changed files with 0 additions and 48 deletions
|
@ -8,12 +8,10 @@ from discord.ext import commands
|
|||
from discord.gateway import DiscordWebSocket
|
||||
|
||||
from lynxie.config import DISCORD_TOKEN, LYNXIE_PREFIX
|
||||
from lynxie.database import CommandHistory, Database
|
||||
from lynxie.utils import mobile_status, error_message
|
||||
from lynxie.commands import Help, Ping, Hello, Music, Animals, Img, E621
|
||||
|
||||
|
||||
db = Database()
|
||||
DiscordWebSocket.identify = mobile_status
|
||||
lynxie = commands.Bot(
|
||||
intents=discord.Intents.all(),
|
||||
|
@ -32,17 +30,6 @@ async def on_command(ctx):
|
|||
if ctx.author == lynxie.user or ctx.author.bot:
|
||||
return
|
||||
|
||||
query = CommandHistory(
|
||||
command=ctx.command.name,
|
||||
user=ctx.author.id,
|
||||
channel=ctx.channel.id,
|
||||
guild=ctx.guild.id,
|
||||
timestamp=ctx.message.created_at,
|
||||
)
|
||||
|
||||
db.session.add(query)
|
||||
db.session.commit()
|
||||
|
||||
|
||||
@lynxie.event
|
||||
async def on_command_error(ctx, error):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue