Forwarded from The UseLess Bot
The UseLess Bot
new Pull ReQuest #66 by penn5 [CRITICAL] prevent unauthorized access
PLEASE UPDATE YOUR FORKS.
I DON'T CLAIM ANY RESPONSIBILITY FOR ANY DAMAGES CAUSED BY THE USE OF THIS SOFTWARE.
❤ thanks ✌
I DON'T CLAIM ANY RESPONSIBILITY FOR ANY DAMAGES CAUSED BY THE USE OF THIS SOFTWARE.
❤ thanks ✌
🤔 how does the Telegram know which emojies to display similar to @AnimatedEmojies ? 🧐🧐🤷♂
✌️ @UniBorg
from telethon.tl.functions.messages import GetStickerSetRequest
from telethon.tl.functions.help import GetAppConfigRequest
from telethon.tl.types import InputStickerSetDice
config = await event.client(GetAppConfigRequest())
emojies = next((x for x in config.value if x.key == 'emojies_send_dice'))
sets = []
for emoji in emojies.value.value:
sticker_set = await event.client(GetStickerSetRequest(InputStickerSetDice(emoji.value)))
sets.append(sticker_set.set.short_name)
await event.reply("👉 " + "\n\n👉 ".join(map(lambda x: f"https://tttttt.me/addstickers/{x}", sets)))
✌️ @UniBorg
is your @UniBorg application getting suspended on Heroku,?
Anonymous Poll
27%
no
43%
yes
30%
I don't use Heroku.
now, that I have finally managed to remove the StringSession and still working on Heroku, more cool things, are on it's way.
Thanks to these awesome people who inspired me to keep this FORK still updated..!
ALL PREVIOUS INSTRUCTIONS ARE OUT-DATED.
🕊 @UniBorg
Thanks to these awesome people who inspired me to keep this FORK still updated..!
ALL PREVIOUS INSTRUCTIONS ARE OUT-DATED.
🕊 @UniBorg
#Pyrogram #EVAL Script to Get all telegram.org stickers
import aiohttp
import aiofiles
import os
from bs4 import BeautifulSoup
url = "https://telegram.org"
async with aiohttp.ClientSession() as session:
ury = await session.get(url)
yru = await ury.text()
soup = BeautifulSoup(yru, "html.parser")
y_tg_div = soup.find("div", {"class": "tl_main_cards"})
card_div_s = y_tg_div.find_all("source")
ilopker = 1
for card_div in card_div_s:
crs_tes = url + card_div.get("srcset")
lacol_fn = str(ilopker) + ".tgs"
async with session.get(
crs_tes
) as resp:
f_p = await aiofiles.open(lacol_fn, mode="wb")
await f_p.write(await resp.read())
await f_p.close()
await message.reply_document(
document=lacol_fn,
caption=str(ilopker)
)
os.remove(lacol_fn)
ilopker = ilopker + 1
©️ @UniBorgwhich MtProto Library do you like?
Anonymous Poll
9%
MadeLineProto
8%
TDLib
37%
Telethon
37%
Pyrogram
5%
gramJS
4%
grammeRS
38%
🙄 what is MtProto? 🤔
8%
🤔🤔 others 😆
Google Photos Uploader in @UniBorg
1️⃣ Open https://da.gd/PUniTBorg
2️⃣ Click on the "Enable the Google Photos Library API button"
3️⃣ Follow the OnScreen Instructions.
https://tttttt.me/c/1215241723/118
https://tttttt.me/c/1215241723/119
https://tttttt.me/c/1215241723/120
4️⃣ Fill the "G_PHOTOS_CLIENT_ID" and "G_PHOTOS_CLIENT_SECRET" variables.
5️⃣ open your "
6️⃣ you will get a link, Open the link and reply the code within 60 seconds.
7️⃣ Add the "G_PHOTOS_AUTH_TOKEN_ID" variable.
8️⃣ now, you can use "
😎 if you have any issues, please reply to this message.
ℹ️ @UniBorg
1️⃣ Open https://da.gd/PUniTBorg
2️⃣ Click on the "Enable the Google Photos Library API button"
3️⃣ Follow the OnScreen Instructions.
https://tttttt.me/c/1215241723/118
https://tttttt.me/c/1215241723/119
https://tttttt.me/c/1215241723/120
4️⃣ Fill the "G_PHOTOS_CLIENT_ID" and "G_PHOTOS_CLIENT_SECRET" variables.
5️⃣ open your "
PRIVATE_GROUP_BOT_API_ID
" and send ".gphoto setup
"6️⃣ you will get a link, Open the link and reply the code within 60 seconds.
7️⃣ Add the "G_PHOTOS_AUTH_TOKEN_ID" variable.
8️⃣ now, you can use "
.gphoto upload
" as reply to any media.😎 if you have any issues, please reply to this message.
ℹ️ @UniBorg
Anonymous Poll
30%
no
70%
yes
what 🤔 are FREE / CHEAP alternatives of Heroku 🚶♂🚶♂?
😑 Please don't say VPS 🙏🙏
😑 Please don't say VPS 🙏🙏
count the file_size of the files in a chat
#PyroGram
#TeleThon
ℹ️ @UniBorg
#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
#PyroGram
ℹ @UniBorg
#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
Anonymous Poll
49%
no. __the forks are better__
37%
yes
14%
but
🤔 How Telegram knows which sounds to play when tapping on a big emoji?
from telethon.utils import _decode_telegram_base64ℹ️ @UniBorg
from telethon.tl.functions.help import GetAppConfigRequest
res = await client(GetAppConfigRequest())
sre = (
next(
(
x for x in res.value if x.key == 'emojies_sounds'
)
)
).value.value
for kro in sre:
d = {
x.key: x.value.value for x in kro.value.value
}
emojies_sounds_message = await message.respond(kro.key)
await emojies_sounds_message.reply(
ascii(kro.key),
file=types.InputMediaDocument(
id=types.InputDocument(
int(d.get("id")),
int(d.get("access_hash")),
_decode_telegram_base64(
d.get("file_reference_base64")
)
)
)
)
😬 get number of contacts, using Telegram?
😳 It will be fun to see that statistics, so please reply to this message 😁😝
p(len((await client(functions.contacts.GetContactsRequest(0))).contacts))
😳 It will be fun to see that statistics, so please reply to this message 😁😝