Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy_chat_members/mod.ts>chatMembers

Store chats, users, and chat memberships.
Latest
function chatMembers
import { chatMembers } from "https://deno.land/x/grammy_chat_members@v1.1.0/mod.ts";

Creates a middleware that keeps track of chat member updates

NOTE: You need to manually enable chat_members update type for this to work

Example usage:

const bot = new Bot("<YOR_TELEGRAM_TOKEN>");
const adapter = new MemorySessionStorage();

bot.use(chatMembers(adapter));

bot.start({ allowed_updates: ["chat_member"] });

Parameters

Storage adapter responsible for saving members information

optional
options: Partial<ChatMembersOptions> = [UNSUPPORTED]

Configuration options for the middleware

Returns

Composer<ChatMembersContext>

A middleware that keeps track of chat member updates