Developer MK
361 subscribers
89 photos
10 videos
37 files
39 links
๐Ÿ’ป Web Developer | ๐Ÿ“š Sharing coding tutorials, ๐Ÿ’ก tips & ๐Ÿ”ง Working Projects.
๐Ÿ’ฌ Community Chat: @Developer_mk_group
๐Ÿ“ฉ Contact me: @devoloper7
Download Telegram
Forwarded from Only Score Code (MK DEV)
MK-DEV-LIVE_TV.html
116.7 KB
MK-DEV-LIVE_TV.html
๐Ÿ”ฅ1
๐Ÿ“ข New Features Added in MK-DEV AI Bot! ๐Ÿš€

Weโ€™ve added some exciting new commands to make your experience even better:

๐Ÿ”— /shorturl - Shorten a long URL into a compact link
๐Ÿ“ท /qr - Generate a QR code from text or a URL
๐ŸŒ /ip - Show your public IP and the botโ€™s server IP
๐Ÿ›ฐ /ipinfo - Get detailed geolocation and ISP info of an IP address
๐Ÿ“ฎ /pincode - Lookup postal information by PIN/ZIP code
๐Ÿ’ฐ /gold - Check todayโ€™s Gold & Silver prices (using API)

โšก All the previous features are still available!
๐Ÿ‘‰ Start bot - @MK_DEV_AI_BOT
๐Ÿ‘1๐Ÿ˜1
๐Ÿ†3
Code coming soon in @source_code_4web


Chating girlfriend

My clone ๐Ÿ˜…
โค1๐Ÿ”ฅ1
chat_id = message.chat.id
msg = message.text.strip()

# Check if user only typed /ig without a URL
if msg.lower() == "/ig":
bot.sendMessage(
chat_id=chat_id,
text="โŒ Please provide an Instagram Video URL like this:\n/ig https://instagram.com/p/ExampleVideo"
)
raise ReturnCommand()

# Remove command prefix
if msg.lower().startswith("/ig "):
msg = msg[4:].strip()
else:
bot.sendMessage(chat_id=chat_id, text="โŒ Only Instagram links are supported.")
raise ReturnCommand()

# Validate Instagram URL
if not ("instagram.com" in msg or "instagr.am" in msg):
bot.sendMessage(chat_id=chat_id, text="โ— Please enter a valid Instagram URL.")
raise ReturnCommand()

# Show typing animation
bot.sendChatAction(chat_id=chat_id, action="typing")
bot.sendChatAction(chat_id=chat_id, action="typing")

# Encode URL and build API request
encoded_url = msg.replace(" ", "%20")
api_url = f"your_api_url={encoded_url}"

try:
response = HTTP.get(api_url, timeout=60, proxy=True)

# Handle API failure
if response.status_code != 200:
bot.sendMessage(
chat_id=chat_id,
text="โš ๏ธ Sorry, we couldn't fetch the Instagram video. The service may be down or the URL is not supported."
)
raise ReturnCommand()

# Parse JSON safely
try:
data = response.json()
except:
bot.sendMessage(chat_id=chat_id, text="โš ๏ธ Unable to process video information.")
raise ReturnCommand()

# Check for error from API
if data.get("error"):
bot.sendMessage(chat_id=chat_id, text="โŒ Unable to fetch the video. Please check the link or try again later.")
raise ReturnCommand()

# Send video info
title = data.get("title", "Instagram Video")
thumbnail = data.get("thumbnail")
duration_sec = data.get("duration", 0)
duration_text = f"{duration_sec//60}m {duration_sec%60}s"

caption = f"๐ŸŽฌ {title}\nโฑ Duration: {duration_text}"
if thumbnail:
bot.sendPhoto(chat_id=chat_id, photo=thumbnail, caption=caption)
else:
bot.sendMessage(chat_id=chat_id, text=caption)

# Send videos as playable files
for media in data.get("medias", []):
quality = media.get("quality") or media.get("type") or "Video"
url = media.get("url")
bot.sendVideo(chat_id=chat_id, video=url, caption=f"{quality} Quality", supports_streaming=True)

except:
# Generic friendly error
bot.sendMessage(chat_id=chat_id, text="โš ๏ธ Sorry, something went wrong while fetching the Instagram video. Please try again later.")
๐Ÿ‘1
#command /start

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
});
`
๐Ÿ‘Œ2โค1๐Ÿคฃ1
Firebase url to realtime database ha@k
๐Ÿ˜3
๐Ÿ“ข 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
๐Ÿ‘Ž2๐Ÿฅฐ1๐Ÿคฃ1
I am Back ๐Ÿ”™
๐ŸŽ‰7โค3
Ajj Ya Kal Ek Na Ek Turnament App Project File De Dunga Promise โœŠ๐Ÿผโœจ
โค10โšก1๐Ÿฅฑ1