M
M
Maxim Sagaydak2021-05-01 22:44:46
Python
Maxim Sagaydak, 2021-05-01 22:44:46

Telegram Bot - Python swears when I write a long line, what are the options for fixing the error?

Hello Python swears, shown in the screenshot below.
See what I need, I need the Bot to send a long message, but inserting it into this one (call.message.chat.id, 'A very long message for which you need to think of something' , reply_markup=markup) is not an option at all, help and tell me something, like what I would write to a variable from the beginning, and then output how to do it, please help.608daf7bd1ff8623976048.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuriy Vorobyov, 2021-05-01
@CoDeR2006

Judging by the error, the reason is generally different
Add to the beginning of the file: # -*- coding: utf-8 -*-
About this

help and tell me something, like what I would write to a variable from the beginning, and then output,
:
message = 'Очень длинное сообщения для которого нужно что придумать'
bot.send_message(call.message.chat.id, message, reply_markup=markup)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question