Похожие чаты

Hello guys. Well I am trying to create multiple clients at

the same time using a bot
I first did it with only one client which I defined it globally and used it in my bot.

But now I want to have multiple clients at the same time and shouldn't be globally defined so the session file will not be overwritten.

I tried to use StringSession for that purpose but it wouldn't save any file but I want to have the files with the user id which I will add it to my clients dictionary so I can access them while the bot is working.

Does anybody know how to create the session files with different names rather than using string session?

2 ответов

13 просмотров

First argument you pass to TelegramClient() is the filename

Shemin- Автор вопроса
Deer Spangle ️
First argument you pass to TelegramClient() is the...

Yes I know! What I'm saying is for example I am using the bot and someone else is trying to use the bot as well so the session files should differ in their names and this should be automatic for any user that is using the bot Cuz I am authorising each user through the bot, So obviously I cannot create like 100 clients inside the code Or idk if it's possible to do that or not

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта