Hazex Codes
758 subscribers
4 photos
19 links
๐ŸŽ‰ ๐…๐ซ๐ž๐ž ๐“๐ž๐ฅ๐ž๐›๐จ๐ญ๐‚๐ซ๐ž๐š๐ญ๐จ๐ซ ๐‚๐จ๐๐ž๐ฌ

๐Ÿšซ ๐’๐ž๐ฅ๐ฅ๐ข๐ง๐  ๐“๐ก๐ข๐ฌ ๐‚๐ก๐š๐ง๐ง๐ž๐ฅ ๐‚๐จ๐๐ž๐ฌ ๐ˆ๐ฌ ๐’๐ญ๐ซ๐ข๐œ๐ญ๐ฅ๐ฒ ๐๐จ๐ญ ๐€๐ฅ๐ฅ๐จ๐ฐ๐ž๐

๐Ÿง‘๐Ÿปโ€๐Ÿ’ป ๐Ž๐ฐ๐ง๐ž๐ซ: @MrHazex
โ˜Ž๏ธ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ ๐‚๐ก๐š๐ญ: @HxChat
Download Telegram
๐Ÿ›‘ Break from Telegram for 1 Month

๐Ÿ”œ New Codes Coming Soon
๐Ÿค”4๐Ÿ‘2
๐ŸŽน Best Music Downloader Bot with Quality Options

๐ŸŽต Bot -
@xyzMusic_Bot
๐Ÿ‘1
๐Ÿ“Œ AI Girlfriend TPY Code

๐Ÿš€ Command: *

๐Ÿ›  TPY Code:

bot.sendChatAction(chat_id=message.chat.id, action="typing")
ms = message.text
url = f"https://chatgpt.apinepdev.workers.dev/?question={ms}&state=girlfriend"
try:
get = bunchify(HTTP.get(url).json())
bot.replyText(chat_id=u, text=get["answer"])
except:
bot.replyText(chat_id=u, reply_to_message_id=message.message_id, text="<b>โŒ Error Occurred!</b>")
โš ๏ธ Must Give Credit If You Are Posting On Your Channel

โ”Œยฉ๏ธ Credit: @HazexTBC
โ”œ๐ŸŽ– API By:
@Prime_NepCoder
โ”œ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Developer:
@MrHazex
โ””โ€ผ๏ธ Error & Support:
@HxChat
๐Ÿ‘2
๐Ÿค– Telegram Image Search Bot

๐Ÿ‘‰ Bot:
@HazexImg_Bot

๐Ÿ“Œ About Bot -
Bot Can Download HD Images, with Advance Setting Options

โœจ Features -
- Unlimited Search
- Fast Service
- HD Images
- One Click Download


โ“ Use Keywords in Some Word and it will Not Generate Image
๐Ÿ”ฅ4๐Ÿ‘1
๐Ÿ“Œ How To Use sendMediaGroup in TBC

๐Ÿ›  TPY Code:

media_group = [
InputMediaPhoto(media='image_url', caption='Caption 1'), InputMediaPhoto(media='image_url', caption='Caption 2')
]

bot.sendMediaGroup(chat_id=u, media=media_group)

โ”Œยฉ๏ธ Credit: @HazexTBC
โ”œ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Developer:
@MrHazex
โ””โ€ผ๏ธ Error & Support:
@HxChat
๐Ÿ‘2๐Ÿฅฐ1

๐Ÿ“Œ Get Free API's |
@HazexTBC
โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–โž–

๐Ÿ”ป API: SoundCloud

โœจ API Info: With SoundCloud API you can build applications that will give more power to control your content

๐Ÿ”— URL:
https://developers.soundcloud.com/docs/api/guide

๐Ÿ”ฎ Category: Music

๐Ÿงฟ Total Click: 132
๐Ÿ”ฅ3๐Ÿ‘2
This media is not supported in your browser
VIEW IN TELEGRAM
โค3๐Ÿ”ฅ1
Want TBC Broadcast Code That Can Broadcast Any Type Message with Caption and without API?
Final Results
92%
Yes
8%
No
๐Ÿ“Œ TBC Broadcast Code For Any Type Message with Caption

๐Ÿš€ Command 1:
/broadcast

๐Ÿ›  Code:

admin = "YourTelegramID"
if admin != str(u):
raise ReturnCommand()
if options == None:
bot.replyText(u, "<b>๐ŸŽ™๏ธ Send Any Message To Broadcast in HTML\n\nTo Cancel: /cancel</>")
Bot.handleNextCommand("/broadcast", options=True)
raise ReturnCommand()
else:
if message.text == "/cancel":
bot.sendMessage("<b>โŒ Cancelled</>")
raise ReturnCommand()

def broadcast(method, txt, fileId):
typ = method.lower()
if method == "Message":
code = f"""bot.sendMessage(chat_id=u, text='''{txt}''', parse_mode="html")"""
elif str(txt) == "None":
code = f"""bot.send{method}(chat_id=u, {typ}="{fileId}")"""
else:
code = f"""bot.send{method}(chat_id=u, {typ}="{fileId}", caption='''{txt}''', parse_mode="html")"""
return code
txt = str(message.caption)
if txt == "None":
txt = message.text
if message.photo:
code = broadcast("Photo", txt, message.photo[-1].file_id)
elif message.text:
code = broadcast("Message", txt, None)
elif message.video:
code = broadcast("Video", txt, message.video.file_id)
elif message.audio:
code = broadcast("Audio", txt, message.audio.file_id)
elif message.document:
code = broadcast("Document", txt, message.document.file_id)
elif message.sticker:
code = broadcast("Sticker", txt, message.sticker.file_id)
elif message.animation:
code = broadcast("Animation", txt, message.animation.file_id)
else:
bot.sendMessage("<b>โŒ Wrong File Format!</>")
raise ReturnCommand()
url = libs.webhook.getUrlFor("/broadResult", u)
task = Bot.broadcast(code=code, callback_url=url)
Bot.saveData(task, None)
bot.sendMessage("<b>๐Ÿ” Broadcast Processing...</b>")

๐Ÿš€ Command 2: /broadResult

๐Ÿ›  Code:
try:
get = options.json
total = get.total
success = get.total_success
fail = get.total_errors

txt = f"""<b>
๐ŸŽ™๏ธ Broadcast Done

๐Ÿ‘ฅ Total: {total}
โœ… Success: {success}
โŒ Failed: {fail}
</b>"""
bot.sendMessage(txt)
except:
bot.sendMessage("<b>โŒ Broadcast Data Process Failed</b>")

โš ๏ธ Replace YourTelegramId With Your Telegram ID

๐Ÿšจ Must Give Credit If You Are Posting On Your Channel

โ”Œยฉ๏ธ Credit:
@HazexTBC
โ”œ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Developer:
@MrHazex
โ””โ€ผ๏ธ Error & Support:
@HxChat
๐Ÿ‘8๐Ÿ”ฅ3โค2๐Ÿ‘1
๐Ÿ˜ข5๐Ÿซก2๐Ÿ†’2๐Ÿ‘1๐Ÿ˜ˆ1
๐Ÿš€ Get Unlimited Temp Emails
โŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏ
๐Ÿ“ง Email:
your_lord_404@fexbox.org
โŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏ
ใ…คใ…คใ…ค๐Ÿ“ฉ Inbox [0 Mails Received]
โŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏโŽฏ
๐Ÿ‘7๐Ÿ”ฅ2๐Ÿ˜2
๐Ÿ‘‹ Hello Everyone!

๐Ÿง‘โ€๐Ÿ’ป Should we upload Python Telegram Bot Codes in
Telebot Library?, Which you can host on pythonanywhere or different Python Hosting Platform.

๐Ÿ’ฌ Comment Below
๐Ÿ”ฅ3๐Ÿ‘2โค1
๐Ÿค– A Simple Chat GPT Telegram Bot Code in Python Using Telebot Library

import telebot
import requests

#Made By @MrHazex @HazexTBC
bot = telebot.TeleBot('Bot_Token')

@bot.message_handler(commands=['start'])
def start_msg(message):
user_id = message.from_user.id
usr = message.from_user.first_name
bot.send_message(user_id, f'<b>๐Ÿ‘‹ Hello {usr}!\n\n๐Ÿค– Send Message To Ask With Chat GPT</>', parse_mode="HTML")

