ChatPermissions constructor

const ChatPermissions({
  1. @JsonKey(name: 'can_send_messages') bool? canSendMessages,
  2. @JsonKey(name: 'can_send_polls') bool? canSendPolls,
  3. @JsonKey(name: 'can_send_other_messages') bool? canSendOtherMessages,
  4. @JsonKey(name: 'can_add_web_page_previews') bool? canAddWebPagePreviews,
  5. @JsonKey(name: 'can_change_info') bool? canChangeInfo,
  6. @JsonKey(name: 'can_invite_users') bool? canInviteUsers,
  7. @JsonKey(name: 'can_pin_messages') bool? canPinMessages,
  8. @JsonKey(name: 'can_manage_topics') bool? canManageTopics,
  9. @JsonKey(name: 'can_send_audios') bool? canSendAudios,
  10. @JsonKey(name: 'can_send_documents') bool? canSendDocuments,
  11. @JsonKey(name: 'can_send_photos') bool? canSendPhotos,
  12. @JsonKey(name: 'can_send_videos') bool? canSendVideos,
  13. @JsonKey(name: 'can_send_video_notes') bool? canSendVideoNotes,
  14. @JsonKey(name: 'can_send_voice_notes') bool? canSendVoiceNotes,
})

Creates a new ChatPermissions object.

Implementation

const factory ChatPermissions({
  /// Optional. True, if the user is allowed to send text messages, contacts,
  /// locations and venues
  @JsonKey(name: 'can_send_messages') bool? canSendMessages,

  /// Optional. True, if the user is allowed to send polls, implies
  /// can_send_messages
  @JsonKey(name: 'can_send_polls') bool? canSendPolls,

  /// Optional. True, if the user is allowed to send animations, games,
  /// stickers and use inline bots, implies can_send_media_messages
  @JsonKey(name: 'can_send_other_messages') bool? canSendOtherMessages,

  /// Optional. True, if the user is allowed to add web page previews to their
  /// messages, implies can_send_media_messages
  @JsonKey(name: 'can_add_web_page_previews') bool? canAddWebPagePreviews,

  /// Optional. True, if the user is allowed to change the chat title, photo
  /// and other settings. Ignored in public supergroups
  @JsonKey(name: 'can_change_info') bool? canChangeInfo,

  /// Optional. True, if the user is allowed to invite new users to the chat
  @JsonKey(name: 'can_invite_users') bool? canInviteUsers,

  /// Optional. True, if the user is allowed to pin messages. Ignored in
  /// public supergroups
  @JsonKey(name: 'can_pin_messages') bool? canPinMessages,

  /// Optional. True, if the user is allowed to create forum topics. If
  /// omitted defaults to the value of can_pin_messages
  @JsonKey(name: 'can_manage_topics') bool? canManageTopics,

  /// True, if the user is allowed to send audios Since Bot API 6.5
  @JsonKey(name: 'can_send_audios') bool? canSendAudios,

  /// True, if the user is allowed to send documents
  @JsonKey(name: 'can_send_documents') bool? canSendDocuments,

  /// True, if the user is allowed to send photos
  @JsonKey(name: 'can_send_photos') bool? canSendPhotos,

  /// True, if the user is allowed to send videos
  @JsonKey(name: 'can_send_videos') bool? canSendVideos,

  /// True, if the user is allowed to send video notes
  @JsonKey(name: 'can_send_video_notes') bool? canSendVideoNotes,

  /// True, if the user is allowed to send voice notes
  @JsonKey(name: 'can_send_voice_notes') bool? canSendVoiceNotes,
}) = _ChatPermissions;