Skip to content

Commit

Permalink
TgBot++: socket: Add TYPE_STICKER support
Browse files Browse the repository at this point in the history
  • Loading branch information
Royna2544 committed Jun 29, 2024
1 parent a3c49ea commit 0fa1d94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/socket/include/TgBotSocket_Export.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ enum class FileType {
TYPE_GIF,
TYPE_DOCUMENT,
TYPE_DICE,
TYPE_STICKER,
TYPE_MAX
};

Expand Down
5 changes: 5 additions & 0 deletions src/socket/interface/impl/bot/SocketDataHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ GenericAck SocketInterfaceTgBot::handle_SendFileToChatId(const void* ptr) {
return api.sendDocument(id, file);
};
break;
case FileType::TYPE_STICKER:
fn = [](const Api& api, ChatId id, const FileOrId_t& file) {
return api.sendSticker(id, file);
};
break;
case FileType::TYPE_DICE: {
static const std::vector<std::string> dices = {
"🎲", "🎯", "🏀", "", "🎳", "🎰"};
Expand Down

0 comments on commit 0fa1d94

Please sign in to comment.