@bot.message_handler(func=lambda message: True)
def process_msg(message):
bot.send_chat_action(message.chat.id, 'typing')
ms = message.text
url = f"https://chatgpt.apinepdev.workers.dev/?question={ms}"
try:
response = requests.get(url)
data = response.json()
answer = data["answer"]
bot.reply_to(message, answer, parse_mode='Markdown')
except:
bot.reply_to(message, "โŒ Error Occurred!")

#Made By @MrHazex @HazexTBC
bot.polling()


โš ๏ธ Must Install Telebot Module To Run This Code:
pip install telebot


๐Ÿ“‚ Host on Python Hosting Platform like - pythonanywhere

โš ๏ธ Must Give Credit If You Are Posting On Your Channel

โ”Œยฉ๏ธ Developer:
@MrHazex
โ”œ๐ŸŽ– API By:
@NepCoder
โ”œ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Posted on:
@HazexTBC
โ””โ€ผ๏ธ Error & Support:
@HxChat
๐Ÿ”ฅ4โค3๐Ÿ‘3
๐Ÿ”ฎ Hazex Multi-Purpose Bot

๐Ÿ’  This Bot Has So Many Useful Features
โ”œ QR Code Generator
โ”œ QR Code Scanner
โ”œ Advance Chat GPT
โ”œ Language Translator (120+ Lang.)
โ”œ YouTube Video Search
โ”œ Worm GPT ๐Ÿ†•
โ”œ Background Remover
โ”œ Image Uploader
โ”œ YouTube Short Downloader
โ”œ Wikipedia Search
โ”œ Text to Speech (Hindi and English)
โ”œ Vehicle Number Info ๐Ÿ†•
โ”œ Lyrics Finder
โ”œ Link Shortener (4 Domain)
โ”œ Hindi Jokes
โ”œ Random Anime Pics
โ”” Random Meme


๐Ÿ”ธ Adding More Features...

๐Ÿ”น User Friendly Interface, Font Option Available

๐Ÿค– Bot:
@HazexBOT
โค3๐Ÿ‘3๐Ÿ”ฅ2
๐Ÿ“ธ 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

โš ๏ธ Must Give Credit If You Are Posting On Your Channel

โ”Œยฉ๏ธ Developer:
@MrHazex
โ”œ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Posted on:
@HazexTBC
โ””โ€ผ๏ธ Error & Support:
@HxChat
๐Ÿฅฐ5๐Ÿ‘3
๐ŸŽ‰ Image Generator TBC Code

๐Ÿš€ Command: *

๐Ÿ›  Code:
bot.sendChatAction(chat_id=message.chat.id, action="upload_photo")
bot.sendChatAction(chat_id=message.chat.id, action="upload_photo")
chat_id = u
ms = message.text


url = f"https://aiimage.hellonepdevs.workers.dev/?prompt={ms}&state=url"

try:
response = HTTP.get(url)
response.raise_for_status()
get = bunchify(response.json())


bot.sendPhoto(chat_id=chat_id, photo=get["image_url"], caption="๐Ÿค Created By @username")
except:
pass


โš ๏ธ Must Give Credit If You Are Posting On Your Channel

โ”Œยฉ๏ธ Developer:
@MrRoleXG
โ”œ๐ŸŽ– API By: @NepCoder
โ”œ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Posted on:
@HazexTBC
โ””โ€ผ๏ธ Error & Support:
@HxChat
โค2๐Ÿ‘2๐Ÿ”ฅ2
๐Ÿ“Œ Ban and Unban User TBC Code

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

๐Ÿš€ Command:
/ban

๐Ÿ›  Code:
if message.chat.id != #adminID:
    bot.replyText(u, "<b><i>๐Ÿšซ You Are Not This Bot Admin</i></b>")
    raise ReturnCommand()
