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

Add type hints to diario

This commit is contained in:
Steffo 2019-04-09 00:23:09 +02:00
parent 310b0f62e5
commit 94980b3d15

View file

@ -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