Nandha Bot's Channel
1.47K subscribers
101 photos
50 videos
15 files
171 links
๐Ÿ—ฃ๏ธ Discussion Group - @NandhaSupport
๐Ÿ“ข Network Channel - @NandhaNetwork
๐Ÿ›’ Market Shop - @NandhaMarket

โœจ Owner: @Nandha

โ„น๏ธ GitHub Account:
https://github.com/nandhaxd

โ„น๏ธ GitHub Organization: https://github.com/Nandhabots
Download Telegram
Once again gojo's chatbot module upgrade to next level ๐ŸŒŸ ๐ŸŒŸ ๐ŸŒŸ use gojo you can't refuse it


๐ŸŒŸ Support you're GojO by adding to groups:
โ€”> https://t.me/GojoAssistantBot?startgroup

๐Ÿ“Œ Found any bugs?
Report
: @NandhaSupport

@NandhaBots
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘2
Nandha Bot's Channel
Photo
This feature swapped to /gojo /ask commands
import aiohttp


class Gemini:
def __init__(self, api_key: str):
self.api_key = api_key

async def ask(self, prompt: str, file: dict = {}) -> dict:
async with aiohttp.ClientSession() as session:
payload = {}
payload["contents"] = []
if file:
file_uri = file["file"]["uri"]
payload["contents"].append(
{
"role": "user",
"parts": [
{
"fileData": {
"fileUri": file_uri,
"mimeType": "image/jpeg"
}
},
{
"text": prompt
}
]
}
)
else:
payload["contents"].append(
{
"role": "user",
"parts": [
{
"text": prompt
}
]
}
)
payload["generationConfig"] = {
"temperature": 0.9,
"topK": 40,
"topP": 0.95,
"maxOutputTokens": 1024,
"responseMimeType": "text/plain"
}
async with session.post(f"https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b-exp-0924:generateContent?key={self.api_key}", headers={"Content-Type": "application/json"}, json=payload) as response:
try:
results = await response.json()
return results
except Exception as e:
return {"error": str(e)}

async def upload_image(self, path: str) -> dict:
with open(path, "rb") as file:
async with aiohttp.ClientSession() as session:
payload = {"file": file}
async with session.post(f"https://generativelanguage.googleapis.com/upload/v1beta/files?key={self.api_key}", data=payload) as response:
try:
return await response.json()
except Exception as e:
return {"error": str(e)}
os.remove(path)


โš”๏ธ Get your API key:
https://aistudio.google.com/app/apikey


๐Ÿ‘จโ€๐Ÿ’ป For Example:
Use @GojoAssistantBot /gemini or /google cmd replaced old model with official api


#gojoai #gemini #gojoassistant

@NandhaBots
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘1
โ˜€๏ธ โ˜€๏ธ "victory of light over darkness, good over evil, and knowledge over ignorance" โ€” Happy Diwali ๐ŸŽ† ๐ŸŽ†.
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘2
Celebrate Diwali with Joy!
Happy Diwali! ๐Ÿช”โœจ Checkout This Link:-
https://kishoredxd.vercel.app/
๐Ÿ‘3
This media is not supported in your browser
VIEW IN TELEGRAM
Now anime search available in our boy @gojoAssistantBot ๐ŸŒŸ

Example:
/anime silent voice
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1๐Ÿ‘1
Forwarded from BotNews
Bot API 7.11

โ€ข Bots can now participate in revenue sharing from Telegram Ads โญ๏ธ โ€“ unlocking a new way to help support their development.
โ€ข Introduced Paid Broadcasts โญ๏ธ โ€“ allowing bots to broadcast up to 1000 messages per second.

โ€ข Bots can now send and receive chat-specific hashtags that only show posts and stories from a specific chat when tapped.
โ€ข Added a new inline button to let users copy text in one tap.
โ€ข Bots can now add media to existing text messages.

โ€ข And more, see the full changelog for details:

https://core.telegram.org/bots/api-changelog#october-31-2024

โš ๏ธ Warning: Starting December 1, 2024 messages with video posted in big communities can be delayed by the server until the respective video is reencoded. Read more here.
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
Please open Telegram to view this post
VIEW IN TELEGRAM
Nandha Bot's Channel
๐Ÿค” That's a real W.
import requests
import json

token = ""
message_id = ...
chat_id = ...

url = f"https://api.telegram.org/bot{token}/editMessageMedia"

payload = {
"chat_id": chat_id,
"message_id": message_id,
"media": json.dumps({
"type": "photo",
"media": "" # file id or url
})
}

response = requests.post(url, data=payload)
print(response.json())
Satoru Gojo ("โง;โง(โง"โง
Message
It is little frustrating but we have shifted gojo to another AI. ๐Ÿ‘
Please open Telegram to view this post
VIEW IN TELEGRAM
โ€”> Stalk Instagram profile using @gojoAssistantBot

Command:
/iguser darlingonelife
โค3
Added support for download Facebook video. plus morse encode & deocde

Example:
/fbdl video link
/morse: reply to text
/morsed: reply to morse text
โค1๐Ÿ‘1
Added /pinterest and /pinvideo for pinterest search image & video plus downloads. #gojoAssistantBot

Example:
/pinvideo gojo edits
/pinterest gojo profile


โ˜… pinterest video command updated
๐Ÿ‘1
async def get_trendings(country: str):
base_url = "https://getdaytrends.com"
url = base_url + f'/{country}'
headers = {"user-agent": get_ua()}

# func for extract data from table
def get_result(data):
tags = data.table.find_all('tr')
results = []
for tr in tags:
src = tr.td
title = src.get_text()
link = base_url + src.a.get('href')
results.append({'title': title, 'url': link})
return results

async with aiohttp.ClientSession() as session:
try:
async with session.get(url, headers=headers) as response:
if response.status != 200:
return {'error': response.reason}
content = await response.text()
soup = BeautifulSoup(content, 'html.parser')
tables = soup.select("div[class^='inset']")
return {
'now_hashtags': get_result(tables[0]),
'today_hashtags': get_result(tables[1]),
'top_hashtags': get_result(tables[2])
}

except Exception as e:
return {'error': str(e)}

Scrapper for get top tweets tags that are trending now, today, and top in a country #NandhaBots
๐Ÿ‘1