add guilds to database on connection if not already in database, remove old db.py, switch from query filter_by to simple get by primary key

This commit is contained in:
Xevion
2021-02-13 08:35:00 -06:00
parent 00f5b64f3f
commit 1f46a98f37
3 changed files with 12 additions and 213 deletions

View File

@@ -42,7 +42,7 @@ class Guild(Base):
active = Column(Boolean, default=True) # Whether or not the bot is active inside the given Guild. Used for better querying.
joined = Column(DateTime, default=datetime.datetime.utcnow) # The initial join time for this bot to a particular Discord.
last_joined = Column(DateTime, nullable=True) # The last time the bot joined this server.
last_joined = Column(DateTime, default=datetime.datetime.utcnow) # The last time the bot joined this server.
def check_not_finished(func):