Exemplo n.º 1
0
"""

Available Commands:

.sux

.fuk

.kiss"""

import asyncio

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd("f**k"))
async def _(event):

    if event.fwd_from:

        return

    animation_interval = 1

    animation_ttl = range(0, 101)

    # input_str = event.pattern_match.group(1)

    # if input_str == "fuk":

    await event.edit("fuk")
Exemplo n.º 2
0
""" tiktok downloaded plugin creted by @mrconfused and @sandy1709 


Dont edit credits """
from telethon.errors.rpcerrorlist import YouBlockedUserError

from userbot import CMD_HELP
from userbot.utils import lightning_cmd


@borg.on(lightning_cmd("tti ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    d_link = event.pattern_match.group(1)
    if ".com" not in d_link:
        await event.edit("` I need a link to download something pro.`**(._.)**"
                         )
        return
    else:
        await event.edit("downloading your video")

    async with borg.conversation("@HK_tiktok_BOT") as conv:
        try:
            await conv.send_message(d_link)
            await conv.get_response()
            details = await conv.get_response()
            if details.text.startswith("Sorry"):
                await borg.send_message(event.chat_id,
                                        "sorry . something went wrong")
                return
Exemplo n.º 3
0
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 lightning_cmd


@borg.on(lightning_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`")


@borg.on(lightning_cmd(";__;$"))
# @register(outgoing=True, pattern="^;__;$")
async def fun(e):
    t = ";__;"
    for j in range(10):
        t = t[:-1] + "_;"
        await e.edit(t)


@borg.on(lightning_cmd("yo$"))
Exemplo n.º 4
0
import shutil
from datetime import datetime

from PIL import Image, ImageDraw, ImageFont
from pySmartDL import SmartDL
from telethon.tl import functions

from userbot import ALIVE_NAME
from userbot.utils import lightning_cmd

FONT_FILE_TO_USE = "Fonts/digital.ttf"

DEFAULTUSER = str(ALIVE_NAME)


@borg.on(lightning_cmd(pattern="cpp ?(.*)"))
async def autopic(event):

    await event.edit("colour profile pic have been enabled")

    downloaded_file_name = "./LIGHTNING/original_pic.png"

    downloader = SmartDL(Var.DOWNLOAD_PFP_URL_CLOCK,
                         downloaded_file_name,
                         progress_bar=False)

    downloader.start(blocking=False)

    photo = "photo_pfp.png"

    while not downloader.isFinished():
Exemplo n.º 5
0
# plugin made by @hellboi_atul bug fixes by @Mrconfused
# Copyright (C) DARK COBRA 2020.
# if you change these lines you are gay...bc f**k off!
# leechers stay away😑...if you use this code without credit...u gay bitch f**k off...!

import asyncio

from telethon.errors.rpcerrorlist import YouBlockedUserError

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd(pattern="gaana ?(.*)"))
async def FindMusicPleaseBot(gaana):

    song = gaana.pattern_match.group(1)

    chat = "@FindMusicPleaseBot"

    if not song:

        return await gaana.edit("```what should i search```")

    await gaana.edit("```Getting Your Music```")

    await asyncio.sleep(2)

    async with bot.conversation(chat) as conv:

        await gaana.edit("`Downloading...Please wait`")
Exemplo n.º 6
0
    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")


@borg.on(lightning_cmd(pattern="fire ?(.*)"))
async def main(event):

    await event.edit(
        "**Uplaoding Walpapers \n please wait...\n\nDone !!! Check Your DP")

    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")
Exemplo n.º 7
0
.tgm  as reply to a media
.tgm text as reply to a large text"""
import os
from datetime import datetime

from PIL import Image
from telegraph import Telegraph, exceptions, upload_file

from userbot.utils import lightning_cmd

telegraph = Telegraph()
r = telegraph.create_account(short_name=Config.TELEGRAPH_SHORT_NAME)
auth_url = r["auth_url"]


@borg.on(lightning_cmd("telegraph ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    if Config.PLUGIN_CHANNEL is None:
        await event.edit(
            "Please set the required environment variable `PLUGIN_CHANNEL` for this plugin to work"
        )
        return
    if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
        os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
    await borg.send_message(
        Config.PLUGIN_CHANNEL,
        "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),
    )
Exemplo n.º 8
0
    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")


@borg.on(lightning_cmd(pattern="avengersdp ?(.*)"))
async def main(event):

    await event.edit(
        "**Starting Avengers Profile Pic...\n\nDone !!! Check Your DP By @blacklightningot**"
    )

    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")
Exemplo n.º 9
0
    kirsh += ":".join(time_list)

    return kirsh


DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "ℓιgнтηιηg υѕєя"

TG = str(TG_GRUP) if TG_GRUP else "Not  Yet😁😁"
TG_CHANN = str(TG_CHANNEL) if TG_CHANNEL else "Not Yet😁😁"

from userbot import CMD_LIST

lightning_cap = "**𝕭𝖑𝖆𝖈𝖐 𝕷𝖎𝖌𝖍𝖙𝖓𝖎𝖓𝖌 IS `[O̲̅][n̲̅][l̲̅][i̲̅][n̲̅][e̲̅]`**\n\n"
lightning_cap += f"**†rïdεη† レïgh†'š mαš†εr**   : {DEFAULTUSER}\n"
lightning_cap += f"{DEFAULTUSER}'s 𝔊𝔯𝔬𝔲𝔭:   {TG}\n"
lightning_cap += f"{DEFAULTUSER}'s ℭ𝔥𝔞𝔫𝔫𝔢𝔩:   {TG_CHANN}\n\n"
lightning_cap += f"`𝕋𝕖𝕝𝕖𝕥𝕙𝕠𝕟 𝕍𝕖𝕣𝕤𝕚𝕠𝕟`:   {__version__}\n"
lightning_cap += "`ℙ𝕪𝕥𝕙𝕠𝕟 𝕍𝕖𝕣𝕤𝕚𝕠𝕟`:    3.9.0\n"
lightning_cap += "`𓂀 𝐿𝒾𝑔𝒽𝓉𝓃𝒾𝓃𝑔 𝒞𝒽𝒶𝓃𝓃𝑒𝓁 𓂀`:   [J̳o̳i̳n̳](https://t.me/black_lightning_Channel)\n"
lightning_cap += "`𓂀 𝐿𝒾𝑔𝒽𝓉𝓃𝒾𝓃𝑔 𝒮𝓊𝓅𝓅𝑜𝓇𝓉 𓂀`:   [J̳o̳i̳n̳](https://t.me/lightning_support_Group)\n"
lightning_cap += "`一═デ︻ ¢σρуяιgнт σωηєя ︻デ═一`:   [𝙺𝙴𝙸𝙽𝚂𝙷𝙸𝙽](https://t.me//krish1303y)\n"


@borg.on(lightning_cmd(pattern="alive$"))
@borg.on(sudo_cmd(pattern="alive$", allow_sudo=True))
async def lightning(alive):
    await alive.get_chat()
    """ For .alive command, check if the bot is running.  """
    await borg.send_file(alive.chat_id, ALV_LIGHTNING, caption=lightning_cap)
    await alive.delete()
Exemplo n.º 10
0
""" 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 Var, lightning_cmd

FONT_FILE_TO_USE = "/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf"


@borg.on(lightning_cmd("time ?(.*)"))  # pylint:disable=E0602
async def _(event):
    if event.fwd_from:
        return
    current_time = datetime.now().strftime(
        "⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡ \nBlakc lightning 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(Var.TEMP_DOWNLOAD_DIRECTORY):  # pylint:disable=E0602
        os.makedirs(Var.TEMP_DOWNLOAD_DIRECTORY)  # pylint:disable=E0602
Exemplo n.º 11
0
        chat = await event.get_chat()
        if chat.id not in NO_PM_LOG_USERS and chat.id != borg.uid:
            try:
                e = await borg.get_entity(int(Config.PM_LOGGR_BOT_API_ID))
                fwd_message = await borg.forward_messages(e,
                                                          event.message,
                                                          silent=True)
            except Exception as e:
                # logger.warn(str(e))
                exc_type, exc_obj, exc_tb = sys.exc_info()
                fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
                print(exc_type, fname, exc_tb.tb_lineno)
                print(e)


@borg.on(lightning_cmd(pattern="elog ?(.*)"))
async def set_no_log_p_m(event):
    if Config.PM_LOGGR_BOT_API_ID is not None:
        event.pattern_match.group(1)
        chat = await event.get_chat()
        if event.is_private:
            if chat.id in NO_PM_LOG_USERS:
                NO_PM_LOG_USERS.remove(chat.id)
                await event.edit("Will Log Messages from this chat")
                await asyncio.sleep(3)
                await event.delete()


@borg.on(lightning_cmd(pattern="nlog ?(.*)"))
async def set_no_log_p_m(event):
    if Config.PM_LOGGR_BOT_API_ID is not None:
Exemplo n.º 12
0
    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")


@borg.on(lightning_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")
Exemplo n.º 13
0
# (c) @UniBorg

import asyncio
from collections import deque

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd(pattern=r"moon", outgoing=True))
async def _(event):
    if event.fwd_from:
        return
    deq = deque(list("🌗🌘🌑🌒🌓🌔🌕🌖"))
    for _ in range(32):
        await asyncio.sleep(0.1)
        await event.edit("".join(deq))
        deq.rotate(1)
Exemplo n.º 14
0
pm_caption += "➥ **SYSTEMS STATS**\n"
pm_caption += "➥ **Telethon Version:** `1.15.0` \n"
pm_caption += "➥ **Python:** `3.7.4` \n"
pm_caption += f"➥ **Uptime** : `{uptime}` \n"
pm_caption += "➥ **Database Status:**  `Functional`\n"
pm_caption += "➥ **Current Branch** : `master`\n"
pm_caption += f"➥ **Version** : `{telever}`\n"
pm_caption += f"➥ **My Boss** : {DEFAULTUSER} \n"
pm_caption += "➥ **Heroku Database** : `AWS - Working Properly`\n\n"
pm_caption += "➥ **License** : [GNU General Public License v3.0](https://github.com/Anmol-dot283/Black-Lightning)\n"
pm_caption += "➥ **Copyright** : By [KeinShin@Github](GitHub.com/StarkGang)\n"
pm_caption += "➥ **Check Stats By Doing** `.stat`. \n\n"
pm_caption += "[🇮🇳 Deploy ����� ���������Userbot 🇮🇳](https://telegra.ph/FRIDAY-06-15)"


@borg.on(lightning_cmd(pattern=r"fralive"))
@borg.on(sudo_cmd(pattern=r"fralive", allow_sudo=True))
async def friday(alive):
    await alive.get_chat()
    """ For .salive command, check if the bot is running.  """
    await borg.send_file(alive.chat_id, PM_IMG, caption=pm_caption)
    await alive.delete()


CMD_HELP.update({
    "salive":
    "**sLive**\
\n\n**Syntax : **`.salive`\
\n**Usage :** Check if UserBot is salive"
})
Exemplo n.º 15
0
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd("grab ?(.*)"))
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.media:
        await event.edit("```reply to text message```")
        return
    chat = "@ThemerBot"
    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=864838521))
            await borg.forward_messages(chat, reply_message)
            response = await response
        except YouBlockedUserError:
            await event.reply(
Exemplo n.º 16
0
from userbot.Config import Var
from userbot.utils import lightning_cmd
import asyncio
from .. import ALIVE_NAME, CMD_HELP

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Black Lightning"
DEFAULTUSERBIO = "404: No bio found!"
if Var.PRIVATE_GROUP_ID is None:
    BOTLOG = False
else:
    BOTLOG = True
    BOTLOG_CHATID = Var.PRIVATE_GROUP_ID


@borg.on(lightning_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, Var.TEMP_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
""" Spotify / Deezer downloader plugin by @ceowhitehatcracks | Syntax: .sdd link"""
import asyncio

from telethon.errors.rpcerrorlist import (
    UserAlreadyParticipantError,
    YouBlockedUserError,
)
from telethon.tl.functions.messages import ImportChatInviteRequest

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd("sdd ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    d_link = event.pattern_match.group(1)
    if ".com" not in d_link:
        await event.edit("` I need a link to download something pro.`**(._.)**")
    else:
        await event.edit("🎶**Initiating Download!**🎶")

    async with borg.conversation("@DeezLoadBot") as conv:
        try:
            await conv.send_message("/start")
            await conv.get_response()
            try:
                await borg(ImportChatInviteRequest("AAAAAFZPuYvdW1A8mrT8Pg"))
            except UserAlreadyParticipantError:
                await asyncio.sleep(0.00000069420)
            await conv.send_message(d_link)
Exemplo n.º 18
0
# Rewritten by @keinshin
import io
from userbot import CMD_LIST, ALIVE_NAME, bot as light
from userbot import CMD_HELP
from userbot.utils import lightning_cmd
import asyncio
from var import Var

DEFAULTUSER = str(
    ALIVE_NAME
) if ALIVE_NAME else "Pls Go To Heroku Vars Then in  `ALIVE_NAME`place You Telegram `Username` "


@light.on(lightning_cmd(pattern="help ?(.*)"))
async def cmd_list(event):
    if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@",
                                                             "!"):
        lightningusername = Var.TG_BOT_USER_NAME_BF_HER
        input_str = event.pattern_match.group(1)
        if lightningusername is None or input_str == "text":
            string = ""
            for i in CMD_LIST:
                string += "ℹ️ " + i + "\n"
                for iter_list in CMD_LIST[i]:
                    string += "    `" + str(iter_list) + "`"
                    string += "\n"
                string += "\n"
            if len(string) > 4095:
                await borg.send_message(event.chat_id, "`Lol Try .help`")
                await asyncio.sleep(5)
            else:
Exemplo n.º 19
0
import asyncio

from userbot.plugins.sql_helper.mute_sql import is_muted, mute, unmute
from userbot.utils import lightning_cmd


# @command(outgoing=True, pattern=r"^.gmute ?(\d+)?")
@borg.on(lightning_cmd(pattern=r"fmute ?(\d+)?"))
async def startgmute(event):
    private = False
    if event.fwd_from:
        return
    elif event.is_private:
        await event.edit("Putting Dick🍆 💦 In Son mouth!!")
        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
    elif private is True:
        userid = event.chat_id
    else:
        return await event.edit(
            "Please reply to a user or add their into the command to fmute them."
        )
    event.chat_id
    await event.get_chat()
    if is_muted(userid, "fmute"):
        return await event.edit("This user is already fmuted")
Exemplo n.º 20
0
import os

import requests

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd(pattern="colp$", outgoing=True))
async def detect(event):
    if Config.DEEP_AI is None:
        return await event.edit(
            "Add VAR DEEP_AI get Api Key from https://deepai.org/")

    reply = await event.get_reply_message()
    if not reply:  # By @Danish_00
        # Fixed By a NOOB
        return await event.edit("Reply to any image or non animated sticker !")
    await event.edit("Downloading the file to check...")
    media = await event.client.download_media(reply)
    if not media.endswith(("png", "jpg", "webp")):
        return await event.edit("Reply to any image or non animated sticker !"
                                )  # By @Danish_00
    # Fixed By a NOOB
    devent = await event.edit("coloring image sar...")
    r = requests.post(
        "https://api.deepai.org/api/colorizer",
        files={
            "image": open(media, "rb"),
        },
        headers={"api-key": Config.DEEP_AI},
    )  # By @Danish_00
Exemplo n.º 21
0
"""COMMAND : .ftoimg 
here file must be in image file """
import asyncio
from io import BytesIO

from telethon import types
from telethon.errors import PhotoInvalidDimensionsError
from telethon.tl.functions.messages import SendMediaRequest

from userbot import utils


@borg.on(utils.lightning_cmd(pattern=r"filetoimage"))
async def on_file_to_photo(event):
    await event.edit("processing.....")
    await asyncio.sleep(2)
    target = await event.get_reply_message()
    try:
        image = target.media.document
    except AttributeError:
        return
    if not image.mime_type.startswith("image/"):
        return  # This isn't an image
    if image.mime_type == "image/webp":
        return  # Telegram doesn't let you directly send stickers as photos
    if image.size > 10 * 1024 * 1024:
        return  # We'd get PhotoSaveFileInvalidError otherwise

    file = await borg.download_media(target, file=BytesIO())
    file.seek(0)
    img = await borg.upload_file(file)
Exemplo n.º 22
0
                "Mine Owner has Gone Study `Pure Din Sota hi Rehta He Ye Abb Padhai Karega`",
            )
        except Exception as e:  # pylint:disable=C0103,W0703
            await borg.send_message(  # pylint:disable=E0602
                event.chat_id,
                "Please set `PLUGIN_CHANNEL` "
                + "for the proper functioning of study functionality "
                + "in @blacklightningot \n\n `{}`".format(str(e)),
                reply_to=event.message.id,
                silent=True,
            )
        USER_night = {}  # pylint:disable=E0602
        night_time = None  # pylint:disable=E0602


@borg.on(lightning_cmd(pattern=r"study ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    global USER_night  # pylint:disable=E0602
    global night_time  # pylint:disable=E0602
    global last_night_message  # pylint:disable=E0602
    global reason
    USER_night = {}
    night_time = None
    last_night_message = {}
    reason = event.pattern_match.group(1)
    if not USER_night:  # pylint:disable=E0602
        last_seen_status = await borg(  # pylint:disable=E0602
            functions.account.GetPrivacyRequest(types.InputPrivacyKeyStatusTimestamp())
        )
Exemplo n.º 23
0
# gali plugin By DARK COBRA
"""Emoji
Available Commands:
.gulli"""

import asyncio

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd("gulli"))
async def _(event):
    if event.fwd_from:
        return
    animation_interval = 2
    animation_ttl = range(0, 36)
    # input_str = event.pattern_match.group(1)
    # if input_str == "gulli":
    await event.edit("Starting..")
    animation_chars = [
        "OK",
        "SUNN MADERCHOD",
        "TERI MAA KA BHOSDA",
        "BEHEN K LUND",
        "TERI MAA KA DUD",
        "MERA LAWDA LELE TU AGAR CHAIYE TOH",
        "GAANDU",
        "CHUTIYA",
        "TERI MAA KI CHUT PE JCB CHADHAA DUNGA",
        "SAMJHAA LAWDE",
        "YA DU TERE GAAND ME TAPAA TAP😂",
Exemplo n.º 24
0
# Created By @keinshin For Black Lightning
# For Setting Remainder In TG

from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
import asyncio
from userbot.utils import lightning_cmd
from userbot import CMD_HELP


@borg.on(lightning_cmd(pattern="skeedy?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    await event.get_reply_message()
    chat = "@SkeddyBot"
    await event.edit("```Wait...```")
    await asyncio.sleep(2)
    await event.edit("```Setting You Remainder.........```")
    await asyncio.sleep(3)
    await event.edit(f"Done Remainder Set For  {input_str}")
    async with event.client.conversation(chat) as conv:
        try:
            response = conv.wait_event(
                events.NewMessage(incoming=True, from_users=264121194))
            await conv.send_message("/start")
            await conv.get_response()
            await conv.send_message("Asia/Kolkata")
            await conv.get_response()
            await conv.send_message("âž•Add" + input_str)
Exemplo n.º 25
0
    time_list.reverse()
    ping_time += ":".join(time_list)

    return ping_time


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


@borg.on(lightning_cmd(outgoing=True, pattern="salive"))
@borg.on(sudo_cmd(pattern=r"salive", allow_sudo=True))
async def amireallyalive(salive):
    """ For .alive command, check if the bot is running.  """
    if ALIVE_PHOTTO:
        pm_caption = "**Ultimate 𝙸𝚂 🅾︎🅽🅻🅸🅽🅴**\n"
        pm_caption += f"**𝕄𝕪 𝔹𝕠𝕤𝕤**            : {DEFAULTUSER}\n"
        pm_caption += "𝚃𝙴𝙻𝙴𝚃𝙷𝙾𝙽 𝚅𝙴𝚁𝚂𝙸𝙾𝙽        : 1.17.5\n"
        pm_caption += "𝙿𝚈𝚃𝙷𝙾𝙽 𝚅𝙴𝚁𝚂𝙸𝙾𝙽          : 3.9.0\n"
        pm_caption += (
            "𝚂𝚄𝙿𝙿𝙾𝚁𝚃 𝙲𝙷𝙰𝙽𝙽𝙴𝙻         : [ᴊᴏɪɴ](https://t.me/Ult_imate)\n")
        pm_caption += (
            "𝚂𝚄𝙿𝙿𝙾𝚁𝚃 𝙶𝚁𝙾𝚄𝙿           : [ᴊᴏɪɴ](https://t.me/Ult_imate)\n")
        pm_caption += "𝘓𝘐𝘚𝘌𝘕𝘊𝘌                  : [AGPL-3.0  ʟɪᴄᴇɴꜱᴇ]()\n"
        pm_caption += "𝘾𝙊𝙋𝙔𝙍𝙄𝙂𝙃𝙏 𝘽𝙔            : [ Ultimate ](https://t.me/Ult_imate)\n"
        pm_caption += "[┏┓━┏┓━━━━┏┓━┏┓━━━━━\n ┃┃━┃┃━━━━┃┃━┃┃━━━━━\n ┃┗━┛┃┏━━┓┃┃━┃┃━┏━━┓\n ┃┏━┓┃┃┏┓┃┃┃━┃┃━┃┏┓┃ \n ┃┃━┃┃┃┃━┫┃┗┓┃┗┓┃┗┛┃ \n ┗┛━┗┛┗━━┛┗━┛┗━┛┗━━┛](https://t.me/Ult_imate)"
Exemplo n.º 26
0
from userbot.utils import lightning_cmd, load_module, remove_plugin

DELETE_TIMEOUT = 5


thumb_image_path = "./resources/541200.png"

LIGHTNINGUSER = str(ALIVE_NAME) if ALIVE_NAME else "Lightning"
LIGHTNINGBOT = Var.TG_BOT_TOKEN_BF_HER






@borg.on(lightning_cmd(pattern=r"unload (?P<krish_blac>\w+)$"))
async def unload(lightning):
    if lightning.fwd_from:
        return
    krish_blac = lightning.pattern_match["krish_blac"]
    try:
        remove_plugin(krish_blac)
        await lightning.edit(f"HᴀTᴀ DɪYᴀ Is Pʟᴜɢɢɪɴ Kᴏ SᴀᴠAɢᴇ ʙᴏᴛ sᴇ (Uɴʟᴏᴀᴅ)")
    except Exception as e:
        await lightning.edit(
            "HᴀTᴀ DɪYᴀ Is Pʟᴜɢɢɪɴ Kᴏ SᴀᴠAɢᴇ ʙᴏᴛ sᴇ (Uɴʟᴏᴀᴅ)".format(krish_blac, str(e))
        )


@borg.on(lightning_cmd(pattern=r"load (?P<krish_blac>\w+)$"))
async def load(lightning):
Exemplo n.º 27
0
Syntax: .qt

  inspired by @Deonnn's being_logical.py

  edited by : @mahshook_bot

"""

import asyncio
import random

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd(pattern=r"qt"))
async def _(event):

    if event.fwd_from:

        return

    await event.edit("selecting question...")

    await asyncio.sleep(2)

    x = random.randrange(1, 60)

    if x == 1:

        await event.edit(
Exemplo n.º 28
0
import logging
import time

from telethon.events import NewMessage
from telethon.tl.custom import Dialog
from telethon.tl.types import Channel, Chat, User

from userbot.utils import lightning_cmd

logging.basicConfig(
    format="[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s", level=logging.WARNING
)
logger = logging.getLogger(__name__)


@borg.on(lightning_cmd(pattern="status"))
async def stats(
    event: NewMessage.Event,
) -> None:  # pylint: disable = R0912, R0914, R0915
    """Command to get stats about the account"""
    await event.edit("`Collecting stats, Wait Master`")
    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
Exemplo n.º 29
0
# This useless plugin is made By @hellboi_atul..
# Downloads songs from Spotify
# Keep credits if gonna kang...do not remove/edit this line..
# Else gay..

import glob
import subprocess

from userbot.utils import lightning_cmd


@borg.on(lightning_cmd(pattern="getsong ?(.*)"))
async def _(event):
    if event.fwd_from:
        return
    await event.edit(
        "**Getting Your Music it may take a few seconds to fetch the song from you tube and download it..**"
    )
    cmd = event.pattern_match.group(1)
    cmnd = f"{cmd}"
    reply_to_id = event.message.id
    if event.reply_to_msg_id:
        reply_to_id = event.reply_to_msg_id
    subprocess.run(["spotdl", "-s", cmnd, "-q", "best"])
    subprocess.run(
        'for f in *.opus; do      mv -- "$f" "${f%.opus}.mp3"; done',
        shell=True)
    l = glob.glob("*.mp3")
    loa = l[0]
    await event.edit("`Yeah, I found the song..🎶`")
    await event.client.send_file(
Exemplo n.º 30
0
import io
import os
import time
from asyncio import create_subprocess_exec as asyncrunapp
from asyncio.subprocess import PIPE as asyncPIPE

from userbot.Config import Var
from userbot.utils import lightning_cmd

if not os.path.isdir("./SAVED"):
    os.makedirs("./SAVED")
if not os.path.isdir(Var.TEMP_DOWNLOAD_DIRECTORY):
    os.makedirs(Var.TEMP_DOWNLOAD_DIRECTORY)


@borg.on(lightning_cmd(outgoing=True, pattern="pips(?: |$)(.*)"))
async def pipcheck(pip):
    pipmodule = pip.pattern_match.group(1)
    if pipmodule:
        await pip.edit("`Searching . . .`")
        pipc = await asyncrunapp(
            "pip3",
            "search",
            pipmodule,
            stdout=asyncPIPE,
            stderr=asyncPIPE,
        )

        stdout, stderr = await pipc.communicate()
        pipout = str(stdout.decode().strip()) + str(stderr.decode().strip())