Answer the question
In order to leave comments, you need to log in
How to write the history of commands from each user to a file?
How to write the history of commands from each user to a file? I wrote a code so that the name and surname of the one who registered / start was written to the file, here is the code:
g = f"{message.from_user.first_name} {message.from_user.last_name}\n"
handle = open("test.txt", "a")
handle.write(g)
handle.close()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question