chatMembers
ref / chat-members / chatMembers
Creates a middleware that keeps track of chat member updates
NOTE: You need to manually enable chat
update type for this to work
Example usage:
typescript
const bot = new Bot("<YOR_TELEGRAM_TOKEN>");
const adapter = new MemorySessionStorage();
bot.use(chatMembers(adapter));
bot.start({ allowed_updates: ["chat_member"] });
1
2
3
4
5
6
2
3
4
5
6
Parameters
adapter
ts
adapter: StorageAdapter<ChatMember>
Storage adapter responsible for saving members information
options
ts
options: Partial<ChatMembersOptions>
Configuration options for the middleware
Return Type
A middleware that keeps track of chat member updates