diff --git a/royalpack/bolts/login.py b/royalpack/bolts/login.py index 8b3fc93b..ed2fdfd2 100644 --- a/royalpack/bolts/login.py +++ b/royalpack/bolts/login.py @@ -8,6 +8,7 @@ import functools import logging import royalnet.engineer as engi +import royalnet_discordpy import royalnet_telethon import sqlalchemy.orm as so import sqlalchemy.sql as ss @@ -40,6 +41,13 @@ def use_ryglogin(allow_anonymous=False): ss.select(db.TelegramAccount).where(db.TelegramAccount.id == _sender._user.id) ).scalar() + elif isinstance(_imp, royalnet_discordpy.DiscordpyPDAImplementation): + _sender = await _msg.sender + supported = True + account = _session.execute( + ss.select(db.DiscordAccount).where(db.DiscordAccount.id == _sender._user.id) + ).scalar() + else: supported = False account = None