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

Fix data.find_user

This commit is contained in:
Steffo 2020-07-26 18:51:17 +02:00
parent e7f0b02e43
commit 5586b88833

View file

@ -5,8 +5,7 @@ import asyncio as aio
import royalnet.utils as ru import royalnet.utils as ru
import io import io
from .errors import UnsupportedError from .errors import UnsupportedError
from .commandinterface import CommandInterface from royalnet.backpack.tables.users import User
from royalnet.backpack.tables.aliases import Alias
if TYPE_CHECKING: if TYPE_CHECKING:
from .keyboardkey import KeyboardKey from .keyboardkey import KeyboardKey
@ -83,7 +82,7 @@ class CommandData:
Parameters: Parameters:
alias: the Alias to search for.""" alias: the Alias to search for."""
return await Alias.find_user(self._interface.alchemy, self.session, alias) return await User.find(self.command.serf.alchemy, self.session, alias)
@contextlib.asynccontextmanager @contextlib.asynccontextmanager
async def keyboard(self, text, keys: List["KeyboardKey"]): async def keyboard(self, text, keys: List["KeyboardKey"]):