Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot.getChatMember not working #1212

Open
SH20RAJ opened this issue Jul 9, 2024 · 0 comments
Open

bot.getChatMember not working #1212

SH20RAJ opened this issue Jul 9, 2024 · 0 comments

Comments

@SH20RAJ
Copy link

SH20RAJ commented Jul 9, 2024

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:

  • searched for such a feature request ( enhancement ) and found none

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant