Protected _clientProtected _sourceReturns a boolean indicating whether the administrator is anonymous.
true if the administator is anonymous, false otherwise.
Returns the chat member permissions.
An object containing the member permissions.
Ban the chat member.
Optional params: Partial<IBanChatMemberParams>The ban parameters.
A promise that resolves to true if the ban was successful.
Promote the chat member.
Optional params: Partial<IPromoteChatMemberParams>The promote parameters.
A promise that resolves to true if the promotion was successful.
Restrict the chat member with the given permissions and parameters.
The chat member's new permissions.
The restrict parameters.
A promise that resolves to true if the restrict was successful.
Restrict the chat member with the given parameters.
The restrict parameters, including the new permissions.
A promise that resolves to true if the restrict was successful.
Converts the source object to a context object of a given type.
client.updates.on("message", message => {
const user = message.user.toContext<CustomUserContext>();
// Now user works correctly with your context
})
Generic type parameter for the context object.
The context object.
Generated using TypeDoc