Post

Reply Keyboards Bot

Reply Keyboards Bot

بات ریپلای کیبوردها

به این بات یک پیام بدهید تا یک پیام همراه با کیبورد به شما بفرستد
سپس روی دکمه ها کلیک کنید

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from balethon import Client
from balethon.conditions import private, equals
from balethon.objects import ReplyKeyboard

bot = Client("TOKEN")


@bot.on_message(private & equals("Button 1", "Button 2"))
async def answer_buttons(message):
    await message.reply(
        f"Thank you for clicking on button {message.text}"
    )


@bot.on_message(private)
async def answer_message(message):
    await message.reply(
        "Click a button!",
        ReplyKeyboard(
            ["Button 1"],
            ["Button 2"]
        )
    )


bot.run()
This post is licensed under CC BY 4.0 by the author.