V
V
Vyacheslav Grachunov2019-03-04 22:08:47
Python
Vyacheslav Grachunov, 2019-03-04 22:08:47

How to create a bot menu in the form of a menu?

Subject
Found this instruction on stackoverflow:
https://stackoverflow.com/questions/41956166/how-c...
But is there only a list with buttons? How to hang commands on them?
I can't find it properly.
To write a bot I use Python3 and telebot (which is pyTelegramBotAPI)
Here:

telegram
5c7d856991ea9392635456.jpeg5c7d858524996728528580.jpeg

here the bot has a square button with four dots next to the smiley button. Clicking it brings up a menu. I need the same

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
Ilya Rozum, 2019-03-05
@klad_man

Hello, maybe this will help you.
https://www.youtube.com/watch?v=nG9nObVSQ6k&index=... "

A
Andrew Nodermann, 2019-03-04
@Lucian

The name of the button is the command, for example, if I click on the "Settings" button, the bot will receive a message: Settings
This page has an example https://github.com/eternnoir/pyTelegramBotAPI

V
vanproskur, 2019-03-06
@vanproskur

use tkinter.

from tkinter import *

root = Tk()
root.title('Telegram bot')

def reaction(event):
    #код функции

Button(root,text = 'reaction' , command = reaction).pack()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question