"""COMMAND : .join , .pay , .work , .push , .aag , .climb, .ohh, .suckit, .lovestory, .bf""" import asyncio import random from telethon.tl.types import ChannelParticipantsAdmins from userbot import LOGS from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="join$", outgoing=True)) @bot.on(sudo_cmd(pattern="join$", allow_sudo=True)) 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 edit_or_reply(event, mentions) @bot.on(admin_cmd(pattern="pay$", outgoing=True)) @bot.on(sudo_cmd(pattern="pay$", allow_sudo=True))
.tts LanguageCode as reply to a message .tts LangaugeCode | text to speak""" import asyncio import os import subprocess from datetime import datetime from gtts import gTTS from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=r"tts (.*)")) @bot.on(sudo_cmd(pattern=r"tts (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) start = datetime.now() if event.reply_to_msg_id: previous_message = await event.get_reply_message() text = previous_message.message lan = input_str elif "|" in input_str: lan, text = input_str.split("|") else: await edit_or_reply(event, "Invalid Syntax. Module stopping.") return text = text.strip()
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 edit_or_reply(event, str(err)) return None return user_obj @bot.on(admin_cmd(pattern="gban ?(.*)")) @bot.on(sudo_cmd(pattern="gban ?(.*)", allow_sudo=True)) async def gban(userbot): if userbot.fwd_from: return ids = userbot sender = await ids.get_sender() hum = await ids.client.get_me() if not sender.id == hum.id: shinchanbot = await edit_or_reply(ids, "Trying to gban this retard!") else: shinchanbot = await edit_or_reply( ids, "`Ok! Gbaning this piece of shit....`") hum = await userbot.client.get_me() await shinchanbot.edit(f"`🔥Global Ban Iz Cumin💦.... Wait and watch n***a🚶`" ) my_mention = "[{}](tg://user?id={})".format(hum.first_name, hum.id)
"`If you want to gain health and beauty, you should wake up early. Good Morning!`", "`Birds are singing sweet melodies and a gentle breeze is blowing through the trees, what a perfect morning to wake you up. Good morning!`", "`This morning is so relaxing and beautiful that I really don’t want you to miss it in any way. So, wake up dear friend. A hearty good morning to you!`", "`Mornings come with a blank canvas. Paint it as you like and call it a day. Wake up now and start creating your perfect day. Good morning!`", "`Every morning brings you new hopes and new opportunities. Don’t miss any one of them while you’re sleeping. Good morning!`", "`Start your day with solid determination and great attitude. You’re going to have a good day today. Good morning my friend!`", "`Friendship is what makes life worth living. I want to thank you for being such a special friend of mine. Good morning to you!`", "`A friend like you is pretty hard to come by in life. I must consider myself lucky enough to have you. Good morning. Wish you an amazing day ahead!`", "`The more you count yourself as blessed, the more blessed you will be. Thank God for this beautiful morning and let friendship and love prevail this morning.`", "`Wake up and sip a cup of loving friendship. Eat your heart out from a plate of hope. To top it up, a fork full of kindness and love. Enough for a happy good morning!`", "`It is easy to imagine the world coming to an end. But it is difficult to imagine spending a day without my friends. Good morning.`", ] @bot.on(admin_cmd(pattern=f"love$", outgoing=True)) @bot.on(sudo_cmd(pattern=f"love$", allow_sudo=True)) async def love(e): txt = random.choice(LOVESTR) await edit_or_reply(e, txt) @bot.on(admin_cmd(pattern=f"dhoka$", outgoing=True)) @bot.on(sudo_cmd(pattern=f"dhoka$", allow_sudo=True)) async def katgya(e): txt = random.choice(DHOKA) await edit_or_reply(e, txt) @bot.on(admin_cmd(pattern=f"metoo$", outgoing=True)) @bot.on(sudo_cmd(pattern=f"metoo$", allow_sudo=True)) async def metoo(e):
# Enjoy from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from userbot import bot from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="nhentai(?: |$)(.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="nhentai(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return link = event.pattern_match.group() chat = "@nHentaiBot" await edit_or_reply(event, "```Processing```") async with bot.conversation(chat) as conv: try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=424466890)) await bot.send_message(chat, link) response = await response except YouBlockedUserError: await edit_or_reply( event, "```Please unblock @nHentaiBot and try again```") return if response.text.startswith("**Sorry I couldn't get manga from**"): await edit_or_reply(event, "```I think this is not the right link```")
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """WikiPedia.ORG Syntax: .wikipedia Query""" import wikipedia from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="wikipedia (.*)")) @bot.on(sudo_cmd(pattern="wikipedia (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return await edit_or_reply(event, "Processing ...") input_str = event.pattern_match.group(1) result = "" results = wikipedia.search(input_str) for s in results: page = wikipedia.page(s) url = page.url result += f"> [{s}]({url}) \n" await edit_or_reply( event, "WikiPedia **Search**: {} \n\n **Result**: \n\n{}".format( input_str, result)) CmdHelp("wikipedia").add_command( "wikipedia", "<query>", "Searches for the query from Wikipedia").add()
import asyncio from userbot import CMD_HELP from shinchanbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=f"quickheal$", outgoing=True)) @bot.on(sudo_cmd(pattern=f"quickheal$", allow_sudo=True)) async def _(event): if event.fwd_from: return animation_interval = 5 animation_ttl = range(11) event = await edit_or_reply(event, "quickheal") animation_chars = [ "`Downloading File..`", "`File Downloaded....`", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 0%\n▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 4%\n█▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 8%\n██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 20%\n█████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 36%\n█████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 52%\n█████████████▒▒▒▒▒▒▒▒▒▒▒▒ `", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 84%\n█████████████████████▒▒▒▒ `", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nFile Scanned... 100%\n█████████████████████████ `", "`Quick Heal Total Security Checkup\n\n\nSubscription: Pru User\nValid Until: 31/12/2099\n\nTask: 01 of 01 Files Scanned...\n\nResult: No Virus Found...`", ] for i in animation_ttl: await asyncio.sleep(animation_interval) await event.edit(animation_chars[i % 11])
from telethon.tl.types import ChatBannedRights from userbot import ALIVE_NAME, CMD_HELP from userbot.events import errors_handler, register from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp DEFAULTUSER = ( str(ALIVE_NAME) if ALIVE_NAME else "Set ALIVE_NAME in config vars in Heroku" ) Shinchan = bot.uid @bot.on(admin_cmd(pattern=r"lock ?(.*)", outgoing=True)) @bot.on(sudo_cmd(pattern=r"lock ?(.*)", allow_sudo=True)) @errors_handler async def locks(event): input_str = event.pattern_match.group(1).lower() peer_id = event.chat_id msg = None media = None sticker = None gif = None gamee = None ainline = None gpoll = None adduser = None cpin = None changeinfo = None if input_str == "msg":
"( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)", "ʕ•ᴥ•ʔ", "(▀ Ĺ̯▀ )", "(ง ͠° ͟ل͜ ͡°)ง", "༼ つ ◕_◕ ༽つ", "ಠ_ಠ", "(☞ ͡° ͜ʖ ͡°)☞", "¯\_༼ ି ~ ି ༽_/¯", "c༼ ͡° ͜ʖ ͡° ༽⊃", ] #✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓ @bot.on(admin_cmd(pattern=f"gendar$", outgoing=True)) @bot.on(sudo_cmd(pattern=f"gendar$", allow_sudo=True)) async def metoo(e): if e.fwd_from: return txt = random.choice(GENDER) await edit_or_reply(e, txt) @bot.on(admin_cmd(pattern=f"shrug$", outgoing=True)) @bot.on(sudo_cmd(pattern=f"shrug$", allow_sudo=True)) async def metoo(e): if e.fwd_from: return txt = random.choice(SHRUG) await edit_or_reply(e, txt)
from telethon import functions, types from telethon.errors import PhotoInvalidDimensionsError from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.functions.messages import SendMediaRequest from shinchanbot.utils import admin_cmd, edit_or_reply, progress, sudo_cmd from userbot import CMD_HELP from userbot.helpers.functions import unzip from userbot.cmdhelp import CmdHelp if not os.path.isdir("./temp"): os.makedirs("./temp") @bot.on(admin_cmd(pattern="stoi$")) @bot.on(sudo_cmd(pattern="stoi$", allow_sudo=True)) async def _(shinchan): if shinchan.fwd_from: return reply_to_id = shinchan.message.id if shinchan.reply_to_msg_id: reply_to_id = shinchan.reply_to_msg_id event = await edit_or_reply(shinchan, "Converting.....") if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) if event.reply_to_msg_id: filename = "hi.jpg" file_name = filename reply_message = await event.get_reply_message() to_download_directory = Config.TMP_DOWNLOAD_DIRECTORY downloaded_file_name = os.path.join(to_download_directory, file_name)
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 uptime = get_readable_time((time.time() - StartTime)) @bot.on(admin_cmd(outgoing=True, pattern="shinchan$")) @bot.on(sudo_cmd(pattern="shinchan$", allow_sudo=True)) async def amireallyalive(alive): if alive.fwd_from: return reply_to_id = await reply_id(alive) if SHINCHAN_IMG: shinchan_caption = f"**{CUSTOM_ALIVE_TEXT}**\n\n" shinchan_caption += f"≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈\n" shinchan_caption += f"__**𝔹𝕆𝕋 𝕊𝕋𝔸𝕋𝕌𝕊**__\n\n" shinchan_caption += f"**★ 𝕋𝕖𝕝𝕖𝕥𝕙𝕠𝕟 𝕧𝕖𝕣𝕤𝕚𝕠𝕟 :** `1.15.0`\n" shinchan_caption += f"**★ 𝕊ℍ𝕀ℕℂℍ𝔸ℕ𝔹𝕆𝕋 :**`{shinchanversion}`\n" shinchan_caption += f"**★ 𝕌𝕡𝕥𝕚𝕞𝕖 :** `{uptime}\n`" shinchan_caption += f"**★ 𝕄𝕒𝕤𝕥𝕖𝕣 :** {mention}\n" await alive.client.send_file(alive.chat_id, SHINCHAN_IMG,
"""Available Commands: .mf""" import asyncio from telethon import functions from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=r"dc")) # pylint:disable=E0602 @bot.on(sudo_cmd(pattern=r"dc", allow_sudo=True)) async def _(event): if event.fwd_from: return result = await borg(functions.help.GetNearestDcRequest()) # pylint:disable=E0602 await edit_or_reply(event, result.stringify()) @bot.on(admin_cmd(pattern=r"config")) # pylint:disable=E0602 @bot.on(sudo_cmd(pattern=r"config", allow_sudo=True)) async def _(event): if event.fwd_from: return result = await borg(functions.help.GetConfigRequest()) # pylint:disable=E0602 result = result.stringify() logger.info(result) # pylint:disable=E0602 await event.edit("""Telethon UserBot powered by @Shinchan_USERBOT""")
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2 from telethon.tl.types import ChannelParticipantsAdmins from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=r"tagall (.*)", outgoing=True)) @bot.on(sudo_cmd(pattern=r"tagall (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return mentions = event.pattern_match.group(1) chat = await event.get_input_chat() async for x in borg.iter_participants(chat, 100): mentions += f" \n [{x.first_name}](tg://user?id={x.id})" await event.reply(mentions) await event.delete() @bot.on(admin_cmd(pattern=r"admins", outgoing=True)) @bot.on(sudo_cmd(pattern=r"admins", allow_sudo=True)) async def _(event): if event.fwd_from: return mentions = "Administrators : " chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins):
.imdb """ import re import bs4 import requests from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp langi = "en" # kanged from Blank-x ;---; @bot.on(admin_cmd(pattern="imdb (.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="imdb (.*)", allow_sudo=True)) async def imdb(e): if e.fwd_from: return try: movie_name = e.pattern_match.group(1) remove_space = movie_name.split(" ") final_name = "+".join(remove_space) page = requests.get("https://www.imdb.com/find?ref_=nv_sr_fn&q=" + final_name + "&s=all") str(page.status_code) soup = bs4.BeautifulSoup(page.content, "lxml") odds = soup.findAll("tr", "odd") mov_title = odds[0].findNext("td").findNext("td").text mov_link = ("http://www.imdb.com/" + odds[0].findNext("td").findNext("td").a["href"])
name = event.raw_text snips = sql.get_chat_blacklist(event.chat_id) for snip in snips: pattern = r"( |^|[^\w])" + re.escape(snip) + r"( |$|[^\w])" if re.search(pattern, name, flags=re.IGNORECASE): try: await event.delete() except Exception: await event.reply( "I do not have DELETE permission in this chat") sql.rm_from_blacklist(event.chat_id, snip.lower()) break @bot.on(admin_cmd(pattern="addblacklist ((.|\n)*)")) @bot.on(sudo_cmd(pattern="addblacklist ((.|\n)*)", allow_sudo=True)) async def on_add_black_list(event): if event.fwd_from: return text = event.pattern_match.group(1) to_blacklist = list( {trigger.strip() for trigger in text.split("\n") if trigger.strip()}) for trigger in to_blacklist: sql.add_to_blacklist(event.chat_id, trigger.lower()) await edit_or_reply( event, "Added {} triggers to the blacklist in the current chat".format( len(to_blacklist)), )
from userbot.google_imgs import googleimagesdownload from shinchanbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.Config import Config async def reply_id(event): reply_to_id = None if event.sender_id in Config.SUDO_USERS: reply_to_id = event.id if event.reply_to_msg_id: reply_to_id = event.reply_to_msg_id return reply_to_id @bot.on(admin_cmd(pattern=r"img(?: |$)(\d*)? ?(.*)")) @bot.on(sudo_cmd(pattern=r"img(?: |$)(\d*)? ?(.*)", allow_sudo=True)) async def img_sampler(event): if event.fwd_from: return reply_to_id = await reply_id(event) if event.is_reply and not event.pattern_match.group(2): query = await event.get_reply_message() query = str(query.message) else: query = str(event.pattern_match.group(2)) if not query: return await edit_or_reply( event, "Reply to a message or pass a query to search!") cat = await edit_or_reply(event, "`Processing...`") if event.pattern_match.group(1) != "": lim = int(event.pattern_match.group(1))
import time from telethon.events import NewMessage from telethon.tl.custom import Dialog from telethon.tl.types import Channel, Chat, User from userbot import CMD_HELP from shinchanbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="stats$")) @bot.on(sudo_cmd(pattern="stats$", allow_sudo=True)) async def stats( event: NewMessage.Event, ) -> None: # pylint: disable = R0912, R0914, R0915 if event.fwd_from: return """Command to get stats about the account""" hell = await edit_or_reply(event, "`Collecting stats...`") start_time = time.time() private_chats = 0 bots = 0 groups = 0 broadcast_channels = 0 admin_in_groups = 0 creator_in_groups = 0 admin_in_broadcast_channels = 0 creator_in_channels = 0 unread_mentions = 0 unread = 0 dialog: Dialog
"Ⓟ", "Ⓠ", "Ⓡ", "Ⓢ", "Ⓣ", "Ⓤ", "Ⓥ", "Ⓦ", "Ⓧ", "Ⓨ", "Ⓩ", ] @bot.on(admin_cmd(pattern="weeb(?: |$)(.*)", command="weeb")) @bot.on(sudo_cmd(pattern="weeb(?: |$)(.*)", command="weeb", allow_sudo=True)) async def weebify(event): if event.fwd_from: return args = event.pattern_match.group(1) if not args: get = await event.get_reply_message() args = get.text if not args: await edit_or_reply(event, "`What I am Supposed to Weebify U Dumb`") return string = "".join(args).lower() for normiecharacter in string: if normiecharacter in normiefont: weebycharacter = weebyfont[normiefont.index(normiecharacter)] string = string.replace(normiecharacter, weebycharacter)
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from asyncio import sleep from telethon import events import telethon.utils from telethon.errors import rpcbaseerrors from shinchanbot.utils import admin_cmd, sudo_cmd, errors_handler from userbot import bot as shinchanbot from userbot import BOTLOG, BOTLOG_CHATID @shinchanbot.on(admin_cmd(outgoing=True, pattern="del$")) @shinchanbot.on(sudo_cmd(allow_sudo=True, pattern="del$")) @errors_handler async def delete_it(safai): """ For .del command, delete the replied message. """ msg_src = await safai.get_reply_message() if safai.reply_to_msg_id: try: await msg_src.delete() await safai.delete() if BOTLOG: await delme.client.send_message( BOTLOG_CHATID, "#DEL \nDeletion of message was successful" ) except rpcbaseerrors.BadRequestError: if BOTLOG: await delme.client.send_message(
# PLUGIN MADE BY DANGEROUSJATT # KEEP CREDIT # MADE FOR HELLBOT # BY TEAM HELLBOT # NOW IN SHINCHANBOT import math from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot import CmdHelp from userbot import bot as shinchanbot @shinchanbot.on(admin_cmd(pattern="sin ?(.*)")) @shinchanbot.on(sudo_cmd(pattern="sin ?(.*)", allow_sudo=True)) async def findsin(event): input_str = int(event.pattern_match.group(1)) output = math.sin(input_str) await event.edit(f"**Value of Sin** `{input_str}`\n== `{output}`") @shinchanbot.on(admin_cmd(pattern="cos ?(.*)")) @shinchanbot.on(sudo_cmd(pattern="cos ?(.*)", allow_sudo=True)) async def find_cos(event): input_str = int(event.pattern_match.group(1)) output = math.cos(input_str) await event.edit(f"**Value of Cos** `{input_str}`\n== `{output}`") @shinchanbot.on(admin_cmd(pattern="tan ?(.*)")) @shinchanbot.on(sudo_cmd(pattern="tan ?(.*)", allow_sudo=True))
"""Emoji Available Commands: .tp""" import asyncio from telethon import events from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="tp", outgoing=True)) @bot.on(sudo_cmd(pattern="tp", allow_sudo=True)) async def _(event): if event.fwd_from: return animation_interval = 0.3 animation_ttl = range(0, 28) # input_str = event.pattern_match.group(1) # if input_str == "tp": await edit_or_reply(event, "Time Pass...") animation_chars = [ "◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️", "◻️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️", "◼️◻️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️", "◼️◼️◻️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️", "◼️◼️◼️◻️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️", "◼️◼️◼️◼️◻️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️", "◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◻️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️", "◼️◼️◼️◼️◼️\n◼️◼️◼️◻️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️", "◼️◼️◼️◼️◼️\n◼️◼️◻️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️\n◼️◼️◼️◼️◼️",
"""Get Administrators of any Chat* Syntax: .userlist""" from telethon import events from telethon.errors.rpcerrorlist import MessageTooLongError from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=r"userlist ?(.*)", outgoing=True)) @bot.on(sudo_cmd(pattern=r"userlist ?(.*)", allow_sudo=True)) async def get_users(show): """ For .userslist command, list all of the users of the chat. """ if not show.text[0].isalpha() and show.text[0] not in ("/", "#", "@", "!"): if not show.is_group: await edit_or_reply(show, "Are you sure this is a group?") return info = await show.client.get_entity(show.chat_id) title = info.title if info.title else "this chat" mentions = "Users in {}: \n".format(title) try: if not show.pattern_match.group(1): async for user in show.client.iter_participants(show.chat_id): if not user.deleted: mentions += ( f"\n[{user.first_name}](tg://user?id={user.id}) `{user.id}`" ) else: mentions += f"\nDeleted Account `{user.id}`" else: searchq = show.pattern_match.group(1) async for user in show.client.iter_participants( show.chat_id, search=f"{searchq}"
from shinchanbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp # Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # # The entire source code is OSSRPL except 'whois' which is MPL # License: MPL and OSSRPL """ Userbot module for getiing info about any user on Telegram(including you!). """ @bot.on(admin_cmd(pattern="whois(?: |$)(.*)")) @bot.on(sudo_cmd(pattern="whois(?: |$)(.*)", allow_sudo=True)) async def who(event): if event.fwd_from: return shinchan = await edit_or_reply( event, "`Sit tight while I steal some data from This guuyyy...`" ) if not os.path.isdir(TEMP_DOWNLOAD_DIRECTORY): os.makedirs(TEMP_DOWNLOAD_DIRECTORY) replied_user = await get_user(event) try: photo, caption = await fetch_info(replied_user, event) except AttributeError: await edit_or_reply(event, "`Could not fetch info of that user.`") return message_id_to_reply = event.message.reply_to_msg_id
from userbot.plugins.sql_helper.mute_sql import is_muted, mute, unmute import asyncio from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp from telethon import events @bot.on(admin_cmd(pattern=r"gmute ?(\d+)?")) @bot.on(sudo_cmd(pattern=r"gmute ?(\d+)?", allow_sudo=True)) async def b*****b(event): private = False if event.fwd_from: return reply = await event.get_reply_message() user_id = reply.sender_id if user_id == (await borg.get_me()).id: await edit_or_reply( event, "I guess you need some rest. You are trying to gmute yourself😌") return elif event.is_private: await edit_or_reply(event, "`Son can't speak now🤐. Filled mouth with cum`💦") await asyncio.sleep(3) private = True reply = await event.get_reply_message() if event.pattern_match.group(1) is not None: userid = event.pattern_match.group(1) elif reply is not None: userid = reply.sender_id
import os import textwrap from PIL import Image, ImageDraw, ImageFont from shinchanbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp from var import Var # how a lazy guy ports. client = borg @bot.on(admin_cmd(pattern="memify ?(.*)")) @bot.on(sudo_cmd(pattern="memify ?(.*)", allow_sudo=True)) async def handler(event): if event.fwd_from: return if not event.reply_to_msg_id: await edit_or_reply(event, "You might want to try `.help memify`") return reply_message = await event.get_reply_message() if not reply_message.media: await edit_or_reply(event, "```Reply to a image/sticker.```") return file = await client.download_media(reply_message, Var.TEMP_DOWNLOAD_DIRECTORY) await edit_or_reply(event, "```Memifying this image! (」゚ロ゚)」 ```") text = str(event.pattern_match.group(1)).strip() if len(text) < 1:
"""File Converter .convert mp3 """ import asyncio import os import time from datetime import datetime from shinchanbot.utils import admin_cmd, progress, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="tomp3 (.*)")) @bot.on(sudo_cmd(pattern="tomp3 (.*)")) 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 edit_or_reply( event, "reply to a media to use the `nfc` operation.\nInspired by @FileConverterBot" ) return await edit_or_reply(event, "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,
# credits to @mrconfused import io import sys import traceback from userbot import CMD_HELP from shinchanbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="calc (.*)")) @bot.on(sudo_cmd(pattern="calc (.*)", allow_sudo=True)) async def _(car): if car.fwd_from: return cmd = car.text.split(" ", maxsplit=1)[1] event = await edit_or_reply(car, "Calculating ...") old_stderr = sys.stderr old_stdout = sys.stdout redirected_output = sys.stdout = io.StringIO() redirected_error = sys.stderr = io.StringIO() stdout, stderr, exc = None, None, None san = f"print({cmd})" try: await aexec(san, event) except Exception: exc = traceback.format_exc() stdout = redirected_output.getvalue() stderr = redirected_error.getvalue() sys.stdout = old_stdout sys.stderr = old_stderr
import asyncio import hashlib import json import os import time from datetime import datetime import aiohttp import magic import requests from shinchanbot.utils import admin_cmd, progress, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="verystream ?(.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="verystream ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return mone = await edit_or_reply(event, "Processing ...") if Config.VERY_STREAM_LOGIN is None or Config.VERY_STREAM_KEY is None: await mone.edit( "This module requires API key from https://verystream.com. Aborting!" ) return False input_str = event.pattern_match.group(1) if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) required_file_name = None start = datetime.now() if event.reply_to_msg_id and not input_str:
import re import urllib.parse from os import popen from random import choice import requests from bs4 import BeautifulSoup from humanize import naturalsize from userbot import CMD_HELP from shinchanbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(outgoing=True, pattern=r"direct(?: |$)([\s\S]*)")) @bot.on(sudo_cmd(allow_sudo=True, pattern=r"direct(?: |$)([\s\S]*)")) async def direct_link_generator(request): if request.fwd_from: return """ direct links generator """ shinchanevent = await edit_or_reply(request, "`Processing...`") textx = await request.get_reply_message() message = request.pattern_match.group(1) if message: pass elif textx: message = textx.text else: await shinchanevent.edit("`Usage: .direct <url>`") return reply = ""
) async def add_frame(imagefile, endname, x, color): image = Image.open(imagefile) inverted_image = PIL.ImageOps.expand(image, border=x, fill=color) inverted_image.save(endname) async def crop(imagefile, endname, x): image = Image.open(imagefile) inverted_image = PIL.ImageOps.crop(image, border=x) inverted_image.save(endname) @shinchanbot.on(admin_cmd(pattern="invert$", outgoing=True)) @shinchanbot.on(sudo_cmd(pattern="invert$", allow_sudo=True)) async def memes(shinchan): if shinchan.fwd_from: return reply = await shinchan.get_reply_message() if not (reply and (reply.media)): await edit_or_reply(shinchan, "`Reply to supported Media...`") return shinchanid = shinchan.reply_to_msg_id if not os.path.isdir("./temp/"): os.mkdir("./temp/") shinchan = await edit_or_reply(shinchan, "`Fetching media data`") from telethon.tl.functions.messages import ImportChatInviteRequest as Get await asyncio.sleep(2) shinchansticker = await reply.download_media(file="./temp/")