ronami_core/payloads/create_chat_invite_link.rs
1//! Generated by `codegen_payloads`, do not edit by hand.
2
3use chrono::{DateTime, Utc};
4use serde::Serialize;
5
6use crate::types::ChatInviteLink;
7use crate::types::Recipient;
8
9impl_payload! {
10 /// 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 admin rights. The link can be revoked using the method [`RevokeChatInviteLink`]. Returns the new invite link as [`ChatInviteLink`] object.
11 ///
12 /// [`ChatInviteLink`]: crate::types::ChatInviteLink
13 /// [`RevokeChatInviteLink`]: crate::payloads::RevokeChatInviteLink
14 #[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
15 pub CreateChatInviteLink (CreateChatInviteLinkSetters) => ChatInviteLink {
16 required {
17 /// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
18 pub chat_id: Recipient [into],
19 }
20 optional {
21 /// Invite link name; 0-32 characters
22 pub name: String [into],
23 /// Point in time (Unix timestamp) when the link will expire
24 #[serde(with = "crate::types::serde_opt_date_from_unix_timestamp")]
25 pub expire_date: DateTime<Utc> [into],
26 /// Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
27 pub member_limit: u32,
28 /// True, if users joining the chat via the link need to be approved by chat administrators. If True, member_limit can't be specified
29 pub creates_join_request: bool,
30 }
31 }
32}