ChatPermissions

public struct ChatPermissions : Codable, Equatable, FunctionResult

Describes actions that a user is allowed to take in a chat

  • True, if the user can send text messages, contacts, locations, and venues

    Declaration

    Swift

    public let canSendMessages: Bool
  • True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions

    Declaration

    Swift

    public let canSendMediaMessages: Bool
  • True, if the user can send polls. Implies can_send_messages permissions

    Declaration

    Swift

    public let canSendPolls: Bool
  • True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_messages permissions

    Declaration

    Swift

    public let canSendOtherMessages: Bool
  • True, if the user may add a web page preview to their messages. Implies can_send_messages permissions

    Declaration

    Swift

    public let canAddWebPagePreviews: Bool
  • True, if the user can change the chat title, photo, and other settings

    Declaration

    Swift

    public let canChangeInfo: Bool
  • True, if the user can invite new users to the chat

    Declaration

    Swift

    public let canInviteUsers: Bool
  • True, if the user can pin messages

    Declaration

    Swift

    public let canPinMessages: Bool
  • Describes actions that a user is allowed to take in a chat

    Declaration

    Swift

    public init(canSendMessages: Bool, canSendMediaMessages: Bool, canSendPolls: Bool, canSendOtherMessages: Bool, canAddWebPagePreviews: Bool, canChangeInfo: Bool, canInviteUsers: Bool, canPinMessages: Bool)

    Parameters

    canSendMessages

    True, if the user can send text messages, contacts, locations, and venues

    canSendMediaMessages

    True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions

    canSendPolls

    True, if the user can send polls. Implies can_send_messages permissions

    canSendOtherMessages

    True, if the user can send animations, games, and stickers and use inline bots. Implies can_send_messages permissions

    canAddWebPagePreviews

    True, if the user may add a web page preview to their messages. Implies can_send_messages permissions

    canChangeInfo

    True, if the user can change the chat title, photo, and other settings

    canInviteUsers

    True, if the user can invite new users to the chat

    canPinMessages

    True, if the user can pin messages