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: RecipientUnique identifier for the target chat or username of the target channel (in the format @channelusername)
subscription_period: SecondsThe number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).
subscription_price: u32The 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§
impl Eq for CreateChatSubscriptionInviteLink
Source§impl Payload for CreateChatSubscriptionInviteLink
impl Payload for CreateChatSubscriptionInviteLink
Source§const NAME: &'static str = "CreateChatSubscriptionInviteLink"
const NAME: &'static str = "CreateChatSubscriptionInviteLink"
Name of the Rust payload (for example,
EditMessageTextInline).Source§type Output = ChatInviteLink
type Output = ChatInviteLink
The return type of a Telegram method. Read more
Source§const TELEGRAM_METHOD: &'static str = Self::NAME
const TELEGRAM_METHOD: &'static str = Self::NAME
Case-insensitive Telegram method called on the wire (for example,
EditMessageText). Defaults to the payload name.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 StructuralPartialEq for CreateChatSubscriptionInviteLink
Auto Trait Implementations§
impl Forget for CreateChatSubscriptionInviteLink
impl Freeze for CreateChatSubscriptionInviteLink
impl Move for CreateChatSubscriptionInviteLink
impl RefUnwindSafe for CreateChatSubscriptionInviteLink
impl Send for CreateChatSubscriptionInviteLinkwhere
RawVecInner: Send,
impl Sync for CreateChatSubscriptionInviteLinkwhere
RawVecInner: Sync,
impl Unpin for CreateChatSubscriptionInviteLink
impl UnsafeUnpin for CreateChatSubscriptionInviteLink
impl UnwindSafe for CreateChatSubscriptionInviteLinkwhere
RawVecInner: UnwindSafe,
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
fn payload_mut(&mut self) -> &mut P
Gain mutable access to the underlying payload.
Source§fn payload_ref(&self) -> &P
fn payload_ref(&self) -> &P
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