From 94980b3d150d1680d70fe3ba819834a65d1dd438 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 9 Apr 2019 00:23:09 +0200 Subject: [PATCH] Add type hints to diario --- royalnet/commands/diario.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/royalnet/commands/diario.py b/royalnet/commands/diario.py index ac036efc..7159bddf 100644 --- a/royalnet/commands/diario.py +++ b/royalnet/commands/diario.py @@ -102,6 +102,13 @@ class DiarioCommand(Command): message: telegram.Message = update.message reply: telegram.Message = message.reply_to_message creator = await call.get_author() + quoted_account: typing.Optional[call.alchemy.Telegram] + quoted: typing.Optional[str] + text: typing.Optional[str] + context: typing.Optional[str] + timestamp: datetime.datetime + media_url: typing.Optional[str] + spoiler: bool if creator is None: await call.reply("⚠️ Devi essere registrato a Royalnet per usare questo comando!") return @@ -124,7 +131,7 @@ class DiarioCommand(Command): quoted_account = quoted_tg.royal if quoted_tg is not None else None # Find the quoted name to assign quoted_user: telegram.User = reply.from_user - quoted: str = quoted_user.full_name + quoted = quoted_user.full_name # Get the timestamp timestamp = reply.date # Set the other properties