import pyfiglet from userbot.utils import friday_on_cmd, edit_or_reply, sudo_cmd @friday.on(friday_on_cmd(pattern="figlet ?(.*)", outgoing=True)) @friday.on(sudo_cmd(pattern="figlet ?(.*)", allow_sudo=True)) async def figlet(event): arjun = await edit_or_reply(event, "`Figleting This Text xD`") if event.fwd_from: return CMD_FIG = { "slant": "slant", "3D": "3-d", "5line": "5lineoblique", "alpha": "alphabet", "banner": "banner3-D", "doh": "doh", "iso": "isometric1", "letter": "letters", "allig": "alligator", "dotm": "dotmatrix", "bubble": "bubble", "bulb": "bulbhead", "digi": "digital", } input_str = event.pattern_match.group(1) if "|" in input_str: text, cmd = input_str.split("|", maxsplit=1) elif input_str is not None: cmd = None
import os from pySmartDL import SmartDL from userbot.utils import friday_on_cmd, sudo_cmd STARK_HTTP = "https://api.proxyscrape.com/?request=getproxies&proxytype=http&timeout=10000&country=all&ssl=all&anonymity=all" HTTP_TXT = "**Proxy Info** \nType: __HTTPS__ \nTimeOut: __10000__ \nCountry: __All__ \nSsl: All \nAnonymity: __All__ \n[Click Here To View Or Download File Manually](https://api.proxyscrape.com/?request=getproxies&proxytype=http&timeout=10000&country=all&ssl=all&anonymity=all) \nUploaded By [Friday](https://github.com/starkgang/FridayUserBot) \n**Here Is Your Proxy** 👇" STARK_SOCKS4 = "https://api.proxyscrape.com/?request=getproxies&proxytype=socks4&timeout=10000&country=all" SOCKS4_TXT = "**Proxy Info** \nType: __SOCKS4__ \nTimeOut: __10000__ \nCountry: __All__ \nSsl: __Only For Http Proxy__ \nAnonymity: __Only For Http__ \n[Click Here To View Or Download File Manually](https://api.proxyscrape.com/?request=getproxies&proxytype=socks4&timeout=10000&country=all) \nUploaded By [Friday](https://github.com/starkgang/FridayUserBot) \n**Here Is Your Proxy** 👇" STARK_SOCKS5 = "https://api.proxyscrape.com/?request=getproxies&proxytype=socks5&timeout=10000&country=all" SOCKS5_TXT = "**Proxy Info** \nType: __SOCKS4__ \nTimeOut: __10000__ \nCountry: __All__ \nSsl: __Only For Http Proxy__ \nAnonymity: __Only For Http__ \n[Click Here To View Or Download File Manually](https://api.proxyscrape.com/?request=getproxies&proxytype=socks5&timeout=10000&country=all) \nUploaded By [Friday](https://github.com/starkgang/FridayUserBot) \n**Here Is Your Proxy** 👇" sedpng = "https://soon.proxyscrape.com/asset/img/service/downloadicon.svg" @friday.on(friday_on_cmd(pattern="http$")) @friday.on(sudo_cmd(pattern="http$", allow_sudo=True)) async def starkxD(event): await event.get_chat() file_name = "proxy_http.txt" downloaded_file_name = os.path.join(Config.TMP_DOWNLOAD_DIRECTORY, file_name) downloader = SmartDL(f"{STARK_HTTP}", downloaded_file_name, progress_bar=False) downloader.start(blocking=False) await event.client.send_file( event.chat_id, downloaded_file_name, force_document=False, thumb=sedpng,
import os try: import instantmusic, subprocess except: os.system("pip install instantmusic") os.system("rm -rf *.mp3") def bruh(name): os.system("instantmusic -q -s " + name) @friday.on(friday_on_cmd(pattern="spd ?(.*)")) async def _(event): if event.fwd_from: return link = event.pattern_match.group(1) chat = "@SpotifyMusicDownloaderBot" await event.edit("```Getting Your Music```") async with bot.conversation(chat) as conv: await asyncio.sleep(2) await event.edit( "`Downloading music taking some times, Stay Tuned.....`") try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=752979930)) await bot.send_message(chat, link) respond = await response
\n Or type `.poto (number)` to get the **desired number of photo of a User** . """ import logging from userbot import bot as javes from userbot.utils import admin_cmd as friday_on_cmd logger = logging.getLogger(__name__) if 1 == 1: name = "Profile Photos" client = javes @javes.on(friday_on_cmd(pattern="poto(.*)")) async def potocmd(event): """Gets the profile photos of replied users, channels or chats""" id = "".join(event.raw_text.split(maxsplit=2)[1:]) user = await event.get_reply_message() chat = event.input_chat if user: photos = await event.client.get_profile_photos(user.sender) else: photos = await event.client.get_profile_photos(chat)
def time_formatter(milliseconds: int) -> str: """Inputs time in milliseconds, to get beautified time, as string""" seconds, milliseconds = divmod(int(milliseconds), 1000) minutes, seconds = divmod(seconds, 60) hours, minutes = divmod(minutes, 60) days, hours = divmod(hours, 24) tmp = (((str(days) + " day(s), ") if days else "") + ((str(hours) + " hour(s), ") if hours else "") + ((str(minutes) + " minute(s), ") if minutes else "") + ((str(seconds) + " second(s), ") if seconds else "") + ((str(milliseconds) + " millisecond(s), ") if milliseconds else "")) return tmp[:-2] @friday.on(friday_on_cmd(pattern="download(?: |$)(.*)", outgoing=True)) @friday.on(sudo_cmd(pattern="download(?: |$)(.*)", allow_sudo=True)) async def download(target_file): """ For .dl command, download files to the userbot's server. """ friday = await edit_or_reply(target_file, "`Processing ...`") await friday.edit("Processing using userbot server ( ◜‿◝ )♡") input_str = target_file.pattern_match.group(1) if not os.path.isdir(TEMP_DOWNLOAD_DIRECTORY): os.makedirs(TEMP_DOWNLOAD_DIRECTORY) if "|" in input_str: url, file_name = input_str.split("|") url = url.strip() # https://stackoverflow.com/a/761825/4723940 file_name = file_name.strip() head, tail = os.path.split(file_name) if head:
# For @UniBorg # courtesy Yasir siddiqui """Self Destruct Plugin .sd <time in seconds> <text> """ import time from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd("sd", outgoing=True)) async def selfdestruct(destroy): """ For .sd command, make seflf-destructable messages. """ if not destroy.text[0].isalpha() and destroy.text[0] not in ("/", "#", "@", "!"): message = destroy.text counter = int(message[4:6]) text = str(destroy.text[6:]) text = ( text + "\n\n`⌛ This message shall be self-destructed in " + str(counter) + " seconds`" ) await destroy.delete() smsg = await destroy.client.send_message(destroy.chat_id, text) time.sleep(counter) await smsg.delete()
from userbot.utils import sudo_cmd, friday_on_cmd, edit_or_reply, load_module, remove_plugin import asyncio import os from datetime import datetime from pathlib import Path DELETE_TIMEOUT = 5 @friday.on(friday_on_cmd(pattern="install", outgoing=True)) async def install(event): if event.fwd_from: return if event.reply_to_msg_id: try: downloaded_file_name = ( await event.client.download_media( # pylint:disable=E0602 await event.get_reply_message(), "userbot/plugins/", # pylint:disable=E0602 )) if "(" not in downloaded_file_name: path1 = Path(downloaded_file_name) shortname = path1.stem load_module(shortname.replace(".py", "")) await event.edit( "Friday Has Installed `{}` Sucessfully.".format( os.path.basename(downloaded_file_name))) else: os.remove(downloaded_file_name) await event.edit( "Errors! This plugin is already installed/pre-installed.") except Exception as e: # pylint:disable=C0103,W0703
import asyncio import time from collections import deque from telethon.tl.functions.channels import LeaveChannelRequest from userbot import CMD_HELP, bot from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd("leave$")) async def leave(e): if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): await e.edit("`I iz Leaving dis Lol Group kek!`") time.sleep(3) if "-" in str(e.chat_id): await bot(LeaveChannelRequest(e.chat_id)) else: await e.edit("`But Boss! This is Not A Chat`") @friday.on(friday_on_cmd(";__;$")) # @register(outgoing=True, pattern="^;__;$") async def fun(e): t = ";__;" for j in range(10): t = t[:-1] + "_;" await e.edit(t) @friday.on(friday_on_cmd("yo$"))
except Exception as err: return await event.edit("Something Went Wrong", str(err)) return user_obj, extra async def get_user_from_id(user, event): if isinstance(user, str): user = int(user) try: user_obj = await event.client.get_entity(user) except (TypeError, ValueError) as err: await event.edit(str(err)) return None return user_obj @friday.on(friday_on_cmd(pattern="gban ?(.*)")) async def gspider(userbot): lol = userbot sender = await lol.get_sender() me = await lol.client.get_me() if not sender.id == me.id: friday = await lol.reply("Gbanning This User !") else: friday = await lol.edit("Wait Processing.....") me = await userbot.client.get_me() await friday.edit(f"Global Ban Is Coming ! Wait And Watch You N***a") my_mention = "[{}](tg://user?id={})".format(me.first_name, me.id) f"@{me.username}" if me.username else my_mention await userbot.get_chat() a = b = 0 if userbot.is_private:
# Copyright (C) By StarkGang [@STARKXD] # Don't edit credits # Works On Bases Of Cyberboysumanjay's Inshorts News Api # Test import requests from userbot.utils import friday_on_cmd, edit_or_reply, sudo_cmd from var import Var newslog = Var.NEWS_CHANNEL_ID @friday.on(friday_on_cmd("news (.*)")) @friday.on(sudo_cmd("news (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return if Var.NEWS_CHANNEL_ID is None: await edit_or_reply( event, "`Please ADD NEWS_CHANNEL_ID For This Module To Work`") return infintyvar = event.pattern_match.group(1) main_url = f"https://inshortsapi.vercel.app/news?category={infintyvar}" stuber = await edit_or_reply( event, f"Ok ! Fectching {infintyvar} From inshortsapi Server And Sending To News Channel", ) await stuber.edit("All News Has Been Sucessfully Send To News Channel") starknews = requests.get(main_url).json() for item in starknews["data"]:
""".admin Plugin for @UniBorg""" from telethon.tl.types import ChannelParticipantsAdmins from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd("join")) async def _(event): if event.fwd_from: return mentions = "`━━━━━┓ \n┓┓┓┓┓┃\n┓┓┓┓┓┃ ヽ○ノ ⇦ Me When You Joined \n┓┓┓┓┓┃. / \n┓┓┓┓┓┃ ノ) \n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" reply_message = None if event.reply_to_msg_id: reply_message = await event.get_reply_message() await reply_message.reply(mentions) else: await event.reply(mentions) await event.delete() @friday.on(friday_on_cmd("pay")) async def _(event): if event.fwd_from: return mentions = "`█▀▀▀▀▀█░▀▀░░░█░░░░█▀▀▀▀▀█\n█░███░█░█▄░█▀▀░▄▄░█░███░█\n█░▀▀▀░█░▀█▀▀▄▀█▀▀░█░▀▀▀░█\n▀▀▀▀▀▀▀░▀▄▀▄▀▄█▄▀░▀▀▀▀▀▀▀\n█▀█▀▄▄▀░█▄░░░▀▀░▄█░▄▀█▀░▀\n░█▄▀░▄▀▀░░░▄▄▄█░▀▄▄▄▀▄▄▀▄\n░░▀█░▀▀▀▀▀▄█░▄░████ ██▀█▄\n▄▀█░░▄▀█▀█▀░█▄▀░▀█▄██▀░█▄\n░░▀▀▀░▀░█▄▀▀▄▄░▄█▀▀▀█░█▀▀\n█▀▀▀▀▀█░░██▀█░░▄█░▀░█▄░██\n█░███░█░▄▀█▀██▄▄▀▀█▀█▄░▄▄\n█░▀▀▀░█░█░░▀▀▀░█░▀▀▀▀▄█▀░\n▀▀▀▀▀▀▀░▀▀░░▀░▀░░░▀▀░▀▀▀▀`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f""
remainder, result = divmod(seconds, 60) else: remainder, result = divmod(seconds, 24) if seconds == 0 and remainder == 0: break time_list.append(int(result)) seconds = int(remainder) for x in range(len(time_list)): time_list[x] = str(time_list[x]) + time_suffix_list[x] if len(time_list) == 4: ping_time += time_list.pop() + ", " time_list.reverse() ping_time += ":".join(time_list) return ping_time # @command(pattern="^.latestupdate") @friday.on(friday_on_cmd(pattern="latestupdate")) async def _(event): if event.fwd_from: return start = datetime.now() await event.edit("Calculating Last Update or Restart Time") end = datetime.now() (end - start).microseconds / 1000 uptime = get_readable_time((time.time() - Lastupdate)) await event.edit(f"🔰 Friday Userbot Has Been Restarted Or Updated {uptime} Ago !")
"""Schedule Plugin for @UniBorg Syntax: .schd <time_in_seconds> ;=; <message to send>""" import asyncio from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd("schd ?(.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) ttl = 0 message = "SYNTAX: `.schd <time_in_seconds> = <message to send>`" if input_str: await event.delete() if "=" in input_str: ttl, message = input_str.split("=") elif event.reply_to_msg_id: await event.delete() ttl = int(input_str) message = await event.get_reply_message() await asyncio.sleep(int(ttl)) await event.respond(message) else: await event.edit(message)
"""File Converter .convert mp3 """ import asyncio import os import time from datetime import datetime from userbot.utils import friday_on_cmd, progress @friday.on(friday_on_cmd(pattern="convert (.*)")) # pylint:disable=E0602 async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) reply_message = await event.get_reply_message() if reply_message is None: await event.edit( "reply to a media to use the `nfc` operation.\nInspired by @FileConverterBot" ) return await event.edit("trying to download media file, to my local") try: start = datetime.now() c_time = time.time() downloaded_file_name = await borg.download_media( reply_message, Config.TMP_DOWNLOAD_DIRECTORY, progress_callback=lambda d, t: asyncio.get_event_loop(). create_task(progress(d, t, event, c_time, "trying to download")),
""" It does not do to dwell on dreams and forget to live Syntax: .getime""" import asyncio import os from datetime import datetime from PIL import Image, ImageDraw, ImageFont from userbot.utils import friday_on_cmd FONT_FILE_TO_USE = "Fonts/digital.ttf" @friday.on(friday_on_cmd("time ?(.*)")) # pylint:disable=E0602 async def _(event): if event.fwd_from: return current_time = datetime.now().strftime( "FRIDAY TIMEZONE \nLOCATION: India \nTime: %H:%M:%S \nDate: %d.%m.%y" ) start = datetime.now() input_str = event.pattern_match.group(1) reply_msg_id = event.message.id if input_str: current_time = input_str elif event.reply_to_msg_id: previous_message = await event.get_reply_message() reply_msg_id = previous_message.id if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): # pylint:disable=E0602 os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) # pylint:disable=E0602
# Lel, Didn't Get Time To Make New One So Used Plugin Made br @mrconfused and @sandy1709 dont edit credits import io import os import lyricsgenius from tswift import Song from userbot import CMD_HELP from userbot.utils import friday_on_cmd, edit_or_reply, sudo_cmd GENIUS = os.environ.get("GENIUS_API_TOKEN", None) @friday.on(friday_on_cmd(outgoing=True, pattern="lyrics (.*)")) @friday.on(sudo_cmd(pattern="lyrics (.*)", allow_sudo=True)) async def _(event): await edit_or_reply(event, "🌀 Searching for lyrics...") reply_to_id = event.message.id if event.reply_to_msg_id: reply_to_id = event.reply_to_msg_id reply = await event.get_reply_message() if event.pattern_match.group(1): query = event.pattern_match.group(1) elif reply.text: query = reply.message else: await edit_or_reply(event, "`❓Di kita gets beh, anong song title ba?`") return song = "" song = Song.find_song(query)
# For UniBorg # By Priyam Kalra # Syntax (.hl <link>) from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd(pattern="hl ?(.*)")) async def _(event): if event.fwd_from: return input = event.pattern_match.group(1) await event.edit("[ㅤㅤㅤㅤㅤㅤㅤ](" + input + ")")
"""Take screenshot of any website Syntax: .screencapture <Website URL>""" import io import requests from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd("screencapture (.*)")) async def _(event): if event.fwd_from: return if Config.SCREEN_SHOT_LAYER_ACCESS_KEY is None: await event.edit( "Need to get an API key from https://screenshotlayer.com/product \nModule stopping!" ) return await event.edit("Processing ...") sample_url = "https://api.screenshotlayer.com/api/capture?access_key={}&url={}&fullpage={}&viewport={}&format={}&force={}" input_str = event.pattern_match.group(1)
fy = "http://getwallpapers.com" + random.choice(f) print(fy) if not os.path.exists("f.ttf"): urllib.request.urlretrieve( "https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf", "f.ttf", ) urllib.request.urlretrieve(fy, "friday.jpg") @friday.on(friday_on_cmd(pattern="spacedp ?(.*)")) async def main(event): await event.edit( "**Starting Space Profile Pic...\n\nDone !!! Check Your DP" ) # Owner MarioDevs while True: await animepp() file = await event.client.upload_file("donottouch.jpg") await event.client(functions.photos.UploadProfilePhotoRequest(file)) os.system("rm -rf donottouch.jpg")
"""Get Telegram Profile Picture and other information and set as own profile. Syntax: .clone @username""" import asyncio import html from telethon.tl import functions from telethon.tl.functions.users import GetFullUserRequest from telethon.tl.types import MessageEntityMentionName from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd(pattern="clone ?(.*)")) async def _(event): if event.fwd_from: return reply_message = await event.get_reply_message() replied_user, error_i_a = await get_full_user(event) if replied_user is None: await event.edit(str(error_i_a)) return False user_id = replied_user.user.id profile_pic = await event.client.download_profile_photo( user_id, Config.TMP_DOWNLOAD_DIRECTORY) # some people have weird HTML in their names first_name = html.escape(replied_user.user.first_name) # https://stackoverflow.com/a/5072031/4723940 # some Deleted Accounts do not have first_name if first_name is not None:
Available Commands: .emoji shrug .emoji apple .emoji :/ .emoji -_-""" import asyncio from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd(pattern=r"(.*)")) async def _(event): if event.fwd_from: return animation_interval = 5 animation_ttl = range(0, 11) input_str = event.pattern_match.group(1) if input_str == "chod": await event.edit(input_str)
"""Emoji Available Commands: .wtf""" import asyncio from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd("wtf")) async def _(event): if event.fwd_from: return animation_interval = 0.3 animation_ttl = range(0, 5) await event.edit("wtf") animation_chars = [ "What", "What The", "What The F", "What The F Brah", "[What The F Brah](https://telegra.ph//file/f3b760e4a99340d331f9b.jpg)", ] for i in animation_ttl: await asyncio.sleep(animation_interval) await event.edit(animation_chars[i % 5])
import asyncio from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd(pattern=("sang ?(.*)"))) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: await event.edit("```Reply to any user message.```") return reply_message = await event.get_reply_message() if not reply_message.text: await event.edit("```reply to text message```") return chat = "@SangMataInfo_bot" reply_message.sender if reply_message.sender.bot: await event.edit("```Reply to actual users message.```") return await event.edit("```Processing```") async with borg.conversation(chat) as conv: try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=461843263)) await borg.forward_messages(chat, reply_message) response = await response
from telegraph import Telegraph, exceptions, upload_file from userbot.utils import friday_on_cmd telegraph = Telegraph() r = telegraph.create_account(short_name=Config.TELEGRAPH_SHORT_NAME) auth_url = r["auth_url"] if Config.PRIVATE_GROUP_ID is None: BOTLOG = False else: BOTLOG = True BOTLOG_CHATID = Config.PRIVATE_GROUP_ID @friday.on(friday_on_cmd(pattern="telegraph (media|text) ?(.*)")) async def _(event): if event.fwd_from: return if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) if BOTLOG: await borg.send_message( Config.PRIVATE_GROUP_ID, "Created New Telegraph account {} for the current session. \n**Do not give this url to anyone, even if they say they are from Telegram!**".format( auth_url ), ) optional_title = event.pattern_match.group(2) if event.reply_to_msg_id: start = datetime.now()
""" Get the Bots in any chat* Syntax: .get_bot""" from telethon.tl.types import ChannelParticipantAdmin, ChannelParticipantsBots from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd("get_bot ?(.*)")) async def _(event): if event.fwd_from: return mentions = "**Bots in this Channel**: \n" input_str = event.pattern_match.group(1) to_write_chat = await event.get_input_chat() chat = None if not input_str: chat = to_write_chat else: mentions = "Bots in {} channel: \n".format(input_str) try: chat = await borg.get_entity(input_str) except Exception as e: await event.edit(str(e)) return None try: async for x in borg.iter_participants(chat, filter=ChannelParticipantsBots): if isinstance(x.participant, ChannelParticipantAdmin): mentions += "\n ⚜️ [{}](tg://user?id={}) `{}`".format( x.first_name, x.id, x.id ) else:
int(snip.media_access_hash), snip.media_file_reference, ) else: media = None message_id = event.message.id if event.reply_to_msg_id: message_id = event.reply_to_msg_id await borg.send_message(event.chat_id, snip.reply, reply_to=message_id, file=media) await event.delete() @friday.on(friday_on_cmd("snips (.*)")) async def on_snip_save(event): name = event.pattern_match.group(1) msg = await event.get_reply_message() if msg: snip = {"type": TYPE_TEXT, "text": msg.message or ""} if msg.media: media = None if isinstance(msg.media, types.MessageMediaPhoto): media = utils.get_input_photo(msg.media.photo) snip["type"] = TYPE_PHOTO elif isinstance(msg.media, types.MessageMediaDocument): media = utils.get_input_document(msg.media.document) snip["type"] = TYPE_DOCUMENT if media: snip["id"] = media.id
# Modded from dagd.py """ Animate How To Google Command .ggl Search Query By @loxxi """ import requests from userbot.utils import friday_on_cmd @friday.on(friday_on_cmd("ggl (.*)")) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) sample_url = "https://da.gd/s?url=https://lmgtfy.com/?q={}%26iie=1".format( input_str.replace(" ", "+") ) response_api = requests.get(sample_url).text if response_api: await event.edit( "[{}]({})\n`Thank me Later 🙃` ".format(input_str, response_api.rstrip()) ) else: await event.edit("something is wrong. please try again later.")
from telethon.tl.functions.messages import GetStickerSetRequest from telethon.tl.types import ( DocumentAttributeSticker, InputStickerSetID, InputStickerSetShortName, MessageMediaPhoto, ) from userbot import ALIVE_NAME from userbot.utils import friday_on_cmd, edit_or_reply, sudo_cmd DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Who is this" FILLED_UP_DADDY = "Invalid pack selected." @friday.on(friday_on_cmd(pattern="salvasticker ?(.*)")) @friday.on(sudo_cmd(pattern="salvasticker ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return if not event.is_reply: await moods.edit("Reply to a photo to add to my personal sticker pack." ) return reply_message = await event.get_reply_message() sticker_emoji = "😎" input_str = event.pattern_match.group(1) if input_str: sticker_emoji = input_str moods = await edit_or_reply( event, "`Hello, This Sticker Looks Noice. Mind if I steal it`")
fy = "http://getwallpapers.com" + random.choice(f) print(fy) if not os.path.exists("f.ttf"): urllib.request.urlretrieve( "https://github.com/rebel6969/mym/raw/master/Rebel-robot-Regular.ttf", "f.ttf", ) urllib.request.urlretrieve(fy, "donottouch.jpg") @friday.on(friday_on_cmd(pattern="gamerdp ?(.*)")) async def main(event): await event.edit( "**Starting Gamer Profile Pic...\n\nDone !!! Check Your DP" ) # Owner @NihiNivi while True: await animepp() file = await event.client.upload_file("donottouch.jpg") await event.client(functions.photos.UploadProfilePhotoRequest(file)) os.system("rm -rf donottouch.jpg")
import zipfile from datetime import datetime from hachoir.metadata import extractMetadata from hachoir.parser import createParser from telethon.tl.types import DocumentAttributeVideo from userbot.utils import friday_on_cmd thumb_image_path = Config.TMP_DOWNLOAD_DIRECTORY + "/thumb_image.jpg" extracted = Config.TMP_DOWNLOAD_DIRECTORY + "extracted/" if not os.path.isdir(extracted): os.makedirs(extracted) @friday.on(friday_on_cmd(pattern="unzip")) async def _(event): if event.fwd_from: return mone = await event.edit("Processing ...") if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) if event.reply_to_msg_id: start = datetime.now() reply_message = await event.get_reply_message() try: time.time() downloaded_file_name = await borg.download_media( reply_message, Config.TMP_DOWNLOAD_DIRECTORY, )