Exemple #1
0
async def first_keyboard(message):
    if message.chat.type == 'private':
        if message.text == '❌Delete API keys':
            h = message.from_user.id
            a = Db(db)
            a.destroy(h)
            await message.answer("Okey, deletion successful")
        elif message.text == '↩Back to main menu':
            markups = types.ReplyKeyboardMarkup(resize_keyboard=True)
            item11 = types.KeyboardButton("🧮Calculate entry volume")
            item21 = types.KeyboardButton("⚙Configure API Key⚙")
            markups.add(item11, item21)  # добавляем кнопку на клавиатуре
            await message.answer(
                f"Hi, {message.from_user.full_name}!\nThis bot is designed to calculate the volume of entry into a trade on BinanceFutures. If you want to start, click on the '🧮Calculate entry volume' button and then follow the instructions.\nWe wish you a profitable trade💰!",
                reply_markup=markups)