'"A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: chat not found" how to get userChat id from inline Button?

I wanna make a bot which send four channels and user must subscribe to them. When user press button "Check" bot must check that user is in all channels which was given. Bot is administrator in channels. But bot cannot find user id. There is my code:

import telebot
from telebot import types


bot = telebot.TeleBot('5331065593:AAGvquZCn8n7PBrhKQDTu9obC8iaXuY2cyw')

channels = ["https://t.me/gopro32", "https://t.me/ggooogggoooggg", "https://t.me/helpmepleaseaaaaa", "https://t.me/+EOKxgInxnAwzZDgy"]


@bot.message_handler(commands = ["start"])
def start_message(p, res = False):
    markup = types.ReplyKeyboardMarkup(resize_keyboard = True)
    item1 = types.KeyboardButton("Complete task")
    markup.add(item1)
    t = b'\xF0\x9F\x91\x8B'.decode('utf-8')
    bot.send_message(p.from_user.id, '@' + str(p.from_user.username))
    bot.send_message(p.chat.id, t + 'I am ready to help you, just press "Complete task", to get money', reply_markup = markup)

@bot.message_handler(content_types = ["text"])
def ready(message):
    if message.text.strip() == "Complete task":
        markup = types.InlineKeyboardMarkup()
        btn_linkedsite = types.InlineKeyboardButton(text = 'First channel', url = channels[0])
        markup.add(btn_linkedsite)
        btn_linkedsite2 = types.InlineKeyboardButton(text = 'Second channel', url = channels[1])
        markup.add(btn_linkedsite2)
        btn_linkedsite3 = types.InlineKeyboardButton(text = 'Third channel', url = channels[2])
        markup.add(btn_linkedsite3)
        btn_linkedsite4 = types.InlineKeyboardButton(text = 'Fourth channel', url = channels[3])
        markup.add(btn_linkedsite4)
        btn_control = types.InlineKeyboardButton(text = 'Check', callback_data = "checking")
        markup.add(btn_control)
        bot.send_message(message.chat.id, "You must subscribe to this channels to get money",reply_markup = markup)
    else:
        bot.send_message(message.chat.id, "I don't understand you")

@bot.callback_query_handler(func=lambda call: True)
def checkSub(call):
    if call.data == 'checking':
        for i in range(1, len(channels), 1):
            if checksub(bot.get_chat_member(chat_id = channels[i], user_id = call.from_user.id)):
                    getmoney()
            else:
                bot.send_message(call.message.chat.id, "To get money you must subscribe ") 


def checksub(chat_member):              
    print(chat_member['status'])
    if chat_member['status'] != 'left':
        return True
    else:
        return False

def getmoney(message: types.Message):
    bot.send_message(message.chat.id, "Well you will get your money")

bot.polling(none_stop=True, interval=0)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source