Adds a list of InlineKeyboardButton to the keyboard. This method does not consider row_width. InlineKeyboardMarkup.row("A").row("B", "C").to_json() outputs: '{keyboard: [["A"], ["B", "C"]]}' See https://core.telegram.org/bots/api#inlinekeyboardmarkup
(self, *args)
| 3201 | return self |
| 3202 | |
| 3203 | def row(self, *args) -> 'InlineKeyboardMarkup': |
| 3204 | """ |
| 3205 | Adds a list of InlineKeyboardButton to the keyboard. |
| 3206 | This method does not consider row_width. |
| 3207 | |
| 3208 | InlineKeyboardMarkup.row("A").row("B", "C").to_json() outputs: |
| 3209 | '{keyboard: [["A"], ["B", "C"]]}' |
| 3210 | See https://core.telegram.org/bots/api#inlinekeyboardmarkup |
| 3211 | |
| 3212 | :param args: Array of InlineKeyboardButton to append to the keyboard |
| 3213 | :type args: :obj:`list` of :class:`telebot.types.InlineKeyboardButton` |
| 3214 | |
| 3215 | :return: self, to allow function chaining. |
| 3216 | :rtype: :class:`telebot.types.InlineKeyboardMarkup` |
| 3217 | """ |
| 3218 | |
| 3219 | return self.add(*args, row_width=self.max_row_keys) |
| 3220 | |
| 3221 | def to_json(self): |
| 3222 | return json.dumps(self.to_dict()) |