D
D
damir4ig2020-06-19 23:09:02
Python
damir4ig, 2020-06-19 23:09:02

Invalid Syntax functions of the telebot library. How to fix?

import telebot

bot=telebot.TeleBot('токен')
keyboard1=telebot.types.ReplyKeyboardMarkup(True, True)
keyboard1.row('Создать комбинацию', 'Про бота')

@bot.message_handler(commands=['start'])
def start_message(message):
        bot.send_message(message.chat.id, 'Привет, это бот для создания комбинации')


bot.polling(none_stop=True)

The code is raw, I'll finish it later
Error:
$ python main.py
File "main.py", line 12
bot.polling(none_stop=True)
^

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2020-06-19
@fox_12

bot.send_message(message.chat.id, 'Hi, this is a bot created for> <---- crookedly copied the code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question