elif msg in ['ок'] and id == 000000000:
for user in list_of_users:
try:
send_some_msg(user, "Вам письмо")
except:
pass
import telebot
from telebot.types import Message
from telebot import types
client = telebot.TeleBot('Твой токен')
@client.message_handler(commands=['start'])
def welcom(message):
markup_reply = types.ReplyKeyboardMarkup(resize_keyboard=True)
item_1 = types.KeyboardButton('1')
item_2 = types.KeyboardButton('2')
item_3 = types.KeyboardButton('3')
markup_reply.add(item_1, item_2, item_3)
client.send_message(message.chat.id, 'Нажми на кнопку', reply_markup=markup_reply)
@client.message_handler(content_types=['text'])
def text(message):
if message.text == '1':
markup_reply = types.ReplyKeyboardMarkup(resize_keyboard=True)
item_1 = types.KeyboardButton('Ты уверен')
item_2 = types.KeyboardButton('тест')
markup_reply.add(item_1, item_2)
client.send_message(message.chat.id, 'Ты нажал на кнопку', reply_markup=markup_reply)
elif message.text == '2':
markup_reply = types.ReplyKeyboardMarkup(resize_keyboard=True)
item_1 = types.KeyboardButton('ха')
item_2 = types.KeyboardButton('пицца')
markup_reply.add(item_1, item_2)
client.send_message(message.chat.id, 'Ты нажал на кнопку2', reply_markup=markup_reply)
client.polling(none_stop=True, interval=0)