Разработка бота для телеграмма на библиотеке telebot

nikerider

Новичок
Пользователь
Авг 7, 2024
2
0
1
проблема в том, что я написал код по гайдам из ютуба, вроде все верно, но проблема в том что бот не хочет работать, хотя токен правильный.

Код:
import telebot
from telebot import types
TOKEN = 'мой токен (специально убрал чтоб не украли)'

bot = telebot.TeleBot(TOKEN)

@bot.message_handler(commands=['start'])


def start(message):
    murkup = types.ReplyKeyboardMarkup(resize_keyboatd = True)
    item1 = types.KeyboardButton('Coinflip')
    item2 = types.KeyboardButton('mines')

    murkup.add(item1, item2)

    bot.send_message(message.chat.id, 'Привет, {0.first_name}'.format(message.from_user), reply_murkup = murkup)

    bot.polling(none_stop = True)
 

nikerider

Новичок
Пользователь
Авг 7, 2024
2
0
1
если что через консоль telebot'а установил
 

4olshoy_blen

Популярный
Пользователь
Ноя 13, 2022
405
113
43
Python:
import telebot
from telebot import types

TOKEN = ''
bot = telebot.TeleBot(TOKEN)


@bot.message_handler(commands=['start'])
def start(message):
    murkup = types.ReplyKeyboardMarkup(resize_keyboatd=True)
    item1 = types.KeyboardButton('Coinflip')
    item2 = types.KeyboardButton('mines')
    murkup.add(item1, item2)
    
    bot.send_message(message.chat.id, 'Привет, {0.first_name}'.format(message.from_user), reply_murkup=murkup)


bot.polling(none_stop=True)
 

Форум IT Специалистов