-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from llnulldisk/master
Update to Bot API 7.2
- Loading branch information
Showing
116 changed files
with
5,870 additions
and
1,482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef TGBOT_BIRTHDATE_H | ||
#define TGBOT_BIRTHDATE_H | ||
|
||
#include <cstdint> | ||
#include <memory> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @ingroup types | ||
*/ | ||
class Birthdate { | ||
|
||
public: | ||
typedef std::shared_ptr<Birthdate> Ptr; | ||
|
||
/** | ||
* @brief Day of the user's birth; 1-31 | ||
*/ | ||
std::uint8_t day; | ||
|
||
/** | ||
* @brief Month of the user's birth; 1-12 | ||
*/ | ||
std::uint8_t month; | ||
|
||
/** | ||
* @brief Optional. Year of the user's birth | ||
*/ | ||
std::uint16_t year; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BIRTHDATE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef TGBOT_BOTDESCRIPTION_H | ||
#define TGBOT_BOTDESCRIPTION_H | ||
|
||
#include <memory> | ||
#include <string> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @brief This object represents the bot's description. | ||
* | ||
* @ingroup types | ||
*/ | ||
class BotDescription { | ||
public: | ||
typedef std::shared_ptr<BotDescription> Ptr; | ||
|
||
/** | ||
* @brief The bot's description | ||
*/ | ||
std::string description; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BOTDESCRIPTION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef TGBOT_BOTNAME_H | ||
#define TGBOT_BOTNAME_H | ||
|
||
#include <memory> | ||
#include <string> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @brief This object represents the bot's name. | ||
* | ||
* @ingroup types | ||
*/ | ||
class BotName { | ||
public: | ||
typedef std::shared_ptr<BotName> Ptr; | ||
|
||
/** | ||
* @brief The bot's name | ||
*/ | ||
std::string name; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BOTNAME_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#ifndef TGBOT_BOTSHORTDESCRIPTION_H | ||
#define TGBOT_BOTSHORTDESCRIPTION_H | ||
|
||
#include <memory> | ||
#include <string> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @brief This object represents the bot's short description. | ||
* | ||
* @ingroup types | ||
*/ | ||
class BotShortDescription { | ||
public: | ||
typedef std::shared_ptr<BotShortDescription> Ptr; | ||
|
||
/** | ||
* @brief The bot's short description | ||
*/ | ||
std::string shortDescription; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BOTSHORTDESCRIPTION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#ifndef TGBOT_BUSINESSCONNECTION_H | ||
#define TGBOT_BUSINESSCONNECTION_H | ||
|
||
#include "tgbot/types/User.h" | ||
|
||
#include <cstdint> | ||
#include <memory> | ||
#include <string> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @brief Describes the connection of the bot with a business account. | ||
* | ||
* @ingroup types | ||
*/ | ||
class BusinessConnection { | ||
|
||
public: | ||
typedef std::shared_ptr<BusinessConnection> Ptr; | ||
|
||
/** | ||
* @brief Unique identifier of the business connection | ||
*/ | ||
std::string id; | ||
|
||
/** | ||
* @brief Business account user that created the business connection | ||
*/ | ||
User::Ptr user; | ||
|
||
/** | ||
* @brief Identifier of a private chat with the user who created the business connection. | ||
* | ||
* This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. | ||
* But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. | ||
*/ | ||
std::int64_t userChatId; | ||
|
||
/** | ||
* @brief Date the connection was established in Unix time | ||
*/ | ||
std::uint32_t date; | ||
|
||
/** | ||
* @brief True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours | ||
*/ | ||
bool canReply; | ||
|
||
/** | ||
* @brief True, if the connection is active | ||
*/ | ||
bool isEnabled; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BUSINESSCONNECTION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#ifndef TGBOT_BUSINESSINTRO_H | ||
#define TGBOT_BUSINESSINTRO_H | ||
|
||
#include "tgbot/types/Sticker.h" | ||
|
||
#include <memory> | ||
#include <string> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @ingroup types | ||
*/ | ||
class BusinessIntro { | ||
|
||
public: | ||
typedef std::shared_ptr<BusinessIntro> Ptr; | ||
|
||
/** | ||
* @brief Optional. Title text of the business intro | ||
*/ | ||
std::string title; | ||
|
||
/** | ||
* @brief Optional. Message text of the business intro | ||
*/ | ||
std::string message; | ||
|
||
/** | ||
* @brief Optional. Sticker of the business intro | ||
*/ | ||
Sticker::Ptr sticker; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BUSINESSINTRO_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#ifndef TGBOT_BUSINESSLOCATION_H | ||
#define TGBOT_BUSINESSLOCATION_H | ||
|
||
#include "tgbot/types/Location.h" | ||
|
||
#include <memory> | ||
#include <string> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @ingroup types | ||
*/ | ||
class BusinessLocation { | ||
|
||
public: | ||
typedef std::shared_ptr<BusinessLocation> Ptr; | ||
|
||
/** | ||
* @brief Address of the business | ||
*/ | ||
std::string address; | ||
|
||
/** | ||
* @brief Optional. Location of the business | ||
*/ | ||
Location::Ptr location; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BUSINESSLOCATION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#ifndef TGBOT_BUSINESSMESSAGESDELETED_H | ||
#define TGBOT_BUSINESSMESSAGESDELETED_H | ||
|
||
#include "tgbot/types/Chat.h" | ||
|
||
#include <cstdint> | ||
#include <memory> | ||
#include <string> | ||
#include <vector> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @brief This object is received when messages are deleted from a connected business account. | ||
* | ||
* @ingroup types | ||
*/ | ||
class BusinessMessagesDeleted { | ||
|
||
public: | ||
typedef std::shared_ptr<BusinessMessagesDeleted> Ptr; | ||
|
||
/** | ||
* @brief Unique identifier of the business connection | ||
*/ | ||
std::string businessConnectionId; | ||
|
||
/** | ||
* @brief Information about a chat in the business account. | ||
* | ||
* The bot may not have access to the chat or the corresponding user. | ||
*/ | ||
Chat::Ptr chat; | ||
|
||
/** | ||
* @brief A JSON-serialized list of identifiers of deleted messages in the chat of the business account | ||
*/ | ||
std::vector<std::int32_t> messageIds; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BUSINESSMESSAGESDELETED_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef TGBOT_BUSINESSOPENINGHOURS_H | ||
#define TGBOT_BUSINESSOPENINGHOURS_H | ||
|
||
#include "tgbot/types/BusinessOpeningHoursInterval.h" | ||
|
||
#include <memory> | ||
#include <string> | ||
#include <vector> | ||
|
||
namespace TgBot { | ||
|
||
/** | ||
* @ingroup types | ||
*/ | ||
class BusinessOpeningHours { | ||
|
||
public: | ||
typedef std::shared_ptr<BusinessOpeningHours> Ptr; | ||
|
||
/** | ||
* @brief Unique name of the time zone for which the opening hours are defined | ||
*/ | ||
std::string timeZoneName; | ||
|
||
/** | ||
* @brief List of time intervals describing business opening hours | ||
*/ | ||
std::vector<BusinessOpeningHoursInterval::Ptr> openingHours; | ||
}; | ||
} | ||
|
||
#endif //TGBOT_BUSINESSOPENINGHOURS_H |
Oops, something went wrong.