Try to add markup

This commit is contained in:
2024-07-31 00:44:19 +03:00
parent a8f39d4630
commit d3ed6e4006
7 changed files with 106 additions and 9 deletions
+9 -3
View File
@@ -1,9 +1,13 @@
from telebot import TeleBot
from telebot.types import Message
from telebot.types import Message, CallbackQuery
def start(message: Message, bot: TeleBot, t, **kwargs):
bot.send_message(message.chat.id, t("start"))
def start(message: Message, bot: TeleBot, t, m, **kwargs):
bot.send_message(message.chat.id, t("start"), reply_markup=m("start"))
def start_call(call: CallbackQuery, bot: TeleBot, t, m, **kwargs):
bot.send_message(call.message.chat.id, t("start"), reply_markup=m("start"))
def help_(message, bot, t, **kwargs):
@@ -13,3 +17,5 @@ def help_(message, bot, t, **kwargs):
def register_handlers(bot: TeleBot):
bot.register_message_handler(start, commands=["start"], pass_bot=True)
bot.register_message_handler(help_, commands=["help"], pass_bot=True)
bot.register_callback_query_handler(start_call, lambda call: call.data == "start")