zoya
zoya

Reputation: 61

How can I send message with button in bale-messenger by python?

I couldn't find solution that send message with keyboard button in bale messenger by python! If you can help, Please let me know.

Upvotes: 3

Views: 179

Answers (3)

Kian Ahmadian
Kian Ahmadian

Reputation: 23

If you are using python-bale-bot, it should be something like this.

import bale
from bale import EventType

bot = bale.Bot("Your Token")

@bot.listen(EventType.READY)
async def on_ready():
     print("READY!")

@bot.listen(EventType.MESSAGE)
async def on_message(message):
     await message.reply("Hey! this is test!", components = bale.Components(
        keyboards=[[bale.Keyboard("Test")]]
     ))

bot.run()

Upvotes: 1

masoodbayati
masoodbayati

Reputation: 345

you can send a template message instead of keyboard button.

Upvotes: 1

Ehsan
Ehsan

Reputation: 4291

There is no keyboard button now. Maybe in future :)

Upvotes: 0

Related Questions