Private
#memberProtected
_clientProtected
_sourceReturns the user's first name.
Returns the user's full name.
Returns the user's ID.
Returns whether the user is a bot.
Returns whether the user is a premium user.
Returns the user's language code and country.
Returns the user's last name.
Returns the user's username.
Deletes the bot's commands.
Optional
params: IDeleteMyCommandsParamsOptional parameters to customize the behavior of the method.
A Promise that resolves to true if the operation succeeded.
Retrieves the bot's menu button for a chat.
Optional
params: IGetChatMenuButtonParamsOptional parameters to customize the behavior of the method.
A Promise that resolves to the bot's menu button for the specified chat.
Retrieves the current list of the bot's commands.
Optional
params: IGetMyCommandsParamsOptional parameters to customize the behavior of the method.
A Promise that resolves to the current list of the bot's commands.
Retrieves the bot's default administrator rights.
Optional
params: IGetMyDefaultAdministratorRightsParamsOptional parameters to customize the behavior of the method.
A Promise that resolves to the bot's default administrator rights.
Gets the user's chat member object.
The chat member object or null if the user is not a member of a chat.
Gets the user's profile photos.
Optional
params: Partial<IGetUserProfilePhotosParams>Additional parameters for the API call.
The API response.
Sets the bot's menu button for a chat.
Optional
params: ISetChatMenuButtonParamsOptional parameters to customize the behavior of the method.
A Promise that resolves to true if the operation succeeded.
Sets the bot's commands.
An array of IBotCommand objects representing the new list of the bot's commands.
Optional
params: Partial<ISetMyCommandsParams>Optional parameters to customize the behavior of the method.
A Promise that resolves to true if the operation succeeded.
Sets the bot's commands.
Optional parameters to customize the behavior of the method.
A Promise that resolves to true if the operation succeeded.
Sets the bot's default administrator rights.
Optional
params: ISetMyDefaultAdministratorRightsParamsOptional parameters to customize the behavior of the method.
A Promise that resolves to true if the operation succeeded.
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
Returns the user's appeal, which is either their username or full name.