1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

fixed (?) db.py

blame steffo if something breaks
This commit is contained in:
Fabio De Simone 2019-01-28 22:32:47 +01:00 committed by Stefano Pigozzi
parent c1f0f34aa8
commit e903c6484f

4
db.py
View file

@ -16,7 +16,7 @@ import re
import enum
# Both packages have different pip names
# noinspection PyPackageRequirements
from discord import User as DiscordUser
# from discord import User as DiscordUser
# noinspection PyPackageRequirements
from telegram import User as TelegramUser
import loldata
@ -689,7 +689,7 @@ class Discord(Base, Mini):
return f"<db.Discord {self.discord_id}>"
@staticmethod
def create(session: Session, royal_username, discord_user: DiscordUser):
def create(session: Session, royal_username, discord_user: "DiscordUser"):
d = session.query(Discord).filter(Discord.discord_id == discord_user.id).first()
if d is not None:
raise AlreadyExistingError(repr(d))