Skip to content

Commit

Permalink
Update code to reflect latest changes to the Bot API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TiiFuchs committed Aug 27, 2024
1 parent 7e25039 commit 09f321b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Telegram/ChatInviteLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ class ChatInviteLink extends Type
/** <em>Optional</em>. Number of pending join requests created using this link */
public ?int $pending_join_request_count = null;

/** <em>Optional</em>. The number of seconds the subscription will be active for before the next payment */
public ?int $subscription_period = null;

/** <em>Optional</em>. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link */
public ?int $subscription_price = null;

/**
* @param string $invite_link The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.
* @param User $creator Creator of the link
Expand All @@ -50,6 +56,8 @@ class ChatInviteLink extends Type
* @param int $expire_date <em>Optional</em>. Point in time (Unix timestamp) when the link will expire or has been expired
* @param int $member_limit <em>Optional</em>. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
* @param int $pending_join_request_count <em>Optional</em>. Number of pending join requests created using this link
* @param int $subscription_period <em>Optional</em>. The number of seconds the subscription will be active for before the next payment
* @param int $subscription_price <em>Optional</em>. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link
*/
public static function make(
string $invite_link,
Expand All @@ -61,6 +69,8 @@ public static function make(
?int $expire_date = null,
?int $member_limit = null,
?int $pending_join_request_count = null,
?int $subscription_period = null,
?int $subscription_price = null,
): static {
return new static([
'invite_link' => $invite_link,
Expand All @@ -72,6 +82,8 @@ public static function make(
'expire_date' => $expire_date,
'member_limit' => $member_limit,
'pending_join_request_count' => $pending_join_request_count,
'subscription_period' => $subscription_period,
'subscription_price' => $subscription_price,
]);
}
}

0 comments on commit 09f321b

Please sign in to comment.