Skip to content

Commit

Permalink
Merge pull request #1443 from TelegramBots/develop
Browse files Browse the repository at this point in the history
Bot API corrected TransactionPartnerUser.Gift type
  • Loading branch information
wiz0u authored Nov 22, 2024
2 parents e2054c3 + e0e2cf9 commit 589509a
Show file tree
Hide file tree
Showing 302 changed files with 312 additions and 312 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/variables.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
variables:
- group: Integration Tests Variables
- name: versionPrefix
value: 22.1.2
value: 22.1.3
- name: versionSuffix
value: ''
- name: ciVersionSuffix
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# .NET Client for Telegram Bot API
# .NET Client for Telegram Bot API

[![Nuget](https://img.shields.io/nuget/vpre/Telegram.Bot.svg?label=Telegram.Bot&style=flat-square&color=d8b541)](https://www.nuget.org/packages/Telegram.Bot)
[![Bot API Version](https://img.shields.io/badge/Bot_API-8.0-f36caf.svg?style=flat-square)](https://core.telegram.org/bots/api)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to send answers to callback queries sent from <a href="https://core.telegram.org/bots/features#inline-keyboards">inline keyboards</a>. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert<para>Returns: </para></summary>
/// <remarks>Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via <a href="https://t.me/botfather">@BotFather</a> and accept the terms. Otherwise, you may use links like <c>t.me/your_bot?start=XXXX</c> that open your bot with a parameter.</remarks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, <a href="https://core.telegram.org/bots/api#determining-list-of-commands">higher level commands</a> will be shown to affected users.<para>Returns: </para></summary>
public partial class DeleteMyCommandsRequest() : RequestBase<bool>("deleteMyCommands")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get the current list of the bot's commands for the given scope and user language.<para>Returns: An Array of <see cref="BotCommand"/> objects. If commands aren't set, an empty list is returned.</para></summary>
public partial class GetMyCommandsRequest() : RequestBase<BotCommand[]>("getMyCommands")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to change the list of the bot's commands. See <a href="https://core.telegram.org/bots/features#commands">this manual</a> for more details about bot commands.<para>Returns: </para></summary>
public partial class SetMyCommandsRequest() : RequestBase<bool>("setMyCommands")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to create a <a href="https://telegram.org/blog/superchannels-star-reactions-subscriptions#star-subscriptions">subscription invite link</a> for a channel chat. The bot must have the <em>CanInviteUsers</em> administrator rights. The link can be edited using the method <see cref="TelegramBotClientExtensions.EditChatSubscriptionInviteLink">EditChatSubscriptionInviteLink</see> or revoked using the method <see cref="TelegramBotClientExtensions.RevokeChatInviteLink">RevokeChatInviteLink</see>.<para>Returns: The new invite link as a <see cref="ChatInviteLink"/> object.</para></summary>
public partial class CreateChatSubscriptionInviteLinkRequest() : RequestBase<ChatInviteLink>("createChatSubscriptionInviteLink"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get the current bot description for the given user language.<para>Returns: <see cref="BotDescription"/> on success.</para></summary>
public partial class GetMyDescriptionRequest() : RequestBase<BotDescription>("getMyDescription")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty.<para>Returns: </para></summary>
public partial class SetMyDescriptionRequest() : RequestBase<bool>("setMyDescription")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to edit a subscription invite link created by the bot. The bot must have the <em>CanInviteUsers</em> administrator rights.<para>Returns: The edited invite link as a <see cref="ChatInviteLink"/> object.</para></summary>
public partial class EditChatSubscriptionInviteLinkRequest() : RequestBase<ChatInviteLink>("editChatSubscriptionInviteLink"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size.<para>Returns: A <see cref="File"/> object is returned. The file can then be downloaded via <see cref="TelegramBotClient.DownloadFile">DownloadFile</see>, where <c>&lt;FilePath&gt;</c> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling <see cref="TelegramBotClientExtensions.GetFile">GetFile</see> again.<br/><b>Note:</b> This function may not preserve the original file name and MIME type. You should save the file's MIME type and name (if available) when the File object is received.</para></summary>
public partial class GetFileRequest() : RequestBase<File>("getFile")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get a list of profile pictures for a user.<para>Returns: A <see cref="UserProfilePhotos"/> object.</para></summary>
public partial class GetUserProfilePhotosRequest() : RequestBase<UserProfilePhotos>("getUserProfilePhotos"), IUserTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get information about the connection of the bot with a business account.<para>Returns: A <see cref="BusinessConnection"/> object on success.</para></summary>
public partial class GetBusinessConnectionRequest() : RequestBase<BusinessConnection>("getBusinessConnection"), IBusinessConnectable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get the current value of the bot's menu button in a private chat, or the default menu button.<para>Returns: <see cref="MenuButton"/> on success.</para></summary>
public partial class GetChatMenuButtonRequest() : RequestBase<MenuButton>("getChatMenuButton")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>A simple method for testing your bot's authentication token.<para>Returns: Basic information about the bot in form of a <see cref="User"/> object.</para></summary>
public partial class GetMeRequest() : ParameterlessRequest<User>("getMe")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get the current default administrator rights of the bot.<para>Returns: <see cref="ChatAdministratorRights"/> on success.</para></summary>
public partial class GetMyDefaultAdministratorRightsRequest() : RequestBase<ChatAdministratorRights>("getMyDefaultAdministratorRights")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get the current bot name for the given user language.<para>Returns: <see cref="BotName"/> on success.</para></summary>
public partial class GetMyNameRequest() : RequestBase<BotName>("getMyName")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat.<para>Returns: A <see cref="UserChatBoosts"/> object.</para></summary>
public partial class GetUserChatBoostsRequest() : RequestBase<UserChatBoosts>("getUserChatBoosts"), IChatTargetable, IUserTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched.<para>Returns: </para></summary>
public partial class CloseRequest() : ParameterlessRequest<bool>("close")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to log out from the cloud Bot API server before launching the bot locally. You <b>must</b> log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes.<para>Returns: </para></summary>
public partial class LogOutRequest() : ParameterlessRequest<bool>("logOut")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless <see cref="TelegramBotClientExtensions.UnbanChatMember">unbanned</see> first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.<para>Returns: </para></summary>
public partial class BanChatMemberRequest() : RequestBase<bool>("banChatMember"), IChatTargetable, IUserTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to ban a channel chat in a supergroup or a channel. Until the chat is <see cref="TelegramBotClientExtensions.UnbanChatSenderChat">unbanned</see>, the owner of the banned chat won't be able to send messages on behalf of <b>any of their channels</b>. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights.<para>Returns: </para></summary>
public partial class BanChatSenderChatRequest() : RequestBase<bool>("banChatSenderChat"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the <em>CanInviteUsers</em> administrator right.<para>Returns: </para></summary>
public partial class ApproveChatJoinRequest() : RequestBase<bool>("approveChatJoinRequest"), IChatTargetable, IUserTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method <see cref="TelegramBotClientExtensions.RevokeChatInviteLink">RevokeChatInviteLink</see>.<para>Returns: The new invite link as <see cref="ChatInviteLink"/> object.</para></summary>
public partial class CreateChatInviteLinkRequest() : RequestBase<ChatInviteLink>("createChatInviteLink"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the <em>CanInviteUsers</em> administrator right.<para>Returns: </para></summary>
public partial class DeclineChatJoinRequest() : RequestBase<bool>("declineChatJoinRequest"), IChatTargetable, IUserTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.<para>Returns: The edited invite link as a <see cref="ChatInviteLink"/> object.</para></summary>
public partial class EditChatInviteLinkRequest() : RequestBase<ChatInviteLink>("editChatInviteLink"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.<para>Returns: The new invite link as <em>String</em> on success.</para></summary>
/// <remarks>Note: Each administrator in a chat generates their own invite links. Bots can't use invite links generated by other administrators. If you want your bot to work with invite links, it will need to generate its own link using <see cref="TelegramBotClientExtensions.ExportChatInviteLink">ExportChatInviteLink</see> or by calling the <see cref="TelegramBotClientExtensions.GetChat">GetChat</see> method. If your bot needs to generate a new primary invite link replacing its previous one, use <see cref="TelegramBotClientExtensions.ExportChatInviteLink">ExportChatInviteLink</see> again.</remarks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.<para>Returns: The revoked invite link as <see cref="ChatInviteLink"/> object.</para></summary>
public partial class RevokeChatInviteLinkRequest() : RequestBase<ChatInviteLink>("revokeChatInviteLink"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>CanManageTopics</em> administrator rights, unless it is the creator of the topic.<para>Returns: </para></summary>
public partial class CloseForumTopicRequest() : RequestBase<bool>("closeForumTopic"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>CanManageTopics</em> administrator rights.<para>Returns: </para></summary>
public partial class CloseGeneralForumTopicRequest() : RequestBase<bool>("closeGeneralForumTopic"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>CanManageTopics</em> administrator rights.<para>Returns: Information about the created topic as a <see cref="ForumTopic"/> object.</para></summary>
public partial class CreateForumTopicRequest() : RequestBase<ForumTopic>("createForumTopic"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights.<para>Returns: </para></summary>
public partial class DeleteChatPhotoRequest() : RequestBase<bool>("deleteChatPhoto"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field <em>CanSetStickerSet</em> optionally returned in <see cref="TelegramBotClientExtensions.GetChat">GetChat</see> requests to check if the bot can use this method.<para>Returns: </para></summary>
public partial class DeleteChatStickerSetRequest() : RequestBase<bool>("deleteChatStickerSet"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>CanDeleteMessages</em> administrator rights.<para>Returns: </para></summary>
public partial class DeleteForumTopicRequest() : RequestBase<bool>("deleteForumTopic"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>CanManageTopics</em> administrator rights, unless it is the creator of the topic.<para>Returns: </para></summary>
public partial class EditForumTopicRequest() : RequestBase<bool>("editForumTopic"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>CanManageTopics</em> administrator rights.<para>Returns: </para></summary>
public partial class EditGeneralForumTopicRequest() : RequestBase<bool>("editGeneralForumTopic"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get a list of administrators in a chat, which aren't bots.<para>Returns: An Array of <see cref="ChatMember"/> objects.</para></summary>
public partial class GetChatAdministratorsRequest() : RequestBase<ChatMember[]>("getChatAdministrators"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get the number of members in a chat.<para>Returns: <em>Int</em> on success.</para></summary>
public partial class GetChatMemberCountRequest() : RequestBase<int>("getChatMemberCount"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat.<para>Returns: A <see cref="ChatMember"/> object on success.</para></summary>
public partial class GetChatMemberRequest() : RequestBase<ChatMember>("getChatMember"), IChatTargetable, IUserTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to get up-to-date information about the chat.<para>Returns: A <see cref="ChatFullInfo"/> object on success.</para></summary>
public partial class GetChatRequest() : RequestBase<ChatFullInfo>("getChat"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the <em>CanManageTopics</em> administrator rights. The topic will be automatically closed if it was open.<para>Returns: </para></summary>
public partial class HideGeneralForumTopicRequest() : RequestBase<bool>("hideGeneralForumTopic"), IChatTargetable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Telegram.Bot.Requests;
namespace Telegram.Bot.Requests;

/// <summary>Use this method for your bot to leave a group, supergroup or channel.<para>Returns: </para></summary>
public partial class LeaveChatRequest() : RequestBase<bool>("leaveChat"), IChatTargetable
Expand Down
Loading

0 comments on commit 589509a

Please sign in to comment.