Fix file uploads and references to full_name

This commit is contained in:
Lonami Exo
2023-10-16 23:06:24 +02:00
parent 0727c1d1f1
commit 34dffe978e
6 changed files with 21 additions and 21 deletions

View File

@@ -402,7 +402,7 @@ In Telethon:
@client.on(events.NewMessage, Command("/start"))
async def command_start_handler(message: Message) -> None:
await message.respond(html=f"Hello, <b>{html.escape(message.sender.full_name)}</b>!")
await message.respond(html=f"Hello, <b>{html.escape(message.sender.name)}</b>!")
@dp.message()
async def echo_handler(message: types.Message) -> None:

View File

@@ -19,7 +19,7 @@
async def main():
async with Client('name', api_id, api_hash) as client:
me = await client.interactive_login()
await client.send_message(me, f'Hello, {me.full_name}!')
await client.send_message(me, f'Hello, {me.name}!')
@client.on(events.NewMessage, filters.Text(r'(?i)hello'))
async def handler(event):