-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
In https://docs.elizaos.ai/plugin-registry/platform/telegram/complete-documentation , there is this portion that covers inline keyboards and how to utilise plugin-telegram to create them.
const keyboard = {
inline_keyboard: [[
{ text: "Option 1", callback_data: "opt_1" },
{ text: "Option 2", callback_data: "opt_2" }
], [
{ text: "Cancel", callback_data: "cancel" }
]]
};
However, going through https://github.com/elizaos-plugins/plugin-telegram/blob/1.x/src/utils.ts
reveals
/**
* Converts Eliza buttons into Telegram buttons
* @param {Button[]} buttons - The buttons from Eliza content
* @returns {InlineKeyboardButton[]} Array of Telegram buttons
*/
export function convertToTelegramButtons(buttons?: Button[] | null): InlineKeyboardButton[] {
if (!buttons) return [];
return buttons.map((button: Button) => {
switch (button.kind) {
case 'login':
return Markup.button.login(button.text, button.url);
case 'url':
return Markup.button.url(button.text, button.url);
}
});
}
which means that the functionality in the documentation was not actually implemented
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels