import nekos from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot import CMD_HELP from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="ftext ?(.*)")) @bot.on(sudo_cmd(pattern="ftext ?(.*)", allow_sudo=True)) async def payf(event): if event.fwd_from: return input_str = event.pattern_match.group(1) if input_str: paytext = input_str pay = "{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}".format( paytext * 8, paytext * 8, paytext * 2, paytext * 2, paytext * 2, paytext * 6, paytext * 6, paytext * 2, paytext * 2, paytext * 2, paytext * 2, paytext * 2, ) else: pay = "╭━━━╮\n┃╭━━╯\n┃╰━━╮\n┃╭━━╯\n┃┃\n╰╯\n"
"(╥_╥)", "(T⌓T)", "(༎ຶ⌑༎ຶ)", "(☍﹏⁰)。", "(ಥ_ʖಥ)", "(つд⊂)", "(≖͞_≖̥)", "(இ﹏இ`。)", "༼ಢ_ಢ༽", "༼ ༎ຶ ෴ ༎ຶ༽", ] # =========================================== @bot.on(admin_cmd(pattern="cri$", outgoing=True)) @bot.on(sudo_cmd(pattern="cri$", allow_sudo=True)) async def cri(e): """ y u du dis, i cry everytime !! """ if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): await edit_or_reply(e, random.choice(CRI)) @bot.on(admin_cmd(pattern="hey$", outgoing=True)) @bot.on(sudo_cmd(pattern="hey$", allow_sudo=True)) async def hoi(hello): """ Greet everyone! """ if not hello.text[0].isalpha() and hello.text[0] not in ("/", "#", "@", "!"): await edit_or_reply(hello, random.choice(HELLOSTR))
# Made By @Kraken_The_BadASS # Keep Credits else gay.... """Create Private Groups Available Commands: .create (b|g) GroupName""" from telethon.tl import functions from telethon.tl.types import MessageEntityMentionName from userbot import CMD_HELP from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="create (b|g|c) (.*)")) # pylint:disable=E0602 @bot.on(sudo_cmd(pattern="create (b|g|c) (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return type_of_group = event.pattern_match.group(1) group_name = event.pattern_match.group(2) event = await edit_or_reply(event, "Creating wait sar.....") if type_of_group == "b": try: result = await event.client( functions.messages.CreateChatRequest( # pylint:disable=E0602 users=["@sarah_robot"], # Not enough users (to create a chat, for example) # Telegram, no longer allows creating a chat with ourselves title=group_name, )) created_chat_id = result.chats[0].id
import asyncio from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=r"gf$", outgoing=True)) @bot.on(sudo_cmd(pattern=r"gf$", allow_sudo=True)) async def _(event): if event.fwd_from: return animation_interval = 5 animation_ttl = range(0, 21) animation_chars = [ "`Ruk jaa , Abhi teri GF ko F**k karta hu `", "`Making your Gf warm 🔥`", "`Pressing her boobs 🤚😘`", "`Stimulating her pussy🖕`", "`Fingering her pussy 💧😍👅 `", "`Asking her to taste my DICK🍌`", "`Requested accepted😻💋, Ready to taste my DICK🍌`", "`Getting her ready to f**k 👀`", "`Your GF Is Ready To F**k`", "`F*****g Your GF😈😈\n\n\nYour GF's Pussy Get Red\nTrying new SEX position to make her Squirt\n\nAlmost Done. 0%\n▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`F*****g Your GF😈😈\n\n\nYour GF's Pussy Get White\nShe squirted like a shower💧💦👅\n\nAlmost Done..\n\nFucked Percentage... 4%\n█▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`F*****g Your GF😈😈\n\n\nYour GF's Pussy Get Red\nDoing Extreme SEX with her👄\n\nAlmost Done...\n\nFucked Percentage... 8%\n██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`F*****g Your GF😈😈\n\n\nYour GF's Pussy Get Red\nWarming her Ass🍑 to F**k!🍑🍑\n\nAlmost Done....\n\nFucked Percentage... 20%\n█████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`F*****g Your GF😈😈\n\n\nYour GF's ASS🍑 Get Red\nInserted my Penis🍌 in her ASS🍑\n\nAlmost Done.....\n\nFucked Percentage... 36%\n█████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ `", "`F*****g Your GF😈😈\n\n\nYour GF's ASS🍑 Get Red\ndoing extreme sex with her\n\nAlmost Done......\n\nFucked Percentage... 52%\n█████████████▒▒▒▒▒▒▒▒▒▒▒▒ `", "`F*****g Your GF😈😈\n\n\nYour GF's Boobs🤚😘 are Awesome\nPressing her tight Nipples🤚👀\n\nAlmost Done.......\n\nFucked Percentage... 84%\n███████████████████▒▒▒▒▒▒ `", "`F*****g Your GF😈😈\n\n\nYour GF's Lips Get Horny\nDoing French Kiss with your GF👄💋\n\nAlmost Done........\n\nFucked Percentage... 89%\n██████████████████████▒▒▒ `",
import asyncio import io from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot import bot as darkbot from userbot import ALIVE_NAME DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "dark User" dark_logo = ".Harsh-78darkbot_logo.jpg" @darkbot.on(admin_cmd(pattern=r"cmds")) @darkbot.on(sudo_cmd(pattern=r"cmds", allow_sudo=True)) async def install(event): if event.fwd_from: return reply_to_id = event.message.id if event.reply_to_msg_id: reply_to_id = event.reply_to_msg_id cmd = "ls userbot/plugins" thumb = dark_logo process = await asyncio.create_subprocess_shell( cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) stdout, stderr = await process.communicate() o = stdout.decode() _o = o.split("\n") o = "\n".join(_o) OUTPUT = f"List of Plugins in darkbot :- \n\n{o}\n\n<><><><><><><><><><><><><><><><><><><><><><><><>\nHELP:- If you want to know the commands for a plugin, do :- \n.plinfo <plugin name> without the < > brackets. \nJoin https://t.me/darkbot_Chit_Chat for help." if len(OUTPUT) > 69: with io.BytesIO(str.encode(OUTPUT)) as out_file: out_file.name = "cmd_list.text"
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() @bot.on(admin_cmd(pattern="snips (.*)")) @bot.on(sudo_cmd(pattern="snips (.*)", allow_sudo=True)) 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
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="Dark$")) @bot.on(sudo_cmd(pattern="Dark$", allow_sudo=True)) async def amireallyalive(alive): if alive.fwd_from: return reply_to_id = await reply_id(alive) if dark_IMG: dark_caption = f"**{CUSTOM_ALIVE_TEXT}**\n\n" dark_caption += f"≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈\n" dark_caption += f"__**𝔹𝕆𝕋 𝕊𝕋𝔸𝕋𝕌𝕊**__\n\n" dark_caption += f"**★ 𝕋𝕖𝕝𝕖𝕥𝕙𝕠𝕟 𝕧𝕖𝕣𝕤𝕚𝕠𝕟 :** `1.15.0`\n" dark_caption += f"**★ 𝔻𝔸ℝ𝕂𝔹𝕆𝕋 :**`{darkversion}`\n" dark_caption += f"**★ 𝕌𝕡𝕥𝕚𝕞𝕖 :** `{uptime}\n`" dark_caption += f"**★ 𝕄𝕒𝕤𝕥𝕖𝕣 :** {mention}\n" await alive.client.send_file(alive.chat_id, dark_IMG,
import math import os import time from datetime import datetime from pySmartDL import SmartDL from userbot import ALIVE_NAME, CMD_HELP from darkbot.utils import admin_cmd, humanbytes, progress, sudo_cmd from userbot.cmdhelp import CmdHelp DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "dark User" @bot.on(admin_cmd(pattern="download(?: |$)(.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="download(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return mone = await edit_or_reply(event, "`Processing ...`") input_str = event.pattern_match.group(1) 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: c_time = time.time() downloaded_file_name = await event.client.download_media( reply_message, Config.TMP_DOWNLOAD_DIRECTORY,
send_media=None, send_stickers=None, send_gifs=None, send_games=None, send_inline=None, embed_links=None, ) MUTE_RIGHTS = ChatBannedRights(until_date=None, send_messages=True) UNMUTE_RIGHTS = ChatBannedRights(until_date=None, send_messages=False) # ================================================ @bot.on(admin_cmd(pattern=f"zombies ?(.*)")) @bot.on(sudo_cmd(pattern="zombies ?(.*)", allow_sudo=True)) async def rm_deletedacc(show): if show.fwd_from: return con = show.pattern_match.group(1).lower() del_u = 0 del_status = "`No zombies or deleted accounts found in this group, Group is clean`" if con != "clean": event = await edit_or_reply( show, "`Searching for ghost/deleted/zombie accounts...`") async for user in show.client.iter_participants(show.chat_id): if user.deleted: del_u += 1 await sleep(0.5) if del_u > 0: del_status = f"__Found__ **{del_u}** __ghost/deleted/zombie account(s) in this group,\
import os import textwrap from PIL import Image, ImageDraw, ImageFont from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply @bot.on(admin_cmd(pattern=r"mmf ?(.*)")) @bot.on(sudo_cmd(pattern=r"mmf ?(.*)", allow_sudo=True)) async def handler(event): if event.fwd_from: return if not event.reply_to_msg_id: await edit_or_reply(event, "Usage:- `memify upper text ; lower text`") 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 borg.download_media(reply_message,
"Ⓟ", "Ⓠ", "Ⓡ", "Ⓢ", "Ⓣ", "Ⓤ", "Ⓥ", "Ⓦ", "Ⓧ", "Ⓨ", "Ⓩ", ] @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)
.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 userbot import CMD_HELP from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="voice (.*)")) @bot.on(sudo_cmd(pattern="voice (.*)", 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 event.edit("Invalid Syntax. Module stopping.") return text = text.strip()
import asyncio from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="undlt")) @bot.on(sudo_cmd(pattern="undlt", allow_sudo=True)) async def _(event): if event.fwd_from: return c = await event.get_chat() if c.admin_rights or c.creator: a = await borg.get_admin_log(event.chat_id, limit=5, search="", edit=False, delete=True) for i in a: await event.reply(i.original.action.message) else: await edit_or_reply( event, "You need administrative permissions in order to do this command") await asyncio.sleep(3) await event.delete() CmdHelp("undlt").add_command( "undlt", None, "Sends 5 recently deleted message from that group. Requires admin position"
# 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 datetime import datetime import requests from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="xtools (.*)")) @bot.on(sudo_cmd(pattern="xtools (.*)", 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() username = previous_message.message sub_domain = input_str else: sub_domain, username = input_str.split("|") final_url = "https://xtools.wmflabs.org/api/user/simple_editcount/{}.wikipedia.org/{}".format( sub_domain, username) json_string = requests.get(final_url).json() result_text = json_string["liveEditCount"] end = datetime.now() ms = (end - start).seconds output_str = "edit count of {} ({}) in {} seconds. \n {}".format(
import asyncio import hashlib import json import os import time from datetime import datetime import aiohttp import magic import requests from darkbot.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:
)[metadata.has("duration")] / 2)), "-filter:v", "scale={}:-1".format(width), "-vframes", "1", output, ], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, ) if not p.returncode and os.path.lexists(file): return output @bot.on(admin_cmd(pattern="rename (.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="rename (.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return await edit_or_reply( event, "Renaming in process 🙄🙇♂️🙇♂️🙇♀️ It might take some time if file size is big" ) input_str = event.pattern_match.group(1) if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY): os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY) if event.reply_to_msg_id: start = datetime.now() file_name = input_str reply_message = await event.get_reply_message() # c_time = time.time()
import io from random import randint, uniform from PIL import Image, ImageEnhance, ImageOps from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.types import DocumentAttributeFilename from userbot import CMD_HELP from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="frybot$")) @bot.on(sudo_cmd(pattern="frybot$", allow_sudo=True)) async def _(event): if event.fwd_from: return if not event.reply_to_msg_id: event = await edit_or_reply(event, "Reply to any user message.") return reply_message = await event.get_reply_message() if event.is_reply: reply_message = await event.get_reply_message() data = await check_media(reply_message) if isinstance(data, bool): event = await edit_or_reply(event, "`I can't deep fry that!`") return if not event.is_reply: event = await edit_or_reply(
from telethon.tl.functions.messages import ImportChatInviteRequest as Get from userbot import CMD_HELP from userbot.helpers.functions import ( awooify, baguette, convert_toimage, iphonex, lolice, ) from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="mask$", outgoing=True)) @bot.on(sudo_cmd(pattern="mask$", allow_sudo=True)) async def _(darkbot): reply_message = await darkbot.get_reply_message() if not reply_message.media or not reply_message: await edit_or_reply(darkbot, "```reply to media message```") return chat = "@hazmat_suit_bot" if reply_message.sender.bot: await edit_or_reply(darkbot, "```Reply to actual users message.```") return event = await darkbot.edit("```Processing```") async with darkbot.client.conversation(chat) as conv: try: response = conv.wait_event( events.NewMessage(incoming=True, from_users=905164246) )
from userbot import ALIVE_NAME, CMD_HELP from darkbot.utils import admin_cmd, edit_or_reply, sudo_cmd from userbot.cmdhelp import CmdHelp DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "dark User" USERID = bot.uid mention = f"[{DEFAULTUSER}](tg://user?id={USERID})" @bot.on(admin_cmd(pattern="carry (.*)")) @bot.on(sudo_cmd(pattern="carry (.*)", allow_sudo=True)) async def kraken(carry): if carry.fwd_from: return name = carry.pattern_match.group(1) await edit_or_reply( carry, f"**Carry ~> {name} .**\n\n ⣤⣶⣶⣶⣦⣤⣄⡀\n⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀\n⠀⠀⠀⢀⣾⣿⣿⣿⠿⠿⠟⠻⠿⢿⣿⣿⣿⡆\n⠀⠀⠀⢰⣿⣿⡿⠂⠀⠀⠀⠀⠀⠀ ⠈⠉⢻⡇ \n⠀⠀⠀⠈⠿⣿⣇⣠⠤⠤⠤⢤⣀⣤⠤⠤⣺⡏ \n⠀⠀⠀⠀⠐⢉⣯⠹⣀⣀⣢⡸⠉⢏⡄⣀⣯⠁ \n⠀⠀⠀⠀⠡⠀⢹⣆⠀⠀⠀⣀⡀⡰⠀⢠⠖⠂ \n⠀⠀⠀⠀⠀⠈⠙⣿⣿⠀⠠⠚⢋⡁⠀⡜ \n⠀⠀⠀⠀⠀⠀⢸⠈⠙⠦⣤⣀⣤⣤⡼⠁ \n⠀⠀⠀ ⠀⢀⡌⠀⠀⠀⠀ ⠉⢏⡉ \n⠀⠀⠀⣀⣴⣿⣷⣶⣤⣤⣤⣴⣾⣷⣶⣦⡀ \n⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄ \n⠚⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛", ) @bot.on(admin_cmd(pattern="ded (.*)")) @bot.on(sudo_cmd(pattern="ded (.*)", allow_sudo=True)) async def kraken(ded): if ded.fwd_from: return name = ded.pattern_match.group(1) await edit_or_reply( ded,
"language": language, } r = requests.post( "https://api.ocr.space/parse/image", data=payload, ) return r.json() def progress(current, total): logger.info("Downloaded {} of {}\nCompleted {}".format( current, total, (current / total) * 100)) @bot.on(admin_cmd(pattern="ocrlang", outgoing=True)) @bot.on(sudo_cmd(pattern="ocrlang", allow_sudo=True)) async def get_ocr_languages(event): if event.fwd_from: return languages = {} languages["English"] = "eng" languages["Arabic"] = "ara" languages["Bulgarian"] = "bul" languages["Chinese (Simplified)"] = "chs" languages["Chinese (Traditional)"] = "cht" languages["Croatian"] = "hrv" languages["Czech"] = "cze" languages["Danish"] = "dan" languages["Dutch"] = "dut" languages["Finnish"] = "fin" languages["French"] = "fre"
await asyncio.sleep(10) await no_admin_privilege_message.edit( "This is useless SPAM dude. Stop this, enjoy chat man ", link_preview=False) else: await event.client.send_message( entity=event.chat_id, message="""**Automatic AntiFlooder** [User](tg://user?id={}) has been automatically restricted because he reached the defined flood limit.""".format(event.message.sender_id), reply_to=event.message.id, ) @bot.on(admin_cmd(pattern="setflood(?: |$)(.*)")) @bot.on(sudo_cmd(pattern="setflood(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return input_str = event.pattern_match.group(1) event = await edit_or_reply(event, "updating flood settings!") try: sql.set_flood(event.chat_id, input_str) sql.__load_flood_settings() await event.edit( "Antiflood updated to {} in the current chat".format(input_str)) except Exception as e: # pylint:disable=C0103,W0703 await event.edit(str(e)) CmdHelp("antiflood").add_command(
return None except (TypeError, ValueError): await event.reply("`Invalid channel/group`") return None return chat_info def user_full_name(user): names = [user.first_name, user.last_name] names = [i for i in list(names) if i] full_name = " ".join(names) return full_name @bot.on(admin_cmd(pattern="inviteall ?(.*)")) @bot.on(sudo_cmd(pattern="inviteall ?(.*)", allow_sudo=True)) async def get_users(event): sender = await event.get_sender() me = await event.client.get_me() if not sender.id == me.id: dark = await edit_or_reply(event, "`processing...`") else: dark = await edit_or_reply(event, "`processing...`") kraken = await get_chatinfo(event) chat = await event.get_chat() if event.is_private: return await dark.edit("`Sorry, Cant add users here`") s = 0 f = 0 error = "None"
import asyncio import base64 import os from telethon import functions, types from telethon.tl.functions.messages import ImportChatInviteRequest as Get from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp from darkbot.Config import Config SUDO_WALA = Config.SUDO_USERS @bot.on(admin_cmd(pattern="spam (.*)")) @bot.on(sudo_cmd(pattern="spam (.*)", allow_sudo=True)) async def spammer(e): if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): message = e.text counter = int(message[6:8]) spam_message = str(e.text[8:]) await asyncio.wait([e.respond(spam_message) for i in range(counter)]) await e.delete() if LOGGER: await e.client.send_message( LOGGER_GROUP, "#SPAM \n\n" "Spam was executed successfully") @bot.on(admin_cmd(pattern="bigspam")) @bot.on(sudo_cmd(pattern="bigspam", allow_sudo=True))
# Credits to @spechide and his team for @TROLLVOICEBOT # made by @h1m4n5hu0p_the_badass from the snippets of waifu AKA stickerizerbot.... # kang karega kya madarchod? # aukaat h bsdk teri...jake baap ka loda chus ke aa.... import re from userbot import bot from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp from userbot.helpers.functions import deEmojify @bot.on(admin_cmd(pattern="mev(?: |$)(.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="mev(?: |$)(.*)", allow_sudo=True)) async def nope(h1m4n5hu0p): dark = h1m4n5hu0p.pattern_match.group(1) if not dark: if h1m4n5hu0p.is_reply: (await h1m4n5hu0p.get_reply_message()).message else: await edit_or_reply( h1m4n5hu0p, "`Sir please give some query to search and download it for you..!`" ) return troll = await bot.inline_query("TrollVoiceBot", f"{(deEmojify(dark))}") await troll[0].click( h1m4n5hu0p.chat_id,
# 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. # """ Userbot plugin_info command """ from userbot import CMD_HELP from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern=r"plinfo(?: |$)(.*)")) @bot.on(sudo_cmd(pattern=r"plinfo(?: |$)(.*)", allow_sudo=True)) async def info(event): """ For .plinfo command,""" args = event.pattern_match.group(1).lower() if args: if args in CmdHelp: await edit_or_reply(event, str(CmdHelp[args])) else: await edit_or_reply(event, "Please specify a valid plugin name.") else: await edit_or_reply( event, "Please specify which plugin do you want help for !!\ \nUsage: .plinfo <plugin name>") string = "" for i in CmdHelp: string += "`" + str(i) string += "`\n" await event.reply(string)
Syntax: .getime""" import asyncio import os from datetime import datetime from PIL import Image, ImageDraw, ImageFont from darkbot.utils import admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp FONT_FILE_TO_USE = "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf" @bot.on(admin_cmd(pattern="time ?(.*)", outgoing=True)) # pylint:disable=E0602 @bot.on(sudo_cmd(pattern="time ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return current_time = datetime.now().strftime( "⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ \ndarkbot TIMEZONE \n LOCATION: India🇮🇳 \n Time: %H:%M:%S \n Date: %d.%m.%y \n⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡" ) 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
# you may not use this file except in compliance with the License. # """ Userbot module containing hash and encode/decode commands. """ from subprocess import PIPE from subprocess import run as runapp import pybase64 #from userbot import CMD_HELP from darkbot.utils import errors_handler, admin_cmd, sudo_cmd, edit_or_reply from userbot.cmdhelp import CmdHelp @bot.on(admin_cmd(pattern="hash (.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="hash (.*)", allow_sudo=True)) @errors_handler async def gethash(hash_q): if hash_q.fwd_from: return """ For .hash command, find the md5, sha1, sha256, sha512 of the string. """ hashtxt_ = hash_q.pattern_match.group(1) hashtxt = open("hashdis.txt", "w+") hashtxt.write(hashtxt_) hashtxt.close() md5 = runapp(["md5sum", "hashdis.txt"], stdout=PIPE) md5 = md5.stdout.decode() sha1 = runapp(["sha1sum", "hashdis.txt"], stdout=PIPE) sha1 = sha1.stdout.decode() sha256 = runapp(["sha256sum", "hashdis.txt"], stdout=PIPE) sha256 = sha256.stdout.decode()
# display iterables one after another at the base indentation level result.append("\n") indent += 2 for x in obj: result.append(" " * indent) result.append(yaml_format(x, indent)) result.append("\n") result.pop() indent -= 2 result.append(" " * indent) else: result.append(repr(obj)) return "".join(result) @bot.on(admin_cmd(pattern=r"new", outgoing=True)) @bot.on(sudo_cmd(pattern=r"new", allow_sudo=True)) async def _(event): if not event.message.is_reply: return msg = await event.message.get_reply_message() yaml_text = yaml_format(msg) await edit_or_reply(event, yaml_text, parse_mode=parse_pre) CmdHelp("new").add_command( "new", None, "Pretty formats the given object as a YAML string which is returned.(based on TLObject.pretty_format)" ).add()
await var.edit("`Getting information to deleting variable...`") try: variable = var.pattern_match.group(2).split()[0] except IndexError: return await var.edit( "`Please specify ConfigVars you want to delete`") await asyncio.sleep(1.5) if variable in heroku_var: await var.edit(f"**{variable}** `successfully deleted`") del heroku_var[variable] else: return await var.edit(f"**{variable}** `is not exists`") @bot.on(admin_cmd(pattern="usage(?: |$)", outgoing=True)) @bot.on(sudo_cmd(pattern="usage(?: |$)", allow_sudo=True)) async def dyno_usage(dyno): if dyno.fwd_from: return """ Get your account Dyno Usage """ await edit_or_reply(dyno, "`Processing...`") useragent = ("Mozilla/5.0 (Linux; Android 10; SM-G975F) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/80.0.3987.149 Mobile Safari/537.36") user_id = Heroku.account().id headers = { "User-Agent": useragent, "Authorization": f"Bearer {Var.HEROKU_API_KEY}", "Accept": "application/vnd.heroku+json; version=3.account-quotas",
os.remove(image) return filename def convert_tosticker(response, filename=None): filename = filename or os.path.join("./temp/", "temp.webp") image = Image.open(response) if image.mode != "RGB": image.convert("RGB") image.save(filename, "webp") os.remove(response) return filename @bot.on(admin_cmd(pattern="(rmbg|srmbg) ?(.*)")) @bot.on(sudo_cmd(pattern="(rmbg|srmbg) ?(.*)", allow_sudo=True)) async def remove_background(event): if Config.REM_BG_API_KEY is None: return await edit_or_reply( event, "You have to set `REM_BG_API_KEY` in Config vars with API token from remove.bg to use this module" ) cmd = event.pattern_match.group(1) input_str = event.pattern_match.group(2) message_id = await reply_id(event) if event.reply_to_msg_id and not input_str: reply_message = await event.get_reply_message() darkevent = await edit_or_reply(event, "`Analysing...`") file_name = os.path.join(TEMP_DIR, "rmbg.png") try: await event.client.download_media(reply_message, file_name)