diff --git a/db/Task.py b/db/Task.py index dae228c..b39c7df 100644 --- a/db/Task.py +++ b/db/Task.py @@ -1,5 +1,5 @@ from db import Base -from sqlalchemy import Column, Integer, String, BigInteger, Date +from sqlalchemy import Column, Integer, String, BigInteger, DateTime from datetime import datetime @@ -9,8 +9,8 @@ class Task(Base): message = Column(String, nullable=False) user = Column(BigInteger, nullable=False) channel = Column(BigInteger, nullable=False) - date = Column(Date, nullable=False) - creation_date = Column(Date, default=datetime.now()) + date = Column(DateTime, nullable=False) + creation_date = Column(DateTime, default=datetime.now()) def __init__(self, message: str, user: int, channel: int, date: datetime): self.message = message diff --git a/extensions/reminders.py b/extensions/reminders.py index 4c87439..d55e58f 100644 --- a/extensions/reminders.py +++ b/extensions/reminders.py @@ -99,7 +99,7 @@ class Reminders(commands.Cog): embed = Embed(title="You have a reminder !") user = self.bot.get_user(task.user) embed.set_author(name=f"{user.name}#{user.discriminator}", icon_url=user.avatar_url) - embed.add_field(name=str(task.date), value=task.message) + embed.add_field(name=str(task.creation_date), value=task.message) await (await self.bot.get_channel(task.channel).send(f"{user.mention}", embed=embed)).edit(content="") @commands.Cog.listener()