bot
import telebot
bot = telebot.TeleBot("YOUR_BOT_TOKEN")
# Replace YOUR_CHANNEL_ID with the actual channel ID
chat_id = "-100YOUR_CHANNEL_ID"
# Get information about the bot's membership in the channel
bot_member = bot.get_chat_member(chat_id, bot.get_me().id)
# Check if the bot is an admin of the channel
if bot_member.status == "administrator":
print("Bot is an admin of the channel")
else:
print("Bot is not an admin of the channel")
0 Comments