if options== None:
    bot.replyText(chat_id=u, text = f"<b>๐Ÿ”ฐ Send User Telegram ID to Ban:

To Cancel: /cancel</b>", parse_mode = "html")
    Bot.handleNextCommand("/ban", options= True)
    raise ReturnCommand()
   
if message.text == "/cancel":
    bot.replyText(u, "โŒ <b>Cancelled</b>")
    raise ReturnCommand()
usr = f"<a href='tg://user?id={message.text}'>{message.text}</a>"
stat=User.getData("ban",user=message.text)
if stat == "ok":
    bot.replyText(u, "<b>โŒ User Already Banned</b>")
    raise ReturnCommand()
User.saveData("ban",data="ok",user=message.text)
bot.replyText(chat_id = message.chat.id,text = f"<b>๐Ÿšซ User {usr} Banned Now</b>", parse_mode = "html")


โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

๐Ÿš€ Command:
/unban

๐Ÿ›  Code:
if message.chat.id != #adminID:
    bot.replyText(u, "<b><i>๐Ÿšซ You Are Not This Bot Admin</i></b>")
    raise ReturnCommand()
if options== None:
    bot.replyText(chat_id = message.chat.id, text = f"<b>๐Ÿ”ฐ Send User Telegram ID to UnBan:

To Cancel: /cancel</b>", parse_mode = "html")
    Bot.handleNextCommand("/unban", options==True)
    raise ReturnCommand()
   
if message.text == "/cancel":
    bot.replyText(u, "โŒ <b>Cancelled</b>")
    raise ReturnCommand()
usr = f"<a href='tg://user?id={message.text}'>{message.text}</a>"
stat=User.getData("ban",user=message.text)
if stat != "ok":
    bot.replyText(u, "<b>โŒ User Not Banned</b>")
    raise ReturnCommand()
User.saveData("ban",data="no",user=message.text)
bot.replyText(chat_id = message.chat.id, text = f"<b>๐Ÿ”“ User {usr} Unbanned Now</b>", parse_mode = "html")


โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

๐Ÿš€ Command:
In Every Main Command or use @ command

๐Ÿ›  Code:
remkeyboard = ReplyKeyboardRemove(True)
if str(User.getData("ban")) == "ok":
    bot.replyText(u, "<b><i>๐Ÿšซ You are Banned in this Bot</i></b>", reply_markup=remkeyboard)
    raise ReturnCommand()

๐Ÿ›‘ Add Above Code in Every Main Command

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

โš ๏ธ Must Give Credit If You Are Posting On Your Channel

โ”Œ๐Ÿง‘๐Ÿปโ€๐Ÿ’ป Developer:
@MrHazex
โ”œยฉ๏ธ Credit:
@HazexTBC
โ””โ€ผ๏ธ Error & Support:
@HxChat
๐Ÿ‘6๐Ÿ”ฅ3โค1๐Ÿ˜ข1
๐Ÿ˜€ Chat GPT TPY Code Which Can Response According To Previous Chat Also

๐Ÿš€ Command: *

โš™๏ธ Code:
url = "https://chat-gpt.hazex.workers.dev/" 
lastResponse = User.getData("GptMsg")
if lastResponse is None:
lastResponse = []

data = {
"gpt": lastResponse,
"user": str(message.text)
}

response = HTTP.post(url, json=data)

if response.status_code == 200:
get = bunchify(response.json())
ans = get.answer
bot.replyText(chat_id=u, text=ans, parse_mode="markdown")
lastResponse.append(str(ans))
if len(lastResponse) > 8:
lastResponse.pop(0)
User.saveData("GptMsg", lastResponse)
else:
bot.replyText(u, response.json())


โ”Œ๐Ÿ‘จโ€๐Ÿ’ป Developer: @MrHazex
โ”œ๐ŸŽ– API By: @HazexAPI
โ”œ
ยฉ๏ธ Posted on: @HazexTBC
โ””
โ—๏ธ Error & Support: @HxChat
Please open Telegram to view this post
VIEW IN TELEGRAM
1๐Ÿ‘7โค4
โœจ Join This Channel For Free API

๐Ÿ‘‰ Channel: @HazexAPI

๐Ÿ’  API List:

โ”œ YouTube Video Search
โ”œ YouTube Video and Audio
โ”œ Chat GPT with History Response
โ”œ TikTok Video and Audio
โ”œ
Instagram Reels and Image
โ”œ DaFont API
โ”œ AI Image Generator
โ”œ Face Swap
โ””
Chat GPT 4 with Image Response

๐Ÿช„ More API Coming Soon...
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘10โค5๐Ÿฅฐ2๐Ÿ˜2