Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
remember all read messages, as you remember, move the counter of read messages to the last one, after that you can’t read the old one
I was not wise, I installed it on the basis of longman / telegram-bot, deployed the necessary databases and now everything is written in DB.
you can simply log to a file, like this:
def log(message):
print("<!------!>")
print(datetime.now())
print("Сообщение от {0} {1} (id = {2}) \n {3}".format(message.from_user.first_name,
message.from_user.last_name,
str(message.from_user.id), message.text))
@bot.message_handler(commands=['create'])
def cmd_create(message):
send = bot.send_message(message.chat.id, 'Введи название задачи')
bot.register_next_step_handler(send, create)
log(message)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question