👑 Chat Gpt-4o Bot [TBC]⭐
🚀 Command: *
🤖 Code:
# Send typing action
bot.sendChatAction(chat_id=message.chat.id, action="typing")
# Get the message text
ms = message.text
# Define the URL
url = f'https://chat-gpt-3-5.bjcoderx.workers.dev/?text={ms}'
try:
# Fetch the data from the URL
response = HTTP.get(url)
response.raise_for_status()
# Check for HTTP errors
get = bunchify(response.json())
msg = get["reply"]
bot.sendMessage(chat_id=message.chat.id, text=msg, parse_mode="Markdown", reply_to_message_id=message.message_id)
except Exception as e:
# Send error message
error_message = "❌ Error Occurred!\n"
bot.replyText(chat_id=message.chat.id, reply_to_message_id=message.message_id, text=error_message, parse_mode="HTML")
┌🎖 API By: @BJdevsapis
├ 🔰Creator : @BJ_Coder
└ ©️ Posted on: @BJ_Devs
🚀 Command: *
🤖 Code:
# Send typing action
bot.sendChatAction(chat_id=message.chat.id, action="typing")
# Get the message text
ms = message.text
# Define the URL
url = f'https://chat-gpt-3-5.bjcoderx.workers.dev/?text={ms}'
try:
# Fetch the data from the URL
response = HTTP.get(url)
response.raise_for_status()
# Check for HTTP errors
get = bunchify(response.json())
msg = get["reply"]
bot.sendMessage(chat_id=message.chat.id, text=msg, parse_mode="Markdown", reply_to_message_id=message.message_id)
except Exception as e:
# Send error message
error_message = "❌ Error Occurred!\n"
bot.replyText(chat_id=message.chat.id, reply_to_message_id=message.message_id, text=error_message, parse_mode="HTML")
┌🎖 API By: @BJdevsapis
├ 🔰Creator : @BJ_Coder
└ ©️ Posted on: @BJ_Devs