π File Rename Bot Code [ Python ]
π¨βπ»Developer : @RushikeshLade1
Β© Published By : @Kids_Coder
β οΈ Don't Share Without Mentioning @Kids_Coder
import os
import telebot
bot = telebot.TeleBot("BOT_API_TOKEN")
user_new_names = {}
@bot.message_handler(commands=['start'])
def send_welcome(message):
bot.reply_to(message, f"""<b>Welcome to the file renamer bot. Send me a file to rename it. By @kids_coder</b>""",parse_mode="HTML")
@bot.message_handler(content_types=['document'])
def handle_file(message):
file_name = message.document.file_name
file_id = message.document.file_id
file_info = bot.get_file(file_id)
downloaded_file = bot.download_file(file_info.file_path)
bot.send_message(message.chat.id, f"""<b>Current file name:</b> <code>{file_name}</code>\n<b>What should be the new name?</b>""",parse_mode="HTML")
user_chat_id = message.chat.id
user_new_names[user_chat_id] = (file_name, downloaded_file)
@bot.message_handler(func=lambda message: message.chat.id in user_new_names and user_new_names[message.chat.id] is not None)
def handle_new_name(message):
original_file_name, downloaded_file = user_new_names[message.chat.id]
new_name = message.text.strip()
renamed_file_name = "" + new_name
with open(renamed_file_name, 'wb') as renamed_file:
renamed_file.write(downloaded_file)
with open(renamed_file_name, 'rb') as renamed_file:
bot.send_document(message.chat.id, renamed_file)
del user_new_names[message.chat.id]
os.remove(renamed_file_name)
bot.polling()
π¨βπ»Developer : @RushikeshLade1
Β© Published By : @Kids_Coder
β οΈ Don't Share Without Mentioning @Kids_Coder
π9π€2β€1π₯1
Top Referral Code for TBC
Put in in startπ
Command :-
It take some loading & only show top 10π
Developer : @RushikeshLade1
Published At : @kids_coder
topr = Bot.getData("topr")
if topr == None:
push = []
else:
push = topr
check_user = push.count(u)
if check_user > 0:
"""user_exist"""
else:
push.append(u)
Bot.saveData("topr", push)
Put in in startπ
Command :-
Top Inviters
user_ids = Bot.getData("topr") or []
user_data = []
for user_id in user_ids:
refcount = int(libs.Resources.anotherRes("invited_user", user=user_id).value())
user_data.append((user_id, refcount))
user_data.sort(key=lambda x: x[1], reverse=True)
m = "<b>β ScoreBoard [#]</b> \n\n"
for i, (user_id, refcount) in enumerate(user_data[:7]):
username = bot.getChatMember(chat_id=user_id,user_id=user_id)
usernampe = username.user.first_name
usernamoe = username.user.username
msg = f"""<a href="https://t.me/{usernamoe}">{usernampe}</a>"""
censored_username = msg
m += f"<b>{i+1} ) {censored_username}</> : [<code>{refcount}</code>]\n\n"
m += """<i>π€ Invite More To Reach To Top Of The ScoreBoard ! </>"""
bot.replyText(u,m,disable_web_page_preview=True)
It take some loading & only show top 10π
Developer : @RushikeshLade1
Published At : @kids_coder
π9β€3π€2π₯1
π₯ Beginner Coding Tip π₯
β¨ Tip: Start Small and Build Up β¨
When you're just starting out, it's easy to get overwhelmed by complex projects. Here's a simple strategy to keep you on track:
Begin with Small Projects:
Start with small, manageable projects. This could be something as simple as a basic calculator, a to-do list app, or a guessing game. Completing these small projects will help you build confidence and understand fundamental concepts.
Why This Works:
- Quick Wins: Finishing a small project gives you a sense of accomplishment and motivation.
- Focused Learning: You can concentrate on learning one concept at a time without getting overwhelmed.
- Foundation Building: These small projects lay the groundwork for tackling more complex projects in the future.
Remember, every expert was once a beginner. Take it one step at a time and enjoy the learning process. Happy coding! π
β¨ Tip: Start Small and Build Up β¨
When you're just starting out, it's easy to get overwhelmed by complex projects. Here's a simple strategy to keep you on track:
Begin with Small Projects:
Start with small, manageable projects. This could be something as simple as a basic calculator, a to-do list app, or a guessing game. Completing these small projects will help you build confidence and understand fundamental concepts.
Why This Works:
- Quick Wins: Finishing a small project gives you a sense of accomplishment and motivation.
- Focused Learning: You can concentrate on learning one concept at a time without getting overwhelmed.
- Foundation Building: These small projects lay the groundwork for tackling more complex projects in the future.
Remember, every expert was once a beginner. Take it one step at a time and enjoy the learning process. Happy coding! π
π₯2β€1π1
π₯ Beginner Coding Tip π₯
β¨ Tip: Understand the Basics of Algorithms and Data Structures β¨
Learning the basics of algorithms and data structures is crucial for becoming a proficient programmer. Hereβs why:
Why It Matters:
- Efficiency: Knowing which data structure or algorithm to use can make your code run faster and use less memory.
- Problem-Solving: Many programming challenges can be broken down and solved more easily with the right algorithm or data structure.
- Job Interviews: Knowledge of algorithms and data structures is often tested in coding interviews for tech jobs.
Getting Started:
1. Arrays and Lists: Learn how to store and access data.
2. Loops and Conditionals: Understand how to iterate and make decisions in your code.
3. Sorting Algorithms: Study basic sorting methods like bubble sort, selection sort, and insertion sort.
4. Basic Data Structures: Get familiar with stacks, queues, and hash tables.
Practice:
- Coding Platforms: Use platforms like LeetCode, HackerRank, or Codecademy to practice problems.
- Consistent Practice: Spend a little time each day working on problems to reinforce your learning.
Remember, the more you practice, the better you'll get. Keep pushing forward and happy coding! π
β¨ Tip: Understand the Basics of Algorithms and Data Structures β¨
Learning the basics of algorithms and data structures is crucial for becoming a proficient programmer. Hereβs why:
Why It Matters:
- Efficiency: Knowing which data structure or algorithm to use can make your code run faster and use less memory.
- Problem-Solving: Many programming challenges can be broken down and solved more easily with the right algorithm or data structure.
- Job Interviews: Knowledge of algorithms and data structures is often tested in coding interviews for tech jobs.
Getting Started:
1. Arrays and Lists: Learn how to store and access data.
2. Loops and Conditionals: Understand how to iterate and make decisions in your code.
3. Sorting Algorithms: Study basic sorting methods like bubble sort, selection sort, and insertion sort.
4. Basic Data Structures: Get familiar with stacks, queues, and hash tables.
Practice:
- Coding Platforms: Use platforms like LeetCode, HackerRank, or Codecademy to practice problems.
- Consistent Practice: Spend a little time each day working on problems to reinforce your learning.
Remember, the more you practice, the better you'll get. Keep pushing forward and happy coding! π
π4π₯°1
π₯ 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:
Remember, good comments can make your code much more readable and maintainable. Happy coding! π
β¨ 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:
π Code:
π Get API KEY - https://api.imgbb.com
π 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
π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"
π Try it! I'm sure, you will definitely like it. Use it for fun.
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π3π1
Buy me a Cup of coffee βοΈβοΈ
UPI -
TRX -
BNB -
LTC -
Buy Me a Coffee makes supporting fun and easy.β€οΈ
UPI -
rushikeshlade@fam
TRX -
TMiScMpNBui96KaPpJYxYTivaXEJjgmvJ6
BNB -
0x80D6A140b191aE2F35DCdE63090d5d324dC7a7b7
LTC -
ltc1q73v5d2tr62dv9jqkvtm4euvf2r3j6haq6rpk9s
Buy Me a Coffee makes supporting fun and easy.β€οΈ
π20π7
Advanced Coding
Buy me a Cup of coffee βοΈβοΈ UPI - rushikeshlade@fam TRX - TMiScMpNBui96KaPpJYxYTivaXEJjgmvJ6 BNB - 0x80D6A140b191aE2F35DCdE63090d5d324dC7a7b7 LTC - ltc1q73v5d2tr62dv9jqkvtm4euvf2r3j6haq6rpk9s Buy Me a Coffee makes supporting fun and easy.β€οΈ
Merko ek cup chai bol dena:
coderajinkya@fam
β€4π3
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
π Mobile + Number + Camera Fully Hack by just sending him spy url.
π€ Hack Bot: @CameraSpyHackBot
π37β€βπ₯9π8π€©5π2β€1
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
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 +
"¤cy=" +
currency +
"",
headers: {
"Content-type": "application/x-www-form-urlencoded",
Accept: "application/json"
}
})
}}
Β©οΈ Credit : @kids_coder & @RushikeshLade1
π22β€3
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!
Rest well and wake up ready to conquer your dreams!
π20β€3π1
@SafeDealViaAdmin
@MiddleDeaIer
@SharePricesAlert
@Web3WeBuy
@Web3Inventor
@TempSim
@TempSimBot
@botcreatoradv
@pancakesexchange
@whale_india
@pancakes_exchange
@binancetradingg
@HatkeVada
@MagiXdeaIs
@AffiIateMarketing
@DaiIyDeals
@FunnyMemer
@HandleManager
@GetFreeApi
@DevinAi_CognitionLabs
@Devin_AiBot
@PhpCodingTutorials
@Rediff_com
@Netflix_India_Bollywood
To buy any of the above username kindly contact @RushikeshLade1
@MiddleDeaIer
@SharePricesAlert
@Web3WeBuy
@Web3Inventor
@TempSim
@TempSimBot
@botcreatoradv
@pancakesexchange
@whale_india
@pancakes_exchange
@binancetradingg
@HatkeVada
@MagiXdeaIs
@AffiIateMarketing
@DaiIyDeals
@FunnyMemer
@HandleManager
@GetFreeApi
@DevinAi_CognitionLabs
@Devin_AiBot
@PhpCodingTutorials
@Rediff_com
@Netflix_India_Bollywood
To buy any of the above username kindly contact @RushikeshLade1
π14π3
"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