yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.17k stars 1.5k forks source link

bot.getChatMember not working #1212

Open SH20RAJ opened 2 weeks ago

SH20RAJ commented 2 weeks ago

Bug Report

I have read:

I am using the latest version of the library.

Expected Behavior

Actual Behavior

Steps to reproduce the Behavior

Feature Request

I have:

Introduction

Example


    const isMember = await bot.getChatMember(-1002023867798, chatId);
    if (!isMember || !isMember.ok || isMember.result.status !== "member") {
      console.error("Bot cannot access or verify membership in @sopbots channel.");
      bot.sendMessage(chatId, "You must join @sopbots channel to use this bot.");
      return NextResponse.json({}, { status: 200 });
    }

Question

Saying Chat Not Exists although I copied the chatId from web telegram