Template
Try to add markup
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user