rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.54k stars 1.14k forks source link

Telegram Game: telegram.error.BadRequest: Reply_markup_game_empty #1389

Open NtemKenyor opened 2 days ago

NtemKenyor commented 2 days ago

async def send_game(update: Update, context: CallbackContext):
    user_id = update.message.chat.id
    game_url = f'https://example.com'
    keyboard = [
        [InlineKeyboardButton("Play Now", url=game_url )],
    ]
    markup = InlineKeyboardMarkup(keyboard)
    await update.message.reply_game(game_short_name, reply_markup=markup)

I really do not understand the problem with this code but I want to open my game that is already registered with the BotFather inside telegram not with the inner browser extension.

I get the error: telegram.error.BadRequest: Reply_markup_game_empty and I have tried different things but nothing works.

Chase22 commented 2 days ago

Are you sure you're at the right repository? This is for the Java library. I don't recognise the language used