1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Improve a few imports

This commit is contained in:
Steffo 2020-08-05 01:55:10 +02:00
parent 62ba71ea66
commit b9c99f38eb
3 changed files with 6 additions and 10 deletions

View file

@ -1,7 +1,5 @@
from typing import *
import royalnet
import royalnet.commands as rc
import royalnet.utils as ru
from ..tables import User

View file

@ -1,7 +1,5 @@
from typing import *
import royalnet
import royalnet.commands as rc
import royalnet.utils as ru
from ..tables import User

View file

@ -2,9 +2,9 @@ from typing import *
import royalnet
import royalnet.commands as rc
import royalnet.utils as ru
import royalnet.serf.telegram
import royalnet.serf.discord
import royalnet.serf.matrix
import royalnet.serf.telegram as rst
import royalnet.serf.discord as rsd
import royalnet.serf.matrix as rsm
from ..tables.telegram import Telegram
from ..tables.discord import Discord
@ -30,7 +30,7 @@ class RoyalnetsyncCommand(rc.Command):
if not successful:
raise rc.InvalidInputError(f"Invalid password!")
if isinstance(self.serf, royalnet.serf.telegram.TelegramSerf):
if isinstance(self.serf, rst.TelegramSerf):
import telegram
message: telegram.Message = data.message
from_user: telegram.User = message.from_user
@ -56,7 +56,7 @@ class RoyalnetsyncCommand(rc.Command):
await data.session_commit()
await data.reply(f"↔️ Account {tg_user} synced to {author}!")
elif isinstance(self.serf, royalnet.serf.discord.DiscordSerf):
elif isinstance(self.serf, rsd.DiscordSerf):
import discord
message: discord.Message = data.message
author: discord.User = message.author
@ -82,7 +82,7 @@ class RoyalnetsyncCommand(rc.Command):
await data.session_commit()
await data.reply(f"↔️ Account {ds_user} synced to {author}!")
elif isinstance(self.serf, royalnet.serf.matrix.MatrixSerf):
elif isinstance(self.serf, rsm.MatrixSerf):
raise rc.UnsupportedError(f"{self} hasn't been implemented for Matrix yet")
else: