Example #1
0
async def set_basic_commands(dp: Dispatcher):
    await dp.bot.set_my_commands(
        [
            types.BotCommand("start", "Start the bot"),
            types.BotCommand("help", "Help message"),
        ],
    )
Example #2
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Перезапусить бота"),
        types.BotCommand("referrals", "Проверить рефералов"),
        types.BotCommand("promo", "Установить/показать промокод"),
        types.BotCommand("help", "Получить справку")
    ])
Example #3
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Запустить бота"),
        types.BotCommand("help", "Помощь"),
        types.BotCommand("tel", "Ввести телефонный номер"),
        types.BotCommand("send_location", "Ввести телефонный номер"),
    ])
Example #4
0
async def on_startup(dp):
    description_start = _("start a new challenge  // command description")
    await bot.set_my_commands([
        types.BotCommand(command="/start", description=description_start),
        types.BotCommand(command="/" + _("start  // command"),
                         description=description_start),
    ])
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Запустить бота"),
        types.BotCommand("help", "Помощь"),
        types.BotCommand("form", "Заполнить форму, добавить ключевые слова"),
        types.BotCommand("get_vacancies", "Посмотреть вакансии"),
    ])
Example #6
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Запустить бота"),
        types.BotCommand("help", "Помощь"),
        types.BotCommand('register', 'Зарегистрироваться'),
        types.BotCommand('unregister', 'Отписаться от рассылки')
    ])
Example #7
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands(
        [
            types.BotCommand("start", "Запустить бота"),
            types.BotCommand("help", "Вывести справку"),
        ]
    )
Example #8
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("help", "Получить справку"),
        types.BotCommand("menu", "Показать меню"),
        types.BotCommand("restart",
                         "Бот завис и не реагирует на Ваши сообщения")
    ])
Example #9
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Запустить бота"),
        types.BotCommand("help", "Помощь"),
        types.BotCommand("email", "Записать email пользователя "),
        types.BotCommand("weather", "Узнать погоду"),
        types.BotCommand("fixer", "Узнать курс обмена валюты"),
    ])
Example #10
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Что это за бот?"),
        types.BotCommand("help", "Краткое описание что это за бот."),
        types.BotCommand("whoami", "who ami i"),
        types.BotCommand("field", "Field players comparison"),
        types.BotCommand("goalies", "Goalies comparison")
    ])
Example #11
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Запустить бота"),
        types.BotCommand("help", "Помощь"),
        types.BotCommand("test", "Тест"),
        types.BotCommand("form", "Форма"),
        types.BotCommand("menu", "Меню"),
    ])
Example #12
0
async def set_commands(dispatcher):
    commands = [
        types.BotCommand(command="start", description="Перезапустить казино"),
        types.BotCommand(command="spin", description="Показать клавиатуру и сделать бросок"),
        types.BotCommand(command="stop", description="Убрать клавиатуру"),
        types.BotCommand(command="help", description="Справочная информация")
    ]
    await bot.set_my_commands(commands)
Example #13
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Запустить бота"),
        types.BotCommand("help", "Помощь"),
        types.BotCommand("btn_menu", "Pass the test"),
        types.BotCommand("questions", "Pass the test"),
        types.BotCommand("btn_item", "Button items"),
    ])
Example #14
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Start bot"),
        types.BotCommand("help", "Help"),
        types.BotCommand("test", "Пройти тест"),
        types.BotCommand("mid", "middleware"),
        types.BotCommand("items", "items"),
    ])
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("invoices", "Совершить тестовый платеж"),
        types.BotCommand("items", "Посмотреть новости Беларуси"),
        types.BotCommand("exchange", "Посмотреть курсы валют"),
        types.BotCommand("help", "Посмотреть справку"),
        types.BotCommand("show_on_map", "Показать мою геолокацию"),
    ])
Example #16
0
async def cmd_set_commands(message: types.Message):
    if message.from_user.id == 1234567:  # Подставьте сюда свой Telegram ID
        commands = [
            types.BotCommand(command="/drinks",
                             description="Заказать напитки"),
            types.BotCommand(command="/food", description="Заказать блюда")
        ]
        await bot.set_my_commands(commands)
        await message.answer("Команды настроены.")
Example #17
0
async def test_set_my_commands(bot: Bot):
    """ setMyCommands method test """
    from .types.dataset import BOT_COMMAND

    async with FakeTelegram(message_data=True):
        commands = [types.BotCommand(**BOT_COMMAND), types.BotCommand(**BOT_COMMAND)]
        result = await bot.set_my_commands(commands)
        assert isinstance(result, bool)
        assert result is True
Example #18
0
async def setup_bot_commands(dispatcher: Dispatcher):
    """
    Here we setup bot commands to make them visible in Telegram UI
    """
    await bot.set_my_commands([
        types.BotCommand(command="/id",
                         description="Tell your ID or group's ID"),
        types.BotCommand(command="/help", description="Help and source code"),
    ])
Example #19
0
async def handle_start(message: types.Message):
    logging.info('START:\n%s', message)
    cmds = [types.BotCommand(cmd, desc) for cmd, desc in COMMANDS]
    for cmd in cmds:
        logging.debug(cmd)
    result = await bot.set_my_commands(
        [types.BotCommand(cmd, desc) for cmd, desc in COMMANDS])
    logging.info('Bot commands set: %s', result)
    await message.answer(emoji.emojize(WELCOME), parse_mode='MarkdownV2')
Example #20
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands(
        [
            types.BotCommand("menu", "Открыть меню"),
            types.BotCommand("start", "Запустить бота"),
            types.BotCommand("help", "Вывести справку"),
            types.BotCommand("instruction", "получение подробной инструкции"),
            types.BotCommand("cancel", "Отмена"),
        ]
    )
Example #21
0
async def set_default_commands(dp):

    await dp.bot.set_my_commands([
        types.BotCommand("start", "Перезапустить бота / Restart a bot"),
        types.BotCommand("next", "Следующий собеседник / Next partner"),
        types.BotCommand("search", "Начать поиск / Find a partner"),
        types.BotCommand("stop", "Завершить диалог / End the dialog"),
        types.BotCommand(
            "sharelink",
            "Поделиться профилем / Send a link to your Telegram Account"),
    ], )
Example #22
0
async def set_commands(bot: Bot):
    commands = [
        types.BotCommand(command="/help", description="инструкция"),
        types.BotCommand(command="/input",
                         description="ввести данные тренировочки"),
        types.BotCommand(command="/cancel", description="отмена ввода данных"),
        #types.BotCommand(command="/send_to_chat", description="отправить последнюю тренировочку в чат"),
        types.BotCommand(command="/get_data",
                         description="вывести данные по тренировочке")
    ]
    await bot.set_my_commands(commands)
async def set_default_commands(dp):
    await dp.bot.set_bot_commands([
        types.BotCommand('start', 'Запустить бота'),
        types.BotCommand('help', 'Помощь'),
    ])


# async def set_bot_commands(dp):
#     await dp.bot.set_bot_commands()

# async def set_bot_commands(dp):
#     return None
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("menu", "Меню"),
        types.BotCommand("balance", "Узнать баланс"),
        types.BotCommand("expense", "Внести расход"),
        types.BotCommand("income", "Внести доход"),
        types.BotCommand("stats", "Получить аналитику"),
        types.BotCommand("budget", "Установить бюджет"),
        types.BotCommand("download", "Выгрузить свои операции"),
        types.BotCommand("feedback", "Оставить фидбек"),
        types.BotCommand("help", "Помощь"),
        types.BotCommand('donate', 'На развитие бота')
    ])
Example #25
0
async def setup_bot_commands(dispatcher: Dispatcher):
    """
    Here we setup bot commands to make them visible in Telegram UI
    """
    bot_commands = [
        types.BotCommand(command="/qna", description="this is for QnA "),
        types.BotCommand(command="/help", description="Help and source code"),
        types.BotCommand(command="/engtext",
                         description="This is for English Text genaration"),
        types.BotCommand(command="/chintext",
                         description="This is for Chinese Text genaration"),
        types.BotCommand(command="/qnabert",
                         description="This is for QnA Bert for news Dataset"),
    ]
    await bot.set_my_commands(bot_commands)
async def setup_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "start"),
        types.BotCommand(
            "wijzigen",
            "Toevoegen van edities, plaatsen, wijken en/of straten."),
        #types.BotCommand("nieuwe_editite", "Registreren van een nieuwe editie"),
        types.BotCommand(
            "claimen",
            "Claimen van een straat, zodat anderen weten dat je ermee bezig bent."
        ),
        types.BotCommand("gedaan",
                         "Melden van een straat dat deze gedaan is."),
    ])
    logger.info('Standard commands are successfully configured')
Example #27
0
async def cmd_set_commands(message: types.Message):
    user_id = message.from_user.id
    if user_id in config.ADMINS_ID:
        commands = [
            types.BotCommand(command="/new_request",
                             description="Новая заявка"),
            types.BotCommand(command="/cancel_request",
                             description="Отменить заявку"),
            types.BotCommand(command="/add_new_shop",
                             description="Добавить торговую точку"),
            types.BotCommand(command="/statistics",
                             description="Показать статистику")
        ]
        await bot.set_my_commands(commands)
        await message.answer("Команды установлены!")
Example #28
0
async def set_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand(command="nodes", description="Show Nodes"),
        types.BotCommand(command="managenodes", description="Show Nodes Details Or Restart"),
        types.BotCommand(command="runwatchdog", description="Start Node Monitoring Script"),
        types.BotCommand(command="stats", description="Show Nodes Stats"),
        types.BotCommand(command="updatestatus", description="Update Nodes"),
        types.BotCommand(command="updatestats", description="Update Stats"),
        types.BotCommand(command="help", description="Show Help"),
        types.BotCommand(command="graph", description="Display Earnings Graph Per Node Per Day"),
        types.BotCommand(command="aggregatedgraph", description="Display Aggregated Earnings Graph Per Day")
    ])
Example #29
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand("start", "Запустить бота"),
        types.BotCommand("items", "Вызов покупки..."),  # purchase
        types.BotCommand("menu", "Вызвать кнопки (Inline-кнопки)"),
        types.BotCommand("help", "Помощь"),
        types.BotCommand("privat", "Группа"),
        types.BotCommand("test", "Временное"),  # testing
        types.BotCommand("secret", "Команда для админов"),  # admin
        types.BotCommand("get_cat", "Получи котика ааааааа"),
        types.BotCommand("more_cats", "Получи больше котиков")
    ])
Example #30
0
async def set_default_commands(dp):
    await dp.bot.set_my_commands([
        types.BotCommand('start', 'Начать диалог бота'),
        types.BotCommand('help', 'Список доступных команд'),
        types.BotCommand('menu', 'Главное меню'),
        types.BotCommand('merch', 'Посмотреть будущие мероприятия РДШ'),
        types.BotCommand('events', 'Посмотреть будущие мероприятия РДШ'),
        types.BotCommand('info', 'Посмотреть информацию об РДШ'),
        types.BotCommand('list', 'Посмотреть топ активных школ'),
        types.BotCommand('ask', 'Задать вопрос РДШ'),
        types.BotCommand('report', 'Сообщить об ошибке')
    ])