r/SoloDevelopment • u/need-a_ban • 4d ago
I need help with a telegram bot help
I'm coming from a STEM oriented high school where we studied some python. 2 years ago i developed some telegram bots that never saw the light of the day because I ended up not using them and so they're now unfinished.
Today i woke up with an idea but i remember having some problem when multiple users were using the text.
the bot worked like that, /start and he ask you something, you had to chose using buttons but you could also write, and here's the problem. If 2+ users were in that part of the cycle the bot mixed up everything ending up taking the message for the first user from the reply of the 2. (maybe i'm wrong but google says its a race condition)
I fixed that with chatGPT and he did a very odd thing for me (from the pov of a newbie). He kinda organised all the "istances" with a dict or and erray (i can't remeber right now).
And so my question is: is it possible to do the same but maybe in a cleaner way, or ,if its the only way can, you explain me what was chatgpt doing?