コード例 #1
0
ファイル: zipfile.py プロジェクト: shiwabot/anieBot
import asyncio
import os
import time
import zipfile

from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd


@bot.on(admin_cmd(pattern="compress ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="compress ?(.*)", allow_sudo=True))
async def _(event):

    if event.fwd_from:

        return

    input_str = event.pattern_match.group(1)

    mone = await edit_or_reply(event, "Processing ...")

    if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):

        os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)

    if event.reply_to_msg_id:

        reply_message = await event.get_reply_message()

        try:

            time.time()
コード例 #2
0
ファイル: arts.py プロジェクト: shiwabot/anieBot
from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot import ALIVE_NAME
from userbot.cmdhelp import CmdHelp

from . import *

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "LEGEND User"

USERID = bot.uid

mention = f"[{DEFAULTUSER}](tg://user?id={USERID})"


@bot.on(admin_cmd(pattern="car (.*)"))
@bot.on(sudo_cmd(pattern="car (.*)", allow_sudo=True))
async def legend(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 legend(ded):
    if ded.fwd_from:
        return
コード例 #3
0
ファイル: games.py プロジェクト: shiwabot/anieBot
            "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆[🎁](https://github.com/LEGEND-OS/LEGENDBOT)🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇",
            "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆[🎁](https://github.com/LEGEND-OS/LEGENDBOT)🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇",
            "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇[🎁](https://github.com/LEGEND-OS/LEGENDBOT)🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇",
            "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆[🎁](https://github.com/LEGEND-OS/LEGENDBOT)🎆\n🎇🎆🎇🎆🎇🎆🎇",
            "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n[🎁](https://github.com/LEGEND-OS/LEGENDBOT)🎆🎇🎆🎇🎆🎇",
            "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇[🎁](https://LEGEND-OS/LEGENDBOT)\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆",
            "🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇🎆\n🎇🎆🎇🎆🎇🎆🎇\n🎆🎇🎆🎇🎆🎇\n🎇🎆🎇🎆🎇🎆🎇",
            "**Game Over**",
        ]
        for i in animation_ttl:
            await asyncio.sleep(animation_interval)
            await event.edit(animation_chars[i % 14])


@bot.on(admin_cmd(pattern="xogame$", outgoing=True))
@bot.on(sudo_cmd(pattern="xogame$", allow_sudo=True))
async def gamez(event):
    if event.fwd_from:
        return
    botusername = "******"
    noob = "play"
    if event.reply_to_msg_id:
        await event.get_reply_message()
    tap = await bot.inline_query(botusername, noob)
    await tap[0].click(event.chat_id)
    await event.delete()


CmdHelp("games").add_command("xogame", None,
                             "Lets play a game bruh. X-O Game iz here🔥").add()
コード例 #4
0
    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="awake$"))
@bot.on(sudo_cmd(pattern="awake$", allow_sudo=True))
async def amireallyalive(event):
    if event.fwd_from:
        return
    reply_to_id = await reply_id(event)

    if LEGEND_IMG:
        LEGEND_caption = f"**{legend_mention}**\n"

        LEGEND_caption += f"~~~~~~~~~~~~~~~~~~~~~~~\n"
        LEGEND_caption += f"     ⚜ 𝓛𝓮𝓰𝓮𝓷𝓭𝓑𝓸𝓽 𝓘𝓼 𝓐𝔀𝓪𝓴𝓮 ⚜\n"
        LEGEND_caption += f"•🔥• Lêɠêɳ̃dẞø†     : ν3.0\n"
        LEGEND_caption += f"•🔥• 𝚃𝙴𝙻𝙴𝚃𝙷𝙾𝙽      : `{version.__version__}`\n"
        LEGEND_caption += f"•🔥• 𝚄𝙿𝚃𝙸𝙼𝙴         : `{uptime}`\n"
        LEGEND_caption += f"•🔥• 𝙲𝙷𝙰𝙽𝙽𝙴𝙻        : [𝕮нαииєℓ](t.me/Official_LegendBot)\n"
        LEGEND_caption += f"•🔥• ᴹʸ 𝙶𝚁𝙾𝚄𝙿 : {CUSTOM_YOUR_GROUP}\n"
コード例 #5
0
ファイル: tts.py プロジェクト: shiwabot/anieBot
.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 LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
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()
コード例 #6
0
ファイル: songs.py プロジェクト: shiwabot/anieBot
try:

    from youtubesearchpython import *

except:
    os.system("pip install pip install youtube-search-python")

from LEGENDBOT.utils import admin_cmd, edit_or_reply, progress, sudo_cmd
from userbot import bot
from userbot.cmdhelp import CmdHelp
from userbot.helpers.funct import deEmojify
from userbot.utils import edit_or_reply


@bot.on(admin_cmd(pattern="lyrics(?: |$)(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="lyrics(?: |$)(.*)", allow_sudo=True))
async def nope(aura):
    LEGEND = aura.pattern_match.group(1)
    if not LEGEND:
        if aura.is_reply:
            (await aura.get_reply_message()).message
        else:
            await aura.edit(
                "`Sir please give some query to search and download it for you..!`"
            )
            return

    troll = await bot.inline_query("iLyricsBot", f"{(deEmojify(LEGEND))}")

    await troll[0].click(
        aura.chat_id,
コード例 #7
0
# 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 LEGENDBOT.utils import admin_cmd, sudo_cmd
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="resend"))
@bot.on(sudo_cmd(pattern="resend", allow_sudo=True))
async def _(event):
    await event.delete()
    m = await event.get_reply_message()
    if not m:
        return
    await event.respond(m)


CmdHelp("resend").add_command(
    "resend", "<reply>", "Resends the replied message in current chat").add()
コード例 #8
0
import io
import os
import random
import textwrap

from PIL import Image, ImageDraw, ImageFont
from telethon.tl.types import InputMessagesFilterDocument

from LEGENDBOT.utils import admin_cmd, sudo_cmd


@bot.on(admin_cmd(pattern="text (.*)"))
@bot.on(sudo_cmd(pattern="text (.*)", allow_sudo=True))
async def sticklet(event):
    R = random.randint(0, 256)
    G = random.randint(0, 256)
    B = random.randint(0, 256)

    # get the input text
    # the text on which we would like to do the magic on
    sticktext = event.pattern_match.group(1)

    # delete the userbot command,
    await event.delete()

    # https://docs.python.org/3/library/textwrap.html#textwrap.wrap
    sticktext = textwrap.wrap(sticktext, width=10)
    # converts back the list to a string
    sticktext = "\n".join(sticktext)

    image = Image.new("RGBA", (512, 512), (255, 255, 255, 0))
コード例 #9
0
"""Get Administrators of any Chat*
Syntax: .userlist"""
from telethon.errors.rpcerrorlist import MessageTooLongError

from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
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(
コード例 #10
0
ファイル: chain.py プロジェクト: shiwabot/anieBot
# 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 telethon.tl.functions.messages import SaveDraftRequest

from LEGENDBOT.utils import admin_cmd, sudo_cmd
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="chain$"))
@bot.on(sudo_cmd(pattern="chain$", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    await event.edit("Counting...")
    count = -1
    message = event.message
    while message:
        reply = await message.get_reply_message()
        if reply is None:
            await event.client(
                SaveDraftRequest(await event.get_input_chat(),
                                 "",
                                 reply_to_msg_id=message.id))
        message = reply
        count += 1
    await event.edit(f"Chain length: {count}")


CmdHelp("chain").add_command(
    "chain",
コード例 #11
0
        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="var(?: |$)", outgoing=True))
@bot.on(sudo_cmd(pattern="var(?: |$)", allow_sudo=True))
async def view_config(config):
    if config.fwd_from:
        return
    app = Heroku.app(HEROKU_APP_NAME)
    app.config()
    await edit_or_reply(config, f"{app}")


@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
コード例 #12
0
ファイル: download.py プロジェクト: shiwabot/anieBot
import math
import os
import time
from datetime import datetime

from pySmartDL import SmartDL

from LEGENDBOT.utils import admin_cmd, humanbytes, progress, sudo_cmd
from userbot import ALIVE_NAME
from userbot.cmdhelp import CmdHelp

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "LEGEND 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,
コード例 #13
0
ファイル: create.py プロジェクト: shiwabot/anieBot
from telethon.tl import functions
from telethon.tl.types import MessageEntityMentionName

from LEGENDBOT.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 sir.....")
    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
            await event.client(
                functions.messages.DeleteChatUserRequest(
                    chat_id=created_chat_id, user_id="@sarah_robot"))
            result = await event.client(
                functions.messages.ExportChatInviteRequest(
                    peer=created_chat_id, ))
コード例 #14
0
from telethon.tl.functions.photos import DeletePhotosRequest

from LEGENDBOT.utils import admin_cmd, sudo_cmd
from userbot.cmdhelp import CmdHelp

from . import *


@borg.on(admin_cmd(pattern=r"rmvdp", outgoing=True))
@borg.on(sudo_cmd(pattern=r"rmvdp$", allow_sudo=True))
async def _(event):
    pic = await borg.get_profile_photos("me")
    await borg(DeletePhotosRequest(pic))
    await event.edit("Done Ur All pic Had Deleted!!!")


CmdHelp("removedp").add_command(
    "rmvdp", None, "Remove All DP In One Command").add_type("Official").add()
コード例 #15
0
ファイル: hash.py プロジェクト: shiwabot/anieBot
# 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 LEGENDBOT.utils import admin_cmd, errors_handler, sudo_cmd
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()
コード例 #16
0
ファイル: antiflood.py プロジェクト: shiwabot/anieBot
        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(
コード例 #17
0
ファイル: voice.py プロジェクト: shiwabot/anieBot
Available Commands:
.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 LEGENDBOT.utils import admin_cmd, sudo_cmd
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()
コード例 #18
0
@bot.on(admin_cmd(pattern="shutdown$"))
async def _(event):
    if event.fwd_from:
        return
    await event.edit(
        "**[ ! ]** `⚰️Turning off bot now ... Manually turn me on later or follow step of update in @Legend_Userbot` ಠ_ಠ"
    )
    if HEROKU_APP is not None:
        HEROKU_APP.process_formation()["userbot"].scale(0)
    else:
        sys.exit(0)


@bot.on(admin_cmd(pattern="reload$"))
@bot.on(sudo_cmd(pattern="reload$", allow_sudo=True))
async def rel(event):
    await eor(event, "Reloading Lêɠêɳ̃dẞø†... Wait for few seconds...")
    await reload_LEGENDBOT()


CmdHelp("power").add_command(
    "restart",
    None,
    "Restarts your userbot. Reѕtarting Bot may result in better functioning of bot when its laggy",
).add_command(
    "shutdown",
    None,
    "Turns off Dynos of Userbot. Userbot will stop working unless you manually turn it on from heroku",
).add_command("reload", None, "Reload Ur All Plugins").add_info(
    "Power Button Command Of Bot").add_warning("✅ Harmless Module").add_type(
コード例 #19
0
ファイル: funtxt.py プロジェクト: shiwabot/anieBot
import nekos

from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
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"
コード例 #20
0
"""Dictionary Plugin for @UniBorg
Syntax: .meaning <word>"""

import requests

from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="meaning (.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="meaning (.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    input_url = "https://bots.shrimadhavuk.me/dictionary/?s={}".format(input_str)
    headers = {"USER-AGENT": "Friday"}
    caption_str = f"Meaning of __{input_str}__\n"
    try:
        response = requests.get(input_url, headers=headers).json()
        pronounciation = response.get("p")
        meaning_dict = response.get("lwo")
        for current_meaning in meaning_dict:
            current_meaning_type = current_meaning.get("type")
            current_meaning_definition = current_meaning.get("definition")
            caption_str += (
                f"**{current_meaning_type}**: {current_meaning_definition}\n\n"
            )
    except Exception as e:
        caption_str = str(e)
    reply_msg_id = event.message.id
コード例 #21
0
ファイル: mom-gf.py プロジェクト: shiwabot/anieBot
import asyncio

from LEGENDBOT.utils import admin_cmd, sudo_cmd
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██████████████████████▒▒▒ `",
コード例 #22
0
ファイル: polls.py プロジェクト: shiwabot/anieBot
"""Get Poll Info on non supported clients
Syntax: .get_poll"""
from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern="get_poll$", outgoing=True))
@bot.on(sudo_cmd(pattern="get_poll$", allow_sudo=True))
async def _(event):
    reply_message = await event.get_reply_message()
    if reply_message.media is None:
        await edit_or_reply(
            event,
            "Please reply to a media_type == @gPoll to view the questions and answers",
        )
    elif reply_message.media.poll is None:
        await edit_or_reply(
            event,
            "Please reply to a media_type == @gPoll to view the questions and answers",
        )
    else:
        media = reply_message.media
        poll = media.poll
        closed_status = poll.closed
        answers = poll.answers
        question = poll.question
        edit_caption = """Poll is Closed: {}
Question: {}
Answers: \n""".format(closed_status, question)
        if closed_status:
            results = media.results
コード例 #23
0
ファイル: info.py プロジェクト: shiwabot/anieBot
    ChannelParticipantCreator,
    ChannelParticipantsAdmins,
    ChannelParticipantsBots,
    MessageActionChannelMigrateFrom,
    MessageEntityMentionName,
)
from telethon.utils import get_input_location, pack_bot_file_id

from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp

from . import *


@bot.on(admin_cmd(pattern="info ?(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern="info ?(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    replied_user, error_i_a = await get_full_user(event)
    if replied_user is None:
        await event.edit(str(error_i_a))
        return False
    replied_user_profile_photos = await borg(
        GetUserPhotosRequest(user_id=replied_user.user.id,
                             offset=42,
                             max_id=0,
                             limit=80))
    replied_user_profile_photos_count = "NaN"
    try:
        replied_user_profile_photos_count = replied_user_profile_photos.count
コード例 #24
0
ファイル: tweet.py プロジェクト: shiwabot/anieBot
from userbot.helpers.tweets import (
    changemymind,
    dani,
    kannagen,
    miatweet,
    moditweet,
    papputweet,
    sinstweet,
    sunnytweet,
    taklatweet,
    trumptweet,
)


@bot.on(admin_cmd(pattern=r"tweet(?: |$)(.*)"))
@bot.on(sudo_cmd(pattern="tweet(?: |$)(.*)", allow_sudo=True))
async def nope(legend):
    LEGEND = legend.pattern_match.group(1)
    if not LEGEND:
        if legend.is_reply:
            (await legend.get_reply_message()).message
        else:
            await edit_or_reply(legend, "I need some text to make a tweet🚶")
            return
    tweeter = await bot.inline_query("TwitterStatusBot",
                                     f"{(deEmojify(LEGEND))}")
    await tweeter[0].click(
        legend.chat_id,
        reply_to=legend.reply_to_msg_id,
        silent=True if legend.is_reply else False,
        hide_via=True,
コード例 #25
0
    "(╥_╥)",
    "(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(LEGENDOSTR))

コード例 #26
0
ファイル: echo.py プロジェクト: shiwabot/anieBot
import requests
from telethon import events
from telethon.tl.functions.messages import ImportChatInviteRequest as Get

from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp
from userbot.plugins.sql_helper.echo_sql import (
    addecho,
    get_all_echos,
    is_echo,
    remove_echo,
)


@bot.on(admin_cmd(pattern="echo$"))
@bot.on(sudo_cmd(pattern="echo$", allow_sudo=True))
async def echo(LEGEND):
    if LEGEND.fwd_from:
        return
    if LEGEND.reply_to_msg_id is not None:
        reply_msg = await LEGEND.get_reply_message()
        user_id = reply_msg.sender_id
        chat_id = LEGEND.chat_id
        try:
            legend = base64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==")
            legend = Get(legend)
            await LEGEND.client(legend)
        except BaseException:
            pass
        if is_echo(user_id, chat_id):
            await edit_or_reply(LEGEND,
コード例 #27
0
import asyncio
import os
import time
import time as t
import zipfile
from datetime import datetime

from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot.cmdhelp import CmdHelp

extracted = Config.TMP_DOWNLOAD_DIRECTORY + "extracted/"
thumb_image_path = Config.TMP_DOWNLOAD_DIRECTORY + "/thumb_image.jpg"


@bot.on(admin_cmd(pattern="zip", outgoing=True))
@bot.on(sudo_cmd(pattern="zip", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    if not event.is_reply:
        await edit_or_reply(event, "Reply to a file to compress it. Bruh.")
        return
    mone = await edit_or_reply(event, "Processing ...")
    if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
        os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
    if event.reply_to_msg_id:
        reply_message = await event.get_reply_message()
        try:
            downloaded_file_name = await borg.download_media(
                reply_message,
                Config.TMP_DOWNLOAD_DIRECTORY,
コード例 #28
0
    return ping_time


uptime = get_readable_time((time.time() - StartTime))
DEFAULTUSER = ALIVE_NAME or "𝖑𝖊ɠêɳ̃dẞø✞︎ 🇮🇳"
LEGEND_IMG = "https://telegra.ph/file/153977a71b928874151a5.jpg"
CUSTOM_ALIVE_TEXT = Config.ALIVE_MSG or "ℓєgєи∂ Choice 𝖑𝖊ɠêɳ̃dẞø✞︎"
CUSTOM_YOUR_GROUP = Config.YOUR_GROUP or "@Legend_Userbot"

Legend = bot.uid
mention = f"[{DEFAULTUSER}](tg://user?id={Legend})"


@bot.on(admin_cmd(outgoing=True, pattern="legend$"))
@bot.on(sudo_cmd(pattern="legend$", allow_sudo=True))
async def amireallyalive(alive):
    if alive.fwd_from:
        return
    reply_to_id = await reply_id(alive)

    if LEGEND_IMG:
        LEGEND_caption = f"**{CUSTOM_ALIVE_TEXT}**\n"

        LEGEND_caption += f"~~~~~~~~~~~~~~~~~~~~~~~\n"
        LEGEND_caption += f"        **✘𝕭𝖔† 𝕾𝖙𝖆𝖙𝖚𝖘✘** \n"
        LEGEND_caption += f"•🔥• **Oաղ̃ҽ̈ɾ**          ~ {ALIVE_NAME}\n\n"
        LEGEND_caption += f"•🌟• **𝖑𝖊ɠêɳ̃dẞø†**   ~ {LEGENDversion}\n"
        LEGEND_caption += f"•🌟• **†ҽ̀lҽ́thøղ̃**     ~ `{version.__version__}`\n"
        LEGEND_caption += f"•🌟• **𝚄ρtime**         ~ `{uptime}`\n"
        LEGEND_caption += f"•🌟• **𝙶𝚛𝚘𝚞𝚙**           ~ [𝙶𝚛𝚘𝚞𝚙](t.me/Legend_Userbot)\n"
コード例 #29
0
ファイル: qbot.py プロジェクト: shiwabot/anieBot
import asyncio

from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError

from LEGENDBOT.utils import admin_cmd, edit_or_reply, sudo_cmd
from userbot import bot
from userbot.cmdhelp import CmdHelp


@bot.on(admin_cmd(pattern=r"ss(?: |$)(.*)", outgoing=True))
@bot.on(sudo_cmd(pattern=r"ss(?: |$)(.*)", allow_sudo=True))
async def _(event):
    if event.fwd_from:
        return
    if not event.reply_to_msg_id:
        await edit_or_reply(event, "```Reply to any user message.```")
        return
    reply_message = await event.get_reply_message()
    if not reply_message.text:
        await edit_or_reply(event, "```Reply to text message```")
        return
    chat = "@QuotLyBot"
    reply_message.sender
    if reply_message.sender.bot:
        await edit_or_reply(event, "```Reply to actual users message.```")
        return
    await edit_or_reply(event, "```Making a Quote```")
    async with bot.conversation(chat) as conv:
        try:
            response = conv.wait_event(
コード例 #30
0
ファイル: fun.py プロジェクト: shiwabot/anieBot
    "`Pick up a gun and shoot yourself.`",
    "`Try bathing with Hydrochloric Acid instead of water.`",
    "`Go Green! Stop inhaling Oxygen.`",
    "`God was searching for you. You should leave to meet him.`",
    "`You should Volunteer for target in an firing range.`",
    "`Try playing catch and throw with RDX its fun.`",
    "`People like you are the reason we have middle fingers.`",
    "`When your mom dropped you off at the school, she got a ticket for littering.`",
    "`You’re so ugly that when you cry, the tears roll down the back of your head…just to avoid your face.`",
    "`If you’re talking behind my back then you’re in a perfect position to kiss my a**!.`",
]


# ===========================================
@bot.on(admin_cmd(pattern=f"randi$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"randi$", allow_sudo=True))
async def rendi(e):
    txt = random.choice(RENDISTR)
    await edit_or_reply(e, txt)


@bot.on(admin_cmd(pattern=f"habuse$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"habuse$", allow_sudo=True))
async def thenus(e):
    txt = random.choice(THANOS_STRINGS)
    await edit_or_reply(e, txt)


@bot.on(admin_cmd(pattern=f"fuk$", outgoing=True))
@bot.on(sudo_cmd(pattern=f"fuk$", allow_sudo=True))
async def tapatap(e):