Skip to content

GramIO API Reference / @gramio/contexts/dist / ChatAdministratorRights

Class: ChatAdministratorRights

Defined in: contexts/index.d.ts:3349

Represents the rights of an administrator in a chat.

Constructors

Constructor

new ChatAdministratorRights(payload): ChatAdministratorRights

Defined in: contexts/index.d.ts:3351

Parameters

ParameterType
payloadTelegramChatAdministratorRights

Returns

ChatAdministratorRights

Properties

PropertyTypeDefined in
payloadTelegramChatAdministratorRightscontexts/index.d.ts:3350

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: contexts/index.d.ts:3353

MDN

Returns

string

Methods

canChangeInfo()

canChangeInfo(): boolean

Defined in: contexts/index.d.ts:3367

true, if the user is allowed to change the chat title, photo and other settings

Returns

boolean


canDeleteMessages()

canDeleteMessages(): boolean

Defined in: contexts/index.d.ts:3359

true, if the administrator can delete messages of other users

Returns

boolean


canDeleteStories()

canDeleteStories(): boolean

Defined in: contexts/index.d.ts:3381

true, if the administrator can delete stories posted by other users; channels only

Returns

boolean


canEditMessages()

canEditMessages(): boolean

Defined in: contexts/index.d.ts:3373

true, if the administrator can edit messages of other users and can pin messages; channels only

Returns

boolean


canEditStories()

canEditStories(): boolean

Defined in: contexts/index.d.ts:3379

true, if the administrator can edit stories posted by other users; channels only

Returns

boolean


canInviteUsers()

canInviteUsers(): boolean

Defined in: contexts/index.d.ts:3369

true, if the user is allowed to invite new users to the chat

Returns

boolean


canManageChat()

canManageChat(): boolean

Defined in: contexts/index.d.ts:3357

true, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege

Returns

boolean


canManageDirectMessages()

canManageDirectMessages(): boolean

Defined in: contexts/index.d.ts:3385

true, if the administrator can manage direct messages of the channel and decline suggested posts; channels only

Returns

boolean


canManageTags()

canManageTags(): boolean

Defined in: contexts/index.d.ts:3387

true, if the administrator can edit the tags of regular members; for groups and supergroups only

Returns

boolean


canManageTopics()

canManageTopics(): boolean

Defined in: contexts/index.d.ts:3383

true, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only

Returns

boolean


canManageVideoChats()

canManageVideoChats(): boolean

Defined in: contexts/index.d.ts:3361

true, if the administrator can manage video chats

Returns

boolean


canPinMessages()

canPinMessages(): boolean

Defined in: contexts/index.d.ts:3375

true, if the user is allowed to pin messages; groups and supergroups only

Returns

boolean


canPostMessages()

canPostMessages(): boolean

Defined in: contexts/index.d.ts:3371

true, if the administrator can post in the channel; channels only

Returns

boolean


canPostStories()

canPostStories(): boolean

Defined in: contexts/index.d.ts:3377

true, if the administrator can post stories in the channel; channels only

Returns

boolean


canPromoteMembers()

canPromoteMembers(): boolean

Defined in: contexts/index.d.ts:3365

true, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)

Returns

boolean


canRestrictMembers()

canRestrictMembers(): boolean

Defined in: contexts/index.d.ts:3363

true, if the administrator can restrict, ban or unban chat members

Returns

boolean


isAnonymous()

isAnonymous(): boolean

Defined in: contexts/index.d.ts:3355

true, if the user's presence in the chat is hidden

Returns

boolean