Blocked Users on BOT

To check the blocked users on the BOT, you should use the 'fetchBlocklist()' method of the provider. This method has the following signature:

(property) fetchBlocklist: () => Promise<string[]>


import { createBot, createProvider, createFlow, addKeyword, EVENTS } from '@builderbot/bot'
import { MemoryDB as Database } from '@builderbot/bot'
import { BaileysProvider as Provider } from '@builderbot/provider-baileys'
import { config } from 'dotenv'

const PHONE_NUMBER = process.env.PHONE_NUMBER

const welcomeFlow = addKeyword<Provider, Database>(EVENTS.WELCOME)
    .addAnswer(`💡 Example *List Blocked Users on BOT:*`)
        async (_, { provider, flowDynamic }) => {
            const blocked = await provider.vendor.fetchBlocklist()
            const result =, index) => `id ${index + 1}: ${id}`).join('\n');
            await flowDynamic(`*Blocked:*\n${result}`)

const main = async () => {
    const adapterFlow = createFlow([welcomeFlow])

    const adapterProvider = createProvider(Provider, { usePairingCode: true, phoneNumber: PHONE_NUMBER })
    const adapterDB = new Database()

    const botResult = await createBot(
            flow: adapterFlow,
            provider: adapterProvider,
            database: adapterDB,


API Call Example


My first chatbot

Learn how build your first chatbot in few minutes

Read more


Understand the essential concepts for building bots

Read more

Add Functions

The key to learning how to write flows is add-functions.

Read more


Unlimitate and start implementing the community plugins.

Read more



Learn how to modularise flows so that you can have a more maintainable bot.

Send Message

How to send a message via HTTP to start conversations, you can send multimedia as well.


A good practice is to dockerise your bots to make them more maintainable and effective.


Learning about events will make us more fluent when creating chatbots.