#command /start
typ
#command "check"
chat_id = message.chat.id
user_id = message.from_user.id # <- must be user ID
# Save user ID
users = Bot.getData("all_users")
if users is None:
users = []
if message.chat.id not in users:
users.append(message.chat.id)
Bot.saveData("all_users", users)
# Get user's first name safely
if hasattr(message.from_user, "first_name"):
first_name = message.from_user.first_name
else:
first_name = "User"
# Function to check if user joined channel
def check():
channels = ['@web_developer_m_k']
for i in channels:
try:
member = bot.getChatMember(str(i), user_id)
if member.status == 'left':
return False
except:
return False # If API fails or invalid user
return True
if check() == True:
# Welcome message
welcome_text = f"* 🎉 Welcome! {first_name}*\n\n" \
"*To Use Chat Bot 💬* – _Just Type Your Message And Send Directly!_ \n\n"\
"Thank you for joining our channel.\n\n*Make sure to pin 📌 this bot so you can access it anytime \n\n*"\
"_To explore all tools, type /menu or tap the\n👇🏼 three-line menu below_ "
bot.sendMessage(
chat_id=chat_id,
text=welcome_text,
parse_mode="markdown",
)
else:
# User not joined → show join button
keyboard = InlineKeyboardMarkup()
keyboard.row(
InlineKeyboardButton("📢 Join Channel", url="https://t.me/web_developer_m_k")
)
join_msg = bot.sendMessage(
chat_id=chat_id,
text="*🔐 You Must Join Our Channel*\n\nTo use this bot, join the official channel first. Then send /start again.",
reply_markup=keyboard,
parse_mode="markdown"
)
# Save join message id
Bot.saveData(f"join_msg_{chat_id}", join_msg.message_id)#command check
typ
#command "check"
// Optional: delete the triggering message
if (request.data) {
Api.deleteMessage({
chat_id: request.message.chat.id,
message_id: request.message.message_id
});
}
// Check channel membership using Api.getChatMember
let channelUsername = "@web_developer_m_k"; // your channel
let userId = request.from.id;
let memberInfo = Api.getChatMember({
chat_id: channelUsername,
user_id: userId
});
`Telegram
Developer MK
💻 Web Developer | 📚 Sharing coding tutorials, 💡 tips & 🔧 Working Projects.
💬 Community Chat: @Developer_mk_group
📩 Contact me: @devoloper7
💬 Community Chat: @Developer_mk_group
📩 Contact me: @devoloper7
👌2❤1🤣1
📢 New Update!
Our bot now has some new commands:
/video → Generate high-quality video
/imgtourl → Upload image & get direct URL
/filehost → Make direct download link for files
/Song → Search, download & play songs 🎵
Try them out now 🚀
@MK_DEV_AI_BOT
Our bot now has some new commands:
/video → Generate high-quality video
/imgtourl → Upload image & get direct URL
/filehost → Make direct download link for files
/Song → Search, download & play songs 🎵
Try them out now 🚀
@MK_DEV_AI_BOT
👎2🥰1🤣1
Developer MK
Ajj Ya Kal Ek Na Ek Turnament App Project File De Dunga Promise ✊🏼✨
100% Working File Dunga
15+ Reaction Kar do... 💗
15+ Reaction Kar do... 💗
❤16🏆2🥱1
Media is too big
VIEW IN TELEGRAM
Firebace Ha@k using @MK_DEV_AI_BOT
Command
And
Not Work on HopWeb apps
Command
/firebaceurl And
/dataex to extract data using firebaceurl Not Work on HopWeb apps
❤3