mirror of
https://github.com/tdlib/telegram-bot-api
synced 2025-08-22 01:49:24 +00:00
Add transferBusinessAccountStars.
This commit is contained in:
parent
b1880bc675
commit
5fe7a665c2
@ -288,6 +288,7 @@ bool Client::init_methods() {
|
||||
methods_.emplace("removebusinessaccountprofilephoto", &Client::process_remove_business_account_profile_photo_query);
|
||||
methods_.emplace("setbusinessaccountgiftsettings", &Client::process_set_business_account_gift_settings_query);
|
||||
methods_.emplace("getbusinessaccountstarbalance", &Client::process_get_business_account_star_balance_query);
|
||||
methods_.emplace("transferbusinessaccountstars", &Client::process_transfer_business_account_stars_query);
|
||||
methods_.emplace("getbusinessaccountgifts", &Client::process_get_business_account_gifts_query);
|
||||
methods_.emplace("convertgifttostars", &Client::process_convert_gift_to_stars_query);
|
||||
methods_.emplace("upgradegift", &Client::process_upgrade_gift_query);
|
||||
@ -12729,6 +12730,18 @@ td::Status Client::process_get_business_account_star_balance_query(PromisedQuery
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_transfer_business_account_stars_query(PromisedQueryPtr &query) {
|
||||
auto business_connection_id = query->arg("business_connection_id").str();
|
||||
auto star_count = get_integer_arg(query.get(), "star_count", 0, 0, 1000000000);
|
||||
check_business_connection(
|
||||
business_connection_id, std::move(query),
|
||||
[this, star_count](const BusinessConnection *business_connection, PromisedQueryPtr query) {
|
||||
send_request(make_object<td_api::transferBusinessAccountStars>(business_connection->id_, star_count),
|
||||
td::make_unique<TdOnOkQueryCallback>(std::move(query)));
|
||||
});
|
||||
return td::Status::OK();
|
||||
}
|
||||
|
||||
td::Status Client::process_get_business_account_gifts_query(PromisedQueryPtr &query) {
|
||||
auto business_connection_id = query->arg("business_connection_id").str();
|
||||
check_business_connection(business_connection_id, std::move(query),
|
||||
|
@ -764,6 +764,7 @@ class Client final : public WebhookActor::Callback {
|
||||
td::Status process_remove_business_account_profile_photo_query(PromisedQueryPtr &query);
|
||||
td::Status process_set_business_account_gift_settings_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_business_account_star_balance_query(PromisedQueryPtr &query);
|
||||
td::Status process_transfer_business_account_stars_query(PromisedQueryPtr &query);
|
||||
td::Status process_get_business_account_gifts_query(PromisedQueryPtr &query);
|
||||
td::Status process_convert_gift_to_stars_query(PromisedQueryPtr &query);
|
||||
td::Status process_upgrade_gift_query(PromisedQueryPtr &query);
|
||||
|
Loading…
x
Reference in New Issue
Block a user