createChatInviteLink method

Future<ChatInviteLink> createChatInviteLink(
  1. ChatID chatId, {
  2. String? name,
  3. int? expireDate,
  4. int? memberLimit,
  5. bool? createsJoinRequest,
})
inherited

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.

Implementation

Future<ChatInviteLink> createChatInviteLink(
  ChatID chatId, {
  String? name,
  int? expireDate,
  int? memberLimit,
  bool? createsJoinRequest,
}) {
  return _client.apiCall(_token, 'createChatInviteLink', {
    'chat_id': chatId,
    'name': name,
    'expire_date': expireDate,
    'member_limit': memberLimit,
    'creates_join_request': createsJoinRequest,
  });
}