⠀
Size: a a a
⠀
⠀
client.connect()
img = ImageGrab.grab()
with io.BytesIO() as output:
img.save(output, format="PNG")
output.name = 'ada.png'
contents = output.getvalue()
client.send_file(c.channel_id, file=io.BytesIO(contents))
⠀
⠀
client.connect()
with io.BytesIO() as output:
output.write('asdasdasd'.encode())
output.name = 'ada.txt'
contents = output.getvalue()
client.send_file(c.channel_id, file=io.BytesIO(contents))
client.disconnect()
⠀
KG
async with client:
with io.BytesIO() as output:
output.write('asdasdasd'.encode())
output.name = 'ada.txt'
output.seek(0)
await client.send_file(chat, file=output)
KG
client.connect()
with io.BytesIO() as output:
output.write('asdasdasd'.encode())
output.name = 'ada.txt'
contents = output.getvalue()
client.send_file(c.channel_id, file=io.BytesIO(contents))
client.disconnect()
output.name
, а отправляешь contents
без name
⠀
⠀
KG
KG
AK
AK
telethon.errors.rpcerrorlist.SessionPasswordNeededError: Two-steps verification is enabled and a password is required (caused by SignInRequest)
AK
️️
️️
AK
️️
F
️️