Skip to content

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

Class: ChatAdministratorRights ​

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

Represents the rights of an administrator in a chat.

Constructors ​

Constructor ​

new ChatAdministratorRights(payload): ChatAdministratorRights

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

Parameters ​

ParameterType
payloadTelegramChatAdministratorRights

Returns ​

ChatAdministratorRights

Properties ​

PropertyTypeDefined in
payloadTelegramChatAdministratorRightscontexts/index.d.ts:3684

Accessors ​

[toStringTag] ​

Get Signature ​

get [toStringTag](): string

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

MDN

Returns ​

string

Methods ​

canChangeInfo() ​

canChangeInfo(): boolean

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

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:3693

true, if the administrator can delete messages of other users

Returns ​

boolean


canDeleteStories() ​

canDeleteStories(): boolean

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

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

Returns ​

boolean


canEditMessages() ​

canEditMessages(): boolean

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

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:3715

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

Returns ​

boolean


canInviteUsers() ​

canInviteUsers(): boolean

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

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

Returns ​

boolean


canManageChat() ​

canManageChat(): boolean

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

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:3721

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:3723

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:3719

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:3695

true, if the administrator can manage video chats

Returns ​

boolean


canPinMessages() ​

canPinMessages(): boolean

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

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

Returns ​

boolean


canPostMessages() ​

canPostMessages(): boolean

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

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

Returns ​

boolean


canPostStories() ​

canPostStories(): boolean

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

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

Returns ​

boolean


canPromoteMembers() ​

canPromoteMembers(): boolean

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

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:3697

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

Returns ​

boolean


canSendWelcomeMessages() ​

canSendWelcomeMessages(): boolean

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

true, if the administrator can send welcome messages in the chat

Returns ​

boolean


isAnonymous() ​

isAnonymous(): boolean

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

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

Returns ​

boolean