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:
parent
310b0f62e5
commit
94980b3d15
1 changed files with 8 additions and 1 deletions
|
@ -102,6 +102,13 @@ class DiarioCommand(Command):
|
||||||
message: telegram.Message = update.message
|
message: telegram.Message = update.message
|
||||||
reply: telegram.Message = message.reply_to_message
|
reply: telegram.Message = message.reply_to_message
|
||||||
creator = await call.get_author()
|
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:
|
if creator is None:
|
||||||
await call.reply("⚠️ Devi essere registrato a Royalnet per usare questo comando!")
|
await call.reply("⚠️ Devi essere registrato a Royalnet per usare questo comando!")
|
||||||
return
|
return
|
||||||
|
@ -124,7 +131,7 @@ class DiarioCommand(Command):
|
||||||
quoted_account = quoted_tg.royal if quoted_tg is not None else None
|
quoted_account = quoted_tg.royal if quoted_tg is not None else None
|
||||||
# Find the quoted name to assign
|
# Find the quoted name to assign
|
||||||
quoted_user: telegram.User = reply.from_user
|
quoted_user: telegram.User = reply.from_user
|
||||||
quoted: str = quoted_user.full_name
|
quoted = quoted_user.full_name
|
||||||
# Get the timestamp
|
# Get the timestamp
|
||||||
timestamp = reply.date
|
timestamp = reply.date
|
||||||
# Set the other properties
|
# Set the other properties
|
||||||
|
|
Loading…
Reference in a new issue