Advanced Coding
25.7K subscribers
69 photos
11 videos
18 files
67 links
Owner :- @MiddleDealer
Download Telegram
ðŸ–Ĩ Beginner Coding Tip ðŸ–Ĩ

âœĻ Tip: Comment Your Code âœĻ

Writing clear and understandable code is just as important as making it work. Here's why you should get into the habit of commenting your code:

Why Commenting is Important:
- Clarity: Comments help explain what your code does, making it easier to understand for yourself and others.
- Maintenance: When you come back to your code after some time, comments can remind you of your thought process.
- Collaboration: If you're working with others, comments can help your teammates understand your code quickly.

How to Comment Effectively:
1. Explain the Why: Use comments to explain why you're doing something, not just what you're doing.
2. Keep It Simple: Write clear and concise comments.
3. Use Descriptive Variable Names: This reduces the need for excessive comments.
4. Update Comments: Ensure your comments stay accurate as you modify your code.

Example:
# Calculate the area of a circle
def calculate_area(radius):
# Use the formula: area = π * r^2
pi = 3.14159
area = pi * (radius ** 2)
return area


Remember, good comments can make your code much more readable and maintainable. Happy coding! 🚀
👍10âĪ1
ðŸ“ļ IMGBB Image Uploader TBC Code

🚀 Command: /yourCommand

🛠 Code:
if options == None:
    bot.replyText(
        chat_id=u, text="<b>ðŸ“ļ Send Image to Upload\n\nTo Cancel: /cancel</b>")
    Bot.handleNextCommand("/yourCommand")
else:
    if message.text == "/cancel":
        bot.replyText(chat_id=u, text="❌ *Process Cancelled*", parse_mode="markdown")
        raise ReturnCommand()
    if not message.photo:
        bot.replyText(chat_id=u,reply_to_message_id=message["message_id"],text= f"❗ <b>Invalid Image</b>")
        raise ReturnCommand()
    photo = message.photo[-1].file_id
    file_path = bot.getFile(photo).file_path
   
    key = "#imgbb_API_KEY"

    uimg = f"https://api.telegram.org/file/bot{Bot.info().token}/{file_path}"
    src = HTTP.get(f"https://api.imgbb.com/1/upload?key={key}&image={uimg}").json()
    img = src['data']['url']
    bot.sendChatAction(
    chat_id=message.chat.id,
    action="upload_photo")
    bot.replyText(chat_id=u, text=f"<b>☑ïļ Image Uploaded Successfully\n\n🔗 URL: <code>{img}</></>")


🔑 Get API KEY - https://api.imgbb.com
👍7âĪ3ðŸ”Ĩ1
Subscribe to Astro Source on Youtube & Telegram
👍5ðŸĪ”3👀2
Imgify Ai 🖞ïļ

This ai bot can generate images as you want, just you describe bot will design.

ðŸĪ– Bot: @ImgifyAiBot

📄 Simply text the bot for the image you want to generate. For example: "Cute Cat"

⚠ïļ This tool should be used only for fun, not for any illegal activity.


😉 Try it! I'm sure, you will definitely like it. Use it for fun.
👍6💋4ðŸĨ°1😁1
Buy me a Cup of coffee ☕ïļâ­ïļ

UPI - rushikeshlade@fam

TRX - TMiScMpNBui96KaPpJYxYTivaXEJjgmvJ6

BNB - 0x80D6A140b191aE2F35DCdE63090d5d324dC7a7b7

LTC - ltc1q73v5d2tr62dv9jqkvtm4euvf2r3j6haq6rpk9s

Buy Me a Coffee makes supporting fun and easy.âĪïļ
👍21😁7
import logging
from telegram import Update, InlineKeyboardMarkup, InlineKeyboardButton
from telegram.ext import ApplicationBuilder, CommandHandler, CallbackQueryHandler, ContextTypes
from collections import defaultdict

# Enable logging
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=logging.INFO
)
logger = logging.getLogger(__name__)

# Dictionary to store likes
likes = defaultdict(set)

# Define the start command handler
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
await update.message.reply_text('Hi! Use /post to send an inline message with a link and a like button to the channel.')

# Define the post command handler
async def post(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
keyboard = [
[InlineKeyboardButton("Visit Google", url='https://www.google.com')],
[InlineKeyboardButton("Like 👍", callback_data='like')]
]
reply_markup = InlineKeyboardMarkup(keyboard)

await context.bot.send_message(
chat_id='@CHANNELUSERNAME', # Replace with your channel's username
text='Click the button below to visit Google or to like this post!',
reply_markup=reply_markup
)
await update.message.reply_text('Message sent to the channel.')

# Define the button callback handler
async def button(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
query = update.callback_query
user_id = query.from_user.id
chat_id = query.message.chat.id

if query.data == 'like':
if user_id in likes[chat_id]:
await query.answer(text="You've already liked this post.")
else:
likes[chat_id].add(user_id)
await query.answer(text="Thanks for liking!")
# Optionally, update the message text with the new number of likes
# This example does not include that part for simplicity
else:
await query.answer()

def main() -> None:
# Create the Application and pass it your bot's token.
application = ApplicationBuilder().token('YOURBOTTOKEN').build()

# on different commands - answer in Telegram
application.add_handler(CommandHandler("start", start))
application.add_handler(CommandHandler("post", post))

# on callback query - handle the like button click
application.add_handler(CallbackQueryHandler(button))

# Start the Bot
application.run_polling()

if __name__ == '__main__':
main()
👍18âĪ11😁5
The above python code is for telegram bot that post message with inline buttons on your telegram channel👍
👍9ðŸģ4
Media is too big
VIEW IN TELEGRAM
😈 Do you want to hack your Friends Mobile?

🛑 Mobile + Number + Camera Fully Hack by just sending him spy url.

ðŸĪ– Hack Bot:
@CameraSpyHackBot
👍37âĪ‍ðŸ”Ĩ9😁8ðŸĪĐ6🎉2âĪ1
Advanced Coding pinned Deleted message
TRX Api's

Generate Address:
https://tronscape.vercel.app/generateaddress

See Balance: https://tronscape.vercel.app/balance/<TRX_ADDRESS>

Send Trx: https://tronscape.vercel.app/send/<PRIVATE_KEY>/<FR OM_ADDRESS>/<TO_ADDRESS>/AMOUNT

See History: https://tronscape.vercel.app/transactions/<TRX_ADDRESS>

Provider : @kids_coder
👍6âĪ4😁4
if(request.data){
var message_id = request.message.message_id
var chat_id = request.message.chat.id

Api.deleteMessage({
chat_id : chat_id,
message_id : message_id
})

}
if (!user.first_name) {
var valid_name = user.last_name
} else {
var valid_name = user.first_name
}
let currency = Bot.getProperty("currency");

let refList = Libs.ReferralLib.getRefList()
let users = refList.getUsers()
if (users.length < 100000000) {
var count = users.length
} else {
var count = refList.count
}

var user_link = Libs.commonLib.getLinkFor(user)
var withdrawn = Bot.getProperty("totalWithdrawn")
withdrawn = parseFloat(withdrawn)
var wallet = User.getProperty("TRXwallet")
var userPayment = Libs.ResourcesLib.anotherChatRes("totalPayment", "global")
var balance = Libs.ResourcesLib.userRes("balance")
if (isNaN(message)) {

} else {
}
let wn=Bot.getProperty("mw")
if (message < wn) {
Bot.sendMessage("_👋 Minimum Withdraw "+wn+" "+currency+"_")
} else {
if (message > balance.value()) {
Bot.sendMessage(
"_👋 Maximum Withdraw " + balance.value().toFixed(6) + " "+currency+"_"
)
} else {

balance.add(-message)
userPayment.add(+message)
let api_key=Bot.getProperty("apik")

var amount = message*100000000 //= equivalent 0.00000001 BCH, TRX, LTC etc
//enter your email or address
User.setProperty("amount", message, "string")
//setup
HTTP.post({
url: "https://faucetpay.io/api/v1/send",
success: "/onWdSuc ",
body:
"api_key=" +
api_key +
"&amount=" +
amount +
"&to=" +
wallet +
"&currency=" +
currency +
"",
headers: {
"Content-type": "application/x-www-form-urlencoded",
Accept: "application/json"
}
})

}}


ÂĐïļ Credit : @kids_coder & @RushikeshLade1
👍22âĪ3
Faucetpay Auto Withdrawal Code 👆
âĪ‍ðŸ”Ĩ7👍4
Good night! 🌙

"Dream big, work hard, stay focused, and surround yourself with good people. Success is not the key to happiness. Happiness is the key to success."

Rest well and wake up ready to conquer your dreams!
👍21âĪ4😁1
"Good night!

Remember that every day is a new chance to grow, learn, and make your dreams a reality. Rest well tonight, for tomorrow holds endless possibilities." 🌟
âĪ15👍5😁4
If you are scammed by some one then you can expose him using our bot, so he cannot scam other users.

Report at
@ScamGuard_Bot

After report you wont get your money back but you can alert other users about him👍
👍14ðŸ˜Ē4âĪ1
Today is my Birthday😅
🎉50âĪ12👍7ðŸ˜Ē5😁3👏1ðŸĪĐ1💋1ðŸĪ“1
Advanced Coding
Today is my Birthday😅
Happy Birthday Rushikesh bhaiya âĪïļâœ…

Chalo party kab de rahe ?
🎉13👍3