GramIO API Reference / @gramio/contexts/dist / ChatMember
Class: ChatMember
Defined in: contexts/index.d.ts:3899
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:3901
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:3900 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:3903
Returns
string
customTitle
Get Signature
get customTitle():
string
Defined in: contexts/index.d.ts:3909
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:3907
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:3997
Tag of the member; for members and restricted members
Returns
string
untilDate
Get Signature
get untilDate():
number
Defined in: contexts/index.d.ts:3917
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:3905
Information about the user
Returns
Methods
canAddWebPagePreviews()
canAddWebPagePreviews():
boolean
Defined in: contexts/index.d.ts:4035
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:3923
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:3972
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:3948
Administrators only. true, if the administrator can delete messages of other users
Returns
boolean
canDeleteStories()
canDeleteStories():
any
Defined in: contexts/index.d.ts:3989
true, if the administrator can delete stories posted by other users; channels only
Returns
any
canEditMessages()
canEditMessages():
boolean
Defined in: contexts/index.d.ts:3943
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:3987
true, if the administrator can edit stories posted by other users; channels only
Returns
any
canEditTag()
canEditTag():
boolean
Defined in: contexts/index.d.ts:3999
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:3977
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:3931
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:3993
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:3995
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:3991
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:3953
Administrators only. true, if the administrator can manage video chats
Returns
boolean
canPinMessages()
canPinMessages():
boolean
Defined in: contexts/index.d.ts:3983
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:3937
Administrators only. true, if the administrator can post in the channel; channels only
Returns
boolean
canPostStories()
canPostStories():
any
Defined in: contexts/index.d.ts:3985
true, if the administrator can post stories in the channel; channels only
Returns
any
canPromoteMembers()
canPromoteMembers():
boolean
Defined in: contexts/index.d.ts:3966
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
canRestrictMembers()
canRestrictMembers():
boolean
Defined in: contexts/index.d.ts:3958
Administrators only. true, if the administrator can restrict, ban or unban chat members
Returns
boolean
canSendAudios()
canSendAudios():
boolean
Defined in: contexts/index.d.ts:4012
true, if the user is allowed to send audios
Returns
boolean
canSendDocuments()
canSendDocuments():
boolean
Defined in: contexts/index.d.ts:4014
true, if the user is allowed to send documents
Returns
boolean
canSendMessages()
canSendMessages():
boolean
Defined in: contexts/index.d.ts:4010
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:4030
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:4016
true, if the user is allowed to send photos
Returns
boolean
canSendPolls()
canSendPolls():
boolean
Defined in: contexts/index.d.ts:4024
Restricted only. true, if the user is allowed to send polls
Returns
boolean
canSendVideoNotes()
canSendVideoNotes():
boolean
Defined in: contexts/index.d.ts:4020
true, if the user is allowed to send video notes
Returns
boolean
canSendVideos()
canSendVideos():
boolean
Defined in: contexts/index.d.ts:4018
true, if the user is allowed to send videos
Returns
boolean
canSendVoiceNotes()
canSendVoiceNotes():
boolean
Defined in: contexts/index.d.ts:4022
true, if the user is allowed to send voice notes
Returns
boolean
isAnonymous()
isAnonymous():
boolean
Defined in: contexts/index.d.ts:3911
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:4004
Restricted only. true, if the user is a member of the chat at the moment of the request
Returns
boolean