pub struct CreateChatSubscriptionInviteLink {
pub chat_id: Recipient,
pub subscription_period: Seconds,
pub subscription_price: u32,
pub name: Option<String>,
}
Expand description
Use this method to create a subscription invite link for a channel chat. The bot must have the can_invite_users administrator rights. The link can be edited using the method EditChatSubscriptionInviteLink
or revoked using the method RevokeChatInviteLink
. Returns the new invite link as a ChatInviteLink
object.
Fields§
§chat_id: Recipient
Unique identifier for the target chat or username of the target channel (in the format @channelusername
)
subscription_period: Seconds
The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).
subscription_price: u32
The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-10000
name: Option<String>
Invite link name; 0-32 characters
Implementations§
Trait Implementations§
Source§impl Clone for CreateChatSubscriptionInviteLink
impl Clone for CreateChatSubscriptionInviteLink
Source§fn clone(&self) -> CreateChatSubscriptionInviteLink ⓘ
fn clone(&self) -> CreateChatSubscriptionInviteLink ⓘ
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl PartialEq for CreateChatSubscriptionInviteLink
impl PartialEq for CreateChatSubscriptionInviteLink
Source§fn eq(&self, other: &CreateChatSubscriptionInviteLink) -> bool
fn eq(&self, other: &CreateChatSubscriptionInviteLink) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl Payload for CreateChatSubscriptionInviteLink
impl Payload for CreateChatSubscriptionInviteLink
Source§const NAME: &'static str = "CreateChatSubscriptionInviteLink"
const NAME: &'static str = "CreateChatSubscriptionInviteLink"
Name of a Telegram method. Read more
Source§type Output = ChatInviteLink
type Output = ChatInviteLink
The return type of a Telegram method. Read more
Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
If this payload may take long time to execute (e.g.
GetUpdates
with
big timeout
), the minimum timeout that should be used.impl Eq for CreateChatSubscriptionInviteLink
impl StructuralPartialEq for CreateChatSubscriptionInviteLink
Auto Trait Implementations§
impl Freeze for CreateChatSubscriptionInviteLink
impl RefUnwindSafe for CreateChatSubscriptionInviteLink
impl Send for CreateChatSubscriptionInviteLink
impl Sync for CreateChatSubscriptionInviteLink
impl Unpin for CreateChatSubscriptionInviteLink
impl UnwindSafe for CreateChatSubscriptionInviteLink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<P> CreateChatSubscriptionInviteLinkSetters for Pwhere
P: HasPayload<Payload = CreateChatSubscriptionInviteLink>,
impl<P> CreateChatSubscriptionInviteLinkSetters for Pwhere
P: HasPayload<Payload = CreateChatSubscriptionInviteLink>,
Source§fn subscription_period(self, value: Seconds) -> Self
fn subscription_period(self, value: Seconds) -> Self
Setter for
subscription_period
field.Source§fn subscription_price(self, value: u32) -> Self
fn subscription_price(self, value: u32) -> Self
Setter for
subscription_price
field.Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Gain mutable access to the underlying payload.
Source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
Gain immutable access to the underlying payload.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more