B
B
Brad_baf2020-04-27 18:48:49
Python
Brad_baf, 2020-04-27 18:48:49

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()

And when I upload the bot to the heroku server, I don't get this information. What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Pokrovsky, 2020-04-27
@Brad_baf

https://issue.life/questions/48365309

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question