Python
8
Вклад в тег
return HMAC(key, msg, digestmod)
return HMAC(key.encode(), msg.encode(), digestmod)
import telebot
from telebot import types
API_TOKEN = '<api_token>'
bot = telebot.TeleBot(API_TOKEN)
@bot.message_handler(commands=['help', 'start'])
def send_welcome(message):
markup = types.ReplyKeyboardMarkup(one_time_keyboard=True)
markup.add('1', '2') #Имена кнопок
msg = bot.reply_to(message, 'Test text', reply_markup=markup)
bot.register_next_step_handler(msg, process_step)
def process_step(message):
chat_id = message.chat.id
if message.text=='1':
func1()
else:
func2()