addChatMember
Add a single user to a chat.
Parameters
The identifier of the chat to add the user to.
The identifier of the user to add to the chat.
historyLimit?: number
The number of current messages to make visible to the user that is about to be added.
Result
An array of FailedInvitation that has at most a length of 1. If empty, it means that the user was added.
Syntax
// Required parameters only.
await client.addChatMember(chatId, userId);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.addChatMember(chatId, userId, { historyLimit });