mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-26 13:04:20 +00:00
🐛 Fix discord login bolt
This commit is contained in:
parent
54465954a0
commit
9348e1fb0e
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue