Skip to content

InlineKeyboardMarkup does not accepts InlineKeyboardButton #277

Description

@EvertKors

I got my buttons working in ReplyKeyboardMarkup and i changed it into InlineKeyboardMarkup with the following code

mark_up = InlineKeyboardMarkup(
    [[InlineKeyboardButton('inline button')]]
)

And i get the following error

telegram.error.NetworkError: Error : 400 : Bad Request: Can't parse inline keyboard button: Text buttons are unallowed in the inline keyboard

Below is the documentation of the InlineKeyboardMarkup and as you can see it is refering to a list of InlineKeyboardMarkup and not InlineKeyboardButton.

"""This object represents a Telegram InlineKeyboardMarkup.
Attributes:
inline_keyboard (List[List[:class:telegram.InlineKeyboardMarkup]]):
Args:
inline_keyboard (List[List[:class:telegram.InlineKeyboardMarkup]]):
"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions