S
S
swpavlov2020-12-21 18:36:29
Python
swpavlov, 2020-12-21 18:36:29

How to send command with telegram keyboard?

I'm interested in the question, how can I send a command by pressing the aiogram keyboard buttons in telegrams? What is the second parameter of the will text should be? commands not working

def offers():
    keyboard = types.ReplyKeyboardMarkup()
    menu_1 = KeyboardButton(text='Биржа рекламы ')
    menu_2 = KeyboardButton(text='Предложения ')
    menu_3 = KeyboardButton(text='Мои каналы ')
    menu_4 = KeyboardButton(text='Добавить канал ➕')
    keyboard.add(menu_1, menu_2, menu_3, menu_4)
    return keyboard

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
soremix, 2020-12-21
@SoreMix

Commands cannot be added to a KeyboardButton , create an InlineKeyboardButton if you need some kind of load on the keyboard, or whatever you mean by commands

X
xmoonlight, 2017-02-05
@xmoonlight

Start with Vagrant and virtual machines.
This will help you set up a full-fledged test server (with all the necessary services, including a web server, database, etc.) for further training.

A
Alexander Novikov, 2017-02-05
@AlexndrNovikov

If you want to gain knowledge on how to set up a server, how to use MySQL, etc. - instead of a simplified MAMP with graphical interfaces, use Vagrant instead (you can set up the initial build step by step here https://puphpet.com/ , as you figure it out, go to your own), manual on vagrant here https://www.vagrantup.com/docs/getting-started/
If you want to dive deeper into this (servers - "containers", internetworking, etc.) - then look at https://www.docker.com/ .
Get ready in advance, this and that is difficult, but once you figure out any MAMPs/OpenServer/Denwer/etc you won't be driven with a stick.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question