From 0fa2cec5c27326e618390976cd82467343d0402a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 8 Jul 2019 02:16:25 +0300 Subject: [PATCH] Fix royalnetprofile command --- royalnet/commands/royalnetprofile.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/royalnet/commands/royalnetprofile.py b/royalnet/commands/royalnetprofile.py index 93191f90..8e2f59d9 100644 --- a/royalnet/commands/royalnetprofile.py +++ b/royalnet/commands/royalnetprofile.py @@ -1,6 +1,6 @@ import asyncio from ..utils import Command, Call -from ..error import InvalidInputError +from ..database.tables import Royal, Telegram, Discord class RoyalnetprofileCommand(Command): @@ -9,9 +9,11 @@ class RoyalnetprofileCommand(Command): command_description = "Invia in chat il link al tuo profilo Royalnet!" command_syntax = "" + require_alchemy_tables = {Royal, Telegram, Discord} + @classmethod async def common(cls, call: Call): - author = await call.get_author() + author = await call.get_author(error_if_none=True) if author is None: await call.reply("⚠️ Devi essere registrato a Royalnet per usare questo comando!") return