UniBorg
1.33K subscribers
4 photos
1 video
16 files
39 links
WORST UserBot with the WORST features!!

https://GitHub.com/SpEcHiDe/UniBorg

All code in this channel is licensed under GPLv3, except where otherwise noted!

[Licensed under CC BY 3.0 https://creativecommons.org/licenses/by/3.0/]

ℹ️ @SpEcHlDe
Download Telegram
Delete "n" number of profile photos from your account.

#Pyrogram
n = 1
p_p = await client.get_profile_photos("me", limit=n)
await client.delete_profile_photos([photo.file_id for photo in p_p])


#Telethon
n = 1
await event.client(functions.photos.DeletePhotosRequest(await event.client.get_profile_photos("me", limit=n)))


©️ no copyright infringement is intended in the publication of this short eval plugin.
get a list of @BotFather bots, created by your account.

#Pyrogram

import asyncio
m = await client.send_message("@botfather","/token")
await asyncio.sleep(5)
hs = await client.get_history(chat_id="@botfather", limit=1, reverse=False)
await m.reply_text("/cancel")
h = hs[0]
bot_lists = h.reply_markup.keyboard
# /952952/4723940
bot_names = [user_name for bot_list in bot_lists for user_name in bot_list]
print(bot_names)

#Telethon

import asyncio
m = await event.client.send_message("@botfather","/token")
await asyncio.sleep(5)
hs = await event.client.get_messages(entity="@botfather", limit=1, reverse=False)
await m.reply("/cancel")
h = hs[0]
bot_lists = h.reply_markup.rows
# /952952/4723940
bot_names = [user_name.text for bot_list in bot_lists for user_name in bot_list.buttons]
print(bot_names)


©️ @UniBorg
😏 ban all users in group, without affecting FLOOD_WAIT of your account

#Pyrogram

import aiohttp
TOKEN = "" # fill this with @BotFather token
c = "@username"
async for member in client.iter_chat_members(c):
user_id = member.user.id
url = f"https://api.telegram.org/bot{TOKEN}/kickChatMember?chat_id={c}&user_id={user_id}"
async with aiohttp.ClientSession() as session:
await session.get(url)


#Telethon

import aiohttp
TOKEN = "" # fill this with @BotFather token
c = "@username"
async for user in event.client.iter_participants(c):
user_id = user.id
url = f"https://api.telegram.org/bot{TOKEN}/kickChatMember?chat_id={c}&user_id={user_id}"
async with aiohttp.ClientSession() as session:
await session.get(url)


ℹ️ @UniBorg
i have lost multiple accounts, by signing into untrustworthy clients or accidentally formatting my phones.

Recover your Telegram account access into a friendly client, if you had connected a userbot in that account: 👇

#PyroGram

.eval print(" ".join((await client.get_history(chat_id=777000, limit=1, reverse=False))[0].text))

#Telethon

.eval print(" ".join((await event.client.get_messages(777000, limit=1))[0].text))

©️ snapdragon
count the file_size of the files in a chat

#PyroGram

def gfi(m):
ts = ("audio", "photo", "video", "document")
for u in ts:
k = getattr(m, u, None)
if k:
return k
humanbytes = lambda a: a
status_message = await message.reply_text("🤔")
mus = 0
sum = 0
async for message in client.iter_history(message.chat.id, limit=None):
d = gfi(message)
if message and d:
mus += d.file_size
sum += 1
await status_message.edit_message_text(humanbytes(mus)) +
print(sum)


#TeleThon

status_message = await message.reply("🤔")
mus = 0
sum = 0
async for message in client.iter_messages(entity=message.chat_id, limit=None):
if message and message.file:
mus += message.file.size
sum += 1
await status_message.edit(slitu.humanbytes(mus))
p(sum)


ℹ️ @UniBorg
send all stickers in a particular pack,

#Telethon

pack_short_name = "AnimatedEmojies"
sleep_delay = 5
import asyncio
from telethon.tl import functions, types
reqd_sticker_set = await message.client(functions.messages.GetStickerSetRequest(stickerset=types.InputStickerSetShortName(short_name=pack_short_name)))
for m in reqd_sticker_set.documents:
await message.client(functions.messages.SendMediaRequest(
peer=message.chat_id,
media=types.InputMediaDocument(id=types.InputDocument(id=m.id, access_hash=m.access_hash, file_reference=m.file_reference)),
message=m.attributes[1].alt,
random_id=42))
await asyncio.sleep(sleep_delay)


#PyroGram

pack_short_name = "AnimatedEmojies"
sleep_delay = 5
import asyncio
from pyrogram.raw import functions, types
reqd_sticker_set = await client.send(functions.messages.GetStickerSet(stickerset=types.InputStickerSetShortName(short_name=pack_short_name)))
for m in reqd_sticker_set.documents:
await client.send(functions.messages.SendMedia(
peer=(await client.resolve_peer(message.chat.id)),
media=types.InputMediaDocument(id=types.InputDocument(id=m.id, access_hash=m.access_hash, file_reference=m.file_reference)),
message=m.attributes[1].alt,
random_id=client.rnd_id()))
await asyncio.sleep(sleep_delay)


@UniBorg
clear all notes / filters of @BanHammerMarie_Bot clone

#Telethon

[await (await reply.reply(f"/clear {om}")).delete() for om in ([ko.split("-")[1].strip() for ko in ([re.strip() for re in reply.message.split("\n")][1:-1])])]

@UniBorg
🧐 how does Telegram decide when to show the CHAT_TOO_BIG error?

#Telethon

from telethon.tl.functions.help import GetAppConfigRequest as g
res = await client(g())
sre = (
next(
(
x for x in res.value if 'chat_read_mark_size_threshold' in x.key
)
)
).value.value
p(sre)


#Pyrogram

from pyrogram.raw.functions.help import GetAppConfig as g
client = userge
res = await client.send(g())
sre = (
next(
(
x for x in res.value if 'chat_read_mark_size_threshold' in x.key
)
)
).value.value
print(sre)


ℹ️ @UniBorg