added new typed for keyboard

This commit is contained in:
Andrei Yankovich 2023-10-28 11:50:39 +02:00
parent a8bd1f3b47
commit 4d3ac752a7
2 changed files with 5 additions and 2 deletions

View File

@ -271,7 +271,7 @@ bool ITelegramBot::editSpecificMessage(const QVariant &messageId,
bool ITelegramBot::sendSpecificMessageWithKeyboard(const QVariant &chatId,
const QString &text,
const QList<QMap<QString, std::function<void(const QString&, const QVariant& msgID)> >> &keyboard,
const KeyboardOnMessage &keyboard,
const QString &callBackQueryId,
unsigned long long replyToMessageId,
bool markdown,

View File

@ -22,6 +22,9 @@ class ITelegramMessage;
class TelegramFile;
class TelegramUpdateAnswer;
typedef std::function<void(const QString& buttonKey, const QVariant& msgID)> ButtonCB;
typedef QList<QMap<QString, ButtonCB >> KeyboardOnMessage;
/**
* @brief The ITelegramBot class This is base implementation of the all telegramm bots.
*/
@ -86,7 +89,7 @@ public:
*/
bool sendSpecificMessageWithKeyboard(const QVariant &chatId,
const QString& text,
const QList<QMap<QString, std::function<void (const QString &, const QVariant &)> > > &keyboard,
const KeyboardOnMessage &keyboard,
const QString &callBackQueryId = "",
unsigned long long replyToMessageId = 0,
bool markdown = true,