GramIO API Reference / @gramio/contexts/dist / ChatMember
Class: ChatMember
Defined in: contexts/index.d.ts:4249
This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
ChatMemberOwnerChatMemberAdministratorChatMemberMemberChatMemberRestrictedChatMemberLeftChatMemberBanned
Constructors
Constructor
new ChatMember(
payload):ChatMember
Defined in: contexts/index.d.ts:4251
Parameters
| Parameter | Type |
|---|---|
payload | Record<string, any> & TelegramChatMemberOwner | Record<string, any> & TelegramChatMemberAdministrator | Record<string, any> & TelegramChatMemberMember | Record<string, any> & TelegramChatMemberRestricted | Record<string, any> & TelegramChatMemberLeft | Record<string, any> & TelegramChatMemberBanned |
Returns
ChatMember
Properties
| Property | Type | Defined in |
|---|---|---|
payload | Record<string, any> & TelegramChatMemberOwner | Record<string, any> & TelegramChatMemberAdministrator | Record<string, any> & TelegramChatMemberMember | Record<string, any> & TelegramChatMemberRestricted | Record<string, any> & TelegramChatMemberLeft | Record<string, any> & TelegramChatMemberBanned | contexts/index.d.ts:4250 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:4253
Returns
string
customTitle
Get Signature
get customTitle():
string
Defined in: contexts/index.d.ts:4259
Owner and administrators only. Custom title for this user
Returns
string
status
Get Signature
get status():
"creator"|"administrator"|"member"|"restricted"|"left"|"kicked"
Defined in: contexts/index.d.ts:4257
The member's status in the chat
Returns
"creator" | "administrator" | "member" | "restricted" | "left" | "kicked"
tag
Get Signature
get tag():
string
Defined in: contexts/index.d.ts:4349
Tag of the member; for members and restricted members
Returns
string
untilDate
Get Signature
get untilDate():
number
Defined in: contexts/index.d.ts:4267
Restricted and kicked only. Date when restrictions will be lifted for this user; unix time
Returns
number
user
Get Signature
get user():
User
Defined in: contexts/index.d.ts:4255
Information about the user
Returns
Methods
canAddWebPagePreviews()
canAddWebPagePreviews():
boolean
Defined in: contexts/index.d.ts:4387
Restricted only true, if the user is allowed to add web page previews to their messages
Returns
boolean
canBeEdited()
canBeEdited():
boolean
Defined in: contexts/index.d.ts:4273
Administrators only. true, if the bot is allowed to edit administrator privileges of that user
Returns
boolean
canChangeInfo()
canChangeInfo():
boolean
Defined in: contexts/index.d.ts:4322
Administrators and restricted only. 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:4298
Administrators only. true, if the administrator can delete messages of other users
Returns
boolean
canDeleteStories()
canDeleteStories():
any
Defined in: contexts/index.d.ts:4341
true, if the administrator can delete stories posted by other users; channels only
Returns
any
canEditMessages()
canEditMessages():
boolean
Defined in: contexts/index.d.ts:4293
Administrators only. true, if the administrator can edit messages of other users and can pin messages; channels only
Returns
boolean
canEditStories()
canEditStories():
any
Defined in: contexts/index.d.ts:4339
true, if the administrator can edit stories posted by other users; channels only
Returns
any
canEditTag()
canEditTag():
boolean
Defined in: contexts/index.d.ts:4351
true, if the user is allowed to edit their own tag; for restricted members
Returns
boolean
canInviteUsers()
canInviteUsers():
boolean
Defined in: contexts/index.d.ts:4327
Administrators and restricted only. true, if the user is allowed to invite new users to the chat
Returns
boolean
canManageChat()
canManageChat():
boolean
Defined in: contexts/index.d.ts:4281
Administrators only. 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:4345
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:4347
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:4343
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:4303
Administrators only. true, if the administrator can manage video chats
Returns
boolean
canPinMessages()
canPinMessages():
boolean
Defined in: contexts/index.d.ts:4335
Administrators and restricted only. true, if the user is allowed to pin messages; groups and supergroups only
Returns
boolean
canPostMessages()
canPostMessages():
boolean
Defined in: contexts/index.d.ts:4287
Administrators only. true, if the administrator can post in the channel; channels only
Returns
boolean
canPostStories()
canPostStories():
any
Defined in: contexts/index.d.ts:4337
true, if the administrator can post stories in the channel; channels only
Returns
any
canPromoteMembers()
canPromoteMembers():
boolean
Defined in: contexts/index.d.ts:4316
Administrators only. true, if the administrator can add new administrators with a subset o their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
Returns
boolean
canReactToMessages()
canReactToMessages():
boolean
Defined in: contexts/index.d.ts:4389
Restricted only. true, if the user is allowed to react to messages
Returns
boolean
canRestrictMembers()
canRestrictMembers():
boolean
Defined in: contexts/index.d.ts:4308
Administrators only. true, if the administrator can restrict, ban or unban chat members
Returns
boolean
canSendAudios()
canSendAudios():
boolean
Defined in: contexts/index.d.ts:4364
true, if the user is allowed to send audios
Returns
boolean
canSendDocuments()
canSendDocuments():
boolean
Defined in: contexts/index.d.ts:4366
true, if the user is allowed to send documents
Returns
boolean
canSendMessages()
canSendMessages():
boolean
Defined in: contexts/index.d.ts:4362
Restricted only. true, if the user is allowed to send text messages, contacts, locations and venues
Returns
boolean
canSendOtherMessages()
canSendOtherMessages():
boolean
Defined in: contexts/index.d.ts:4382
Restricted only. true, if the user is allowed to send animations, games, stickers and use inline bots
Returns
boolean
canSendPhotos()
canSendPhotos():
boolean
Defined in: contexts/index.d.ts:4368
true, if the user is allowed to send photos
Returns
boolean
canSendPolls()
canSendPolls():
boolean
Defined in: contexts/index.d.ts:4376
Restricted only. true, if the user is allowed to send polls
Returns
boolean
canSendVideoNotes()
canSendVideoNotes():
boolean
Defined in: contexts/index.d.ts:4372
true, if the user is allowed to send video notes
Returns
boolean
canSendVideos()
canSendVideos():
boolean
Defined in: contexts/index.d.ts:4370
true, if the user is allowed to send videos
Returns
boolean
canSendVoiceNotes()
canSendVoiceNotes():
boolean
Defined in: contexts/index.d.ts:4374
true, if the user is allowed to send voice notes
Returns
boolean
canSendWelcomeMessages()
canSendWelcomeMessages():
boolean
Defined in: contexts/index.d.ts:4329
Administrators only. true, if the administrator can send welcome messages in the chat
Returns
boolean
isAnonymous()
isAnonymous():
boolean
Defined in: contexts/index.d.ts:4261
Owner and administrators only. true, if the user's presence in the chat is hidden
Returns
boolean
isMember()
isMember():
boolean
Defined in: contexts/index.d.ts:4356
Restricted only. true, if the user is a member of the chat at the moment of the request
Returns
boolean