예제 #1
0
async def main(config):
    # logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=config['log_level'])
    # logger = logging.getLogger(__name__)

    client = TelegramClient(**config['telethon_settings'])
    print("Starting")
    await client.start(bot_token=config['bot_token'])
    print("Started")

    @client.on(events.NewMessage())
    async def reply(event):
        await event.reply('( ͡° ͜ʖ ͡°)')

    @client.on(events.InlineQuery())
    async def reply_inline(event):
        if event.text:
            await event.answer([
                event.builder.article(f'{event.text[:25]}... ( ͡° ͜ʖ ͡°)',
                                      text=f'{event.text} ( ͡° ͜ʖ ͡°)'),
                event.builder.article(f'( ͡° ͜ʖ ͡°) {event.text[:25]}...',
                                      text=f'( ͡° ͜ʖ ͡°) {event.text}')
            ])

        else:
            await event.answer(
                [event.builder.article('( ͡° ͜ʖ ͡°)', text=f'( ͡° ͜ʖ ͡°)')])

    async with client:
        print("Good morning!")
        await client.run_until_disconnected()
예제 #2
0
 def __init__(self, client, settings, loader):
     self.username = client.loop.run_until_complete(
         client.get_me()).username
     self.settings = settings
     self.loader = loader
     client.add_event_handler(
         self.report_incoming_excepts,
         events.NewMessage(incoming=True,
                           forwards=False,
                           func=lambda e: e.raw_text))
     client.add_event_handler(self.handle_inline, events.InlineQuery())
     client.add_event_handler(self.handle_callback_query,
                              events.CallbackQuery())
예제 #3
0
**Example :** `@{tbot_username} google TeamDaisyX github`
**- Deezer Search!**
**How? :** `@{tbot_username} deezer <query>`
**Example :** `@{tbot_username} deezer why we lose`
**- Xkcd - Meme Like Comics**
**How? :** `@{tbot_username} xkcd <query>`
**Example :** `@{tbot_username} xkcd python`
**- P**n-Hub Search**
**How? :** `@{tbot_username} ph <query>`
**Example :** `@{tbot_username} ph nohorny`
**Note :** `Many More Coming! SoonTM`
    	"""
    await event.edit(oof_stark, buttons=LEGENDX)


@tgbot.on(events.InlineQuery(pattern=r"torrent (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):
    builder = event.builder
    testinput = event.pattern_match.group(1)
    starkisnub = urllib.parse.quote_plus(testinput)
    results = []
    sedlyf = "https://api.sumanjay.cf/torrent/?query=" + starkisnub
    try:
        okpro = requests.get(url=sedlyf, timeout=10).json()
    except:
        pass
    sed = len(okpro)
    if sed == 0:
        resultm = builder.article(
            title="No Results Found.",
            description="Check Your Spelling / Keyword",
예제 #4
0
Mʏ Mᴀsᴛᴇʀ ʜᴀs ᴀssɪɢɴᴇᴅ ᴍᴇ ᴛʜᴇ ᴅᴜᴛʏ ᴛᴏ ᴋᴇᴇᴘ ᴀ ᴄʜᴇᴄᴋ ᴏɴ ʜɪs PM, Aɴᴅ ɪ'ʟʟ ᴅᴏ ɪᴛ ғᴀɪᴛʜғᴜʟʟʏ..Sᴏ ʏᴏᴜ'ʀᴇ ɴᴏᴛ ᴀʟʟᴏᴡᴇᴅ ᴛᴏ ᴅɪsᴛᴜʀʙ ʜɪᴍ..
**Iғ ᴜ Sᴘᴀᴍ, ᴏʀ ᴛʀɪᴇᴅ ᴀɴʏᴛʜɪɴɢ ғᴜɴɴʏ, I'ᴠᴇ ғᴜʟʟ ᴘᴇʀᴍɪssɪᴏɴ ᴛᴏ Bʟᴏᴄᴋ + Rᴇᴘᴏʀᴛ ʏᴏᴜ ᴀs Sᴘᴀᴍ ɪɴ Tᴇʟᴇɢʀᴀᴍ's sᴇʀᴠᴇʀ...**
**Bᴇᴛᴛᴇʀ ʙᴇ ᴄᴀʀᴇғᴜʟ..**
**Cʜᴏᴏsᴇ ᴀɴʏ Rᴇᴀsᴏɴ & GTFO**
''')

ULTRA_BOT_PIC = os.environ.get("PMPERMIT_PIC", None)
if ULTRA_BOT_PIC is None:
    ULTRA_PIC = "https://telegra.ph/file/91d427a6873d44ca21c78.jpg"
else:
    ULTRA_PIC = ULTRA_BOT_PIC

back = [[Button.inline("«« Bᴀᴄᴋ", data="pm_back")]]


@xbot.on(events.InlineQuery())
async def inline_legend(event):
    piro = event.text
    if event.sender_id == bot.me.id and piro == 'pmsecurity' or event.sender_id == id and piro == 'pmpermit':
        LEGENDX = event.builder
        LEGEND = [[
            Button.inline("Fʀɪᴇɴᴅ", data='frnd_bsdk'),
            Button.inline("Sᴘᴀᴍ", data='hmmmmm')
        ]]
        LEGEND += [[Button.inline("Wᴜᴛ's ᴛʜɪs ?", data='noobda')]]
        PROBOYX = LEGENDX.photo(file=ULTRA_PIC, text=WARN, buttons=LEGEND)
        await event.answer([PROBOYX])


@xbot.on(events.callbackquery.CallbackQuery(data=re.compile(b'chutia')))
async def chutia_aayaa(event):
예제 #5
0
"""
(((((((((((((((((((((((@DYNAMICX22)))))))))))))))))))))))))))
(((((((((((((((((((((((@DYNAMICX22)))))))))))))))))))))))))))
(((((((((((((((((((((((@DYNAMICX22)))))))))))))))))))))))))))
(((((((((((((((((((((((@DYNAMICX22)))))))))))))))))))))))))))

                 MADE BY DYNAMICX22
                 IDEA BY PROBOYX
                 CREDITS TEAMDYNAMIC
                 PLEASE KEEP CREDITS 🥺
"""



from telethon import events, Button, custom
import os,re
from telethon.tl.custom import Button 
from telethon import events, errors, custom, functions
@tgbot.on(events.InlineQuery(pattern=r"repo"))
async def inline_id_handler(event: events.InlineQuery.Event):
 GODBOY = event.builder
 X= [[custom.Button.inline("🔥 CLICK ME 🔥",data="obhai")]]
 query = event.text
 result = GODBOY.article("GODBOY",text="REPO AND SUPPORT",buttons=X,link_preview=False)
 await event.answer([result])
@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"obhai")))
async def callback_query_handler(event): 

# inline by DYNAMICX22 and PROBOYX 🔥
  await event.edit(text=f"DYNAMIC REPO AND GROUP LINK",buttons=[[Button.url(f"🔥DYNAMIC REPO🔥", url="https://github.com/DynamicUserbot/Dynamic-Userbot"), Button.url(f"⚡DYNAMIC SUPPORT⚡", url="https://t.me/DYNAMIC_USERBOT_SUPPORT")]])
예제 #6
0
@borg.on(admin_cmd(pattern="button (.*)"))
@borg.on(sudo_cmd(pattern="button", allow_sudo=True))
async def Buttons(event):
    await eor(event, "`Mᴀᴋɪɴɢ Yᴏᴜʀ Bᴜᴛᴛᴏɴ ᴡᴇɪᴛ ᴍᴀsᴛᴇʀ !!!`")
    ULTRAX = Var.TG_BOT_USER_NAME_BF_HER
    pro = event.text[7:]
    pro, boy = pro.split("|")
    f = open("Button.txt", "w")  # by LEGENDX22, PROBOYX
    f.write(f'{pro}\n{boy}')
    f.close()
    LEGENDX = await bot.inline_query(ULTRAX, "BUTTON")
    await LEGENDX[0].click(event.chat_id)
    await event.delete()


@xbot.on(events.InlineQuery(pattern='BUTTON'))
async def file(event):
    f = open("Button.txt")
    ok = f.readlines()[0]
    f.close()
    PROBOYX = open("Button.txt")
    bc = PROBOYX.readlines()[1]
    PROBOYX.close()
    LEGENDX = event.builder
    LEGENDX22 = [[Button.url(f'{ok}', f'{bc}')]]
    PROBOYXOP = LEGENDX.article(title='Button by ULTRA X',
                                text=f'{ok}',
                                buttons=LEGENDX22)
    await event.answer([PROBOYXOP])

예제 #7
0
                self.time = time()
                self.calls.append(1)
            else:
                self.calls[-1] += 1
        await self.func(event)

async def nothing(event):
    pass


messages = Store(nothing)
inline_queries = Store(nothing)
callback_queries = Store(nothing)

telethn.add_event_handler(messages, events.NewMessage())
telethn.add_event_handler(inline_queries, events.InlineQuery())
telethn.add_event_handler(callback_queries, events.CallbackQuery())


@telethn.on(events.NewMessage(pattern=r"/getstats", from_users=OWNER_ID))
async def getstats(event):
    await event.reply(
        f"**__KIGYO EVENT STATISTICS__**\n**Average messages:** {messages.average()}/s\n**Average Callback Queries:** {callback_queries.average()}/s\n**Average Inline Queries:** {inline_queries.average()}/s", parse_mode='md'
        )


LEAVE_HANDLER = CommandHandler("leave", leave, run_async=True)
GITPULL_HANDLER = CommandHandler("gitpull", gitpull, run_async=True)
RESTART_HANDLER = CommandHandler("reboot", restart, run_async=True)

dispatcher.add_handler(LEAVE_HANDLER)
예제 #8
0
from html import unescape
import os
from telethon import types, Button, custom, events
from telethon.tl import functions
from Evie.events import register
import re

from re import findall
from urllib.parse import quote

import requests
import urllib
from telethon import events


@tbot.on(events.InlineQuery(pattern=r"yt (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):
    builder = event.builder
    k = event.pattern_match.group(1)
    if ":" in k:
        testinput, evlin = event.pattern_match.group(1).split(":")
    else:
        testinput = event.pattern_match.group(1)
        evlin = 5
    urllib.parse.quote_plus(testinput)
    lund = event.sender_id
    if lund == lund:
        results = []
        search = SearchVideos(f"{testinput}",
                              offset=1,
                              mode="dict",
예제 #9
0
import requests
from pokedex import pokedex as badhiya
from telethon import Button, events

# made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC#made by @THE_B_LACK_HAT @ Sh1vam #TEAM DC


@tgbot.on(events.InlineQuery(pattern=r"pokedex (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):

    builder = event.builder
    event.text

    if event.query.user_id == bot.uid:
        pokemon = event.pattern_match.group(1)
        move = requests.get(f"https://pokeapi.co/api/v2/pokemon/{pokemon}")
        rw = f"https://some-random-api.ml/pokedex?pokemon={pokemon}"
        w = requests.get(f"https://api.pokemontcg.io/v1/cards?name={pokemon}")
        lol = w.json()
        weaknesses = lol["cards"][0]["weaknesses"][0]["type"]
        r = requests.get(rw)
        a = r.json()
        name = a["name"]
        typ = a["type"]
        species = a["species"]
        abilities = a["abilities"]
        height = a["height"]
        weight = a["weight"]
        esatge = r.json()["family"]["evolutionStage"]
        l = r.json()["family"]["evolutionLine"]
        if not l:
예제 #10
0
import aiohttp
import math
import heroku3
fallback = None
from operator import itemgetter
from userbot import (HEROKU_APP_NAME, HEROKU_API_KEY, CMD_HELP, BOTLOG, BOTLOG_CHATID, JAVES_NAME)
from userbot.events import javes05, rekcah05 as admin_cmd
heroku = heroku3.from_key(HEROKU_API_KEY)
heroku_api = "https://api.heroku.com"
useragent = (
    'Mozilla/5.0 (Linux; Android 10; SM-G975F) '
    'AppleWebKit/537.36 (KHTML, like Gecko) '
    'Chrome/81.0.4044.117 Mobile Safari/537.36'
)

@tgbot.on(events.InlineQuery(pattern=r"send (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):
    builder = event.builder
    me = await client.get_me()
    if event.query.user_id == me.id:
        input_str = event.pattern_match.group(1)
        try:
            sh1vam = builder.document(f"./userbot/modules/{input_str}.py",title=f"{input_str}.py",description=f"Module {input_str} Found",text=f"{input_str}.py use .neko to paste in neko bin",buttons=[[Button.switch_inline("Search Again", query="send ", same_peer=True)],], )
            await event.answer([sh1vam])
            return
        except:
            shivamscode = builder.article(title=f"Module {input_str}.py Not Found",description=f"No Such Module",text=f"No Module Named {input_str}.py",buttons=[[Button.switch_inline("Search Again", query="send ", same_peer=True)],], )
            await event.answer([shivamscode])
            return
    if not event.query.user_id == me.id:
        resultm = builder.article(title="me not your bot",description="Mind Your Business",text="Hey U Must Use https://github.com/Sh1vam/javes-3.0  ",buttons=[[Button.switch_inline("Search Again", query="send ", same_peer=True)],], )
예제 #11
0
from ULTRAX import xbot
from ULTRA import CMD_HELP

BOT_USERNAME = Var.TG_BOT_USER_NAME_BF_HER

# made by madboy
# kang mat kr lawde
# UltraX

import os, re
from telethon.tl.custom import Button
from telethon import events, errors, custom, functions
MadBoy = bot.me.first_name


@xbot.on(events.InlineQuery(pattern=r"myself"))
async def inline_id_handler(event: events.InlineQuery.Event):
    MADBOY = event.builder
    MADB = [[custom.Button.inline("🔥 Hᴇʀᴇ 🔥", data="mb")]]
    query = event.text
    result = MADBOY.article("υℓтяα χ",
                            text=f"**υℓтяα χ**",
                            buttons=MADB,
                            link_preview=False)
    await event.answer([result])


@xbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"mb")))
async def callback_query_handler(event):
    await event.edit(
        text=f"**{MadBoy}**",
예제 #12
0
import pyfiglet
from userbot import CMD_HELP,  client
from telethon import Button, custom, events
from userbot import CMD_LIST
from userbot import tebot as tgbot
from userbot import tebot
#MADE BY SHIVAM DONOT KANG
@tgbot.on(events.InlineQuery(pattern=r"figlet (.*)"))
async def inline_id_handler(e: events.InlineQuery.Event):
    builder = e.builder

    me = await client.get_me()
    if e.query.user_id == me.id:
        CMD_FIG = {'slant': 'slant', '3D': '3-d', '5line': '5lineoblique', 'alpha': 'alphabet', 'banner': 'banner3-D', 'doh': 'doh', 'iso': 'isometric1', 'letters': 'letters', 'allig': 'alligator', 'dotm': 'dotmatrix', 'bubble': 'bubble', 'bulb': 'bulbhead', 'digi': 'digital','3x5':'3x5','1943':'1943____','4x4':'4x4_offr','5x7':'5x7','5x8':'5x8','64f1':'64f1____','6x10':'6x10','6x9':'6x9','zooloo':'a_zooloo','acro':'acrobatic','aveng':'advenger','allig2':'alligator2','aqua':'aquaplan','arrows':'arrows','asc':'asc_____','ascii12':'ascii12','ascii9':'ascii9','ascii':'ascii___','assalt':'assalt_m','asslt':'asslt__m','atc':'atc_____','atcg':'atc_gran','avatar':'avatar','bm200':'b_m__200','banner':'banner','banner3':'banner3','banner4':'banner4','barb':'barbwire','basic':'basic','battles':'battle_s','battlesh':'battlesh','baz':'baz__bil','beer':'beer_pub','bell':'bell','big':'big','bigascii12':'bigascii12','bigascii9':'bigascii9','bigchief':'bigchief','bigmono12':'bigmono12','bigmono9':'bigmono9','binary':'binary','block':'block','brite':'brite','briteb':'briteb','britebi':'britebi','britei':'britei','broadway':'broadway',"bubbles":'bubble__','buble':'bubble_b','bhead':'bulbhead','c1':'c1______','c2':'c2______','cascii':'c_ascii_','cconsen':'c_consen','calgphy2':'calgphy2','caligraphy':'caligraphy','catwalk':'catwalk','causin':'caus_in_','char1':'char1___','char2':'char2___','char3':'char3___','char4':'char4___','charact1':'charact1','charact2':'charact2','charact3':'charact3','charact4':'charact4','charact5':'charact5','charact6':'charact6','characte':'characte','charset':'charset_','chartr':'chartr','chartri':'chartri','chunky':'chunky','circle':'circle','clb6x10':'clb6x10','clb8x10':'clb8x10','clb8x8':'clb8x8','clr4x6':'clr4x6','clr5x10':'clr5x10','clr5x6':'clr5x6','clr5x8':'clr5x8','clr6x10':'clr6x10','clr6x6':'clr6x6','clr6x8':'clr6x8','clr7x10':'clr7x10','clr7x8':'clr7x8','clr8x10':'clr8x10','clr8x8':'clr8x8','coilcop':'coil_cop','coinstak':'coinstak','colossal':'colossal','comsen':'com_sen_','computer':'computer','contessa':'contessa','contrast':'contrast','convoy':'convoy__','cosmic':'cosmic','cosmike':'cosmike','cour':'cour','courb':'courb','courbi':'courbi','couri':'couri','crawford':'crawford','cricket':'cricket','cursive':'cursive','cyberlarge':'cyberlarge','cybermedium':'cybermedium','cybersmall':'cybersmall','ddragon':'d_dragon','dcsbfmo':'dcs_bfmo','decimal':'decimal','deepstr':'deep_str','defleppard':'defleppard','demo1':'demo_1__','demo2':'demo_2__','demom':'demo_m__','devilish':'devilish','diamond':'diamond','doom':'doom','double':'double','drpepper':'drpepper','druid':'druid___','efist':'e__fist_','ebbs1':'ebbs_1__','ebbs2':'ebbs_2__','eca':'eca_____','eftichess':'eftichess','eftifont':'eftifont','eftipiti':'eftipiti','eftirobot':'eftirobot','eftitalic':'eftitalic','eftiwall':'eftiwall','eftiwater':'eftiwater','emboss':'emboss','emboss2':'emboss2','epic':'epic','etcrvs':'etcrvs__','f15':'f15_____','facesof':'faces_of','fairmea':'fair_mea','fairligh':'fairligh','fantasy':'fantasy_','fbr12':'fbr12___','fbr1':'fbr1____','fbr2':'fbr2____','fbrstri':'fbr_stri','fbrtilt':'fbr_tilt','fender':'fender','finalass':'finalass','fireing':'fireing_','flynsh':'flyn_sh','fourtops':'fourtops','fp1':'fp1_____','fp2':'fp2_____','fraktur':'fraktur','funkydr':'funky_dr','future':'future', 'future1':'future_1', 'future2':'future_2', 'future3':'future_3','future4':'future_4','future5':'future_5', 'future6':'future_6', 'future7':'future_7', 'future8':'future_8', 'fuzzy':'fuzzy','gauntlet':'gauntlet', 'ghostbo':'ghost_bo', 'goofy':'goofy', 'gothic':'gothic', 'gothics':'gothic__', 'graceful':'graceful', 'gradient':'gradient', 'graffiti':'graffiti', 'grandpr':'grand_pr', 'greek':'greek', 'greenbe':'green_be', 'hades':'hades___', 'heavyme':'heavy_me', 'helv':'helv', 'helvb':'helvb', 'helvbi':'helvbi', 'helvi':'helvi', 'heroboti':'heroboti', 'hex':'hex', 'highnoo':'high_noo', 'hills':'hills___', 'holly':'hollywood', 'homepak':'home_pak', 'houseof':'house_of', 'hypabal':'hypa_bal', 'hyper':'hyper___', 'incraw':'inc_raw_', 'invita':'invita', 'iso2':'isometric2', 'iso3':'isometric3', 'iso4':'isometric4', 'italic':'italic', 'italics':'italics_', 'ivrit':'ivrit', 'jazmine':'jazmine', 'jerusalem':'jerusalem', 'joust':'joust___', 'ktk':'katakana', 'kban':'kban', 'kgamesi':'kgames_i', 'kikstar':'kik_star', 'krakout':'krak_out', 'larry3d':'larry3d', 'lazyjon':'lazy_jon', 'lcd':'lcd', 'lean':'lean', 'letter':'letter', 'letterr':'letter_', 'letterw3':'letterw3', 'lexible':'lexible_', 'linux':'linux', 'lockergnome':'lockergnome', 'lower':'lower', 'madnurs':'mad_nurs', 'madrid':'madrid', 'magicma':'magic_ma', 'marquee':'marquee', 'mastero':'master_o', 'maxfour':'maxfour', 'mayhemd':'mayhem_d', 'mcg':'mcg_____', 'migally':'mig_ally', 'mike':'mike', 'mini':'mini', 'mirror':'mirror', 'mnemonic':'mnemonic', 'modern':'modern__', 'mono12':'mono12', 'mono9':'mono9', 'morse':'morse', 'moscow':'moscow', 'mshebrew210':'mshebrew210', 'nancyjf':'nancyj-fancy', 'nancyju':'nancyj-underlined', 'nancyj':'nancyj', 'newasci':'new_asci', 'nfi1':'nfi1____', 'nipl':'nipples', 'notieca':'notie_ca', 'npn':'npn_____', 'ntgreek':'ntgreek', 'null':'null', 'nvscript':'nvscript', 'o8':'o8', 'octal':'octal', 'odellak':'odel_lak', 'ogre':'ogre', 'okbeer':'ok_beer_', 'os2':'os2', 'outrun':'outrun__', 'pshm':'p_s_h_m_', 'pskateb':'p_skateb', 'pacospe':'pacos_pe', 'pagga':'pagga', 'panther':'panther_', 'pawnins':'pawn_ins', 'pawp':'pawp', 'peaks':'peaks', 'pebbles':'pebbles', 'pepper':'pepper', 'phonix':'phonix__', 'platoon2':'platoon2', 'platoon':'platoon_', 'pod':'pod_____', 'poison':'poison', 'puffy':'puffy', 'pyramid':'pyramid', 'r2d2':'r2-d2___', 'rad':'rad_____', 'radphan':'rad_phan', 'radical':'radical_', 'rainbow':'rainbow_', 'rallys2':'rally_s2', 'rallysp':'rally_sp', 'rampage':'rampage_','rastan':'rastan__','rawrecu':'raw_recu','rci':'rci_____','rectangles':'rectangles','relief':'relief','relief2':'relief2','rev':'rev','ripper':'ripper!_','roadrai':'road_rai','rockbox':'rockbox_','rok':'rok_____','roman':'roman','romans':'roman___','rot13':'rot13','rounded':'rounded','rowancap':'rowancap','rozzo':'rozzo','runic':'runic','runyc':'runyc','sans':'sans','sansb':'sansb','sansbi':'sansbi','sansi':'sansi','sblood':'sblood','sbook':'sbook','sbookb':'sbookb','sbookbi':'sbookbi','sbooki':'sbooki','script':'script','scripts':'script__','serifcap':'serifcap','shadow':'shadow','shimrod':'shimrod','short':'short','skatero':'skate_ro','skateord':'skateord','skateroc':'skateroc','sketchs':'sketch_s','slant':'slant','slide':'slide','slscript':'slscript','sm':'sm______','small':'small','smascii12':'smascii12','smascii9':'smascii9','smblock':'smblock','smbraille':'smbraille','smisome1':'smisome1','smkeyboard':'smkeyboard','smmono12':'smmono12','smmono9':'smmono9','smscript':'smscript','smshadow':'smshadow','smslant':'smslant','smtengwar':'smtengwar','spaceop':'space_op','spcdemo':'spc_demo','speed':'speed','stacey':'stacey','stampatello':'stampatello','standard':'standard','starwar':'star_war','starwars':'starwars','stealth':'stealth_','stellar':'stellar','stencil1':'stencil1','stencil2':'stencil2','stop':'stop','straight':'straight','street_s':'street_s','subteran':'subteran','superte':'super_te','tofap':'t__of_ap','tanja':'tanja','tav1':'tav1____','taxi':'taxi____','tec1':'tec1____','tec7000':'tec_7000','tecrvs':'tecrvs__','tengwar':'tengwar','term':'term','thick':'thick','thin':'thin','threepoint':'threepoint','tipan':'ti_pan__','ticks':'ticks','ticksslant':'ticksslant','tiles':'tiles','times':'times','timesofl':'timesofl','tinkertoy':'tinker-toy','tomahawk':'tomahawk','tombstone':'tombstone','top_duck':'top_duck','trashman':'trashman','trek':'trek','triadst':'triad_st','ts1':'ts1_____','tsalagi':'tsalagi','tsm':'tsm_____','tsnbase':'tsn_base','tty':'tty','ttyb':'ttyb','tubular':'tubular','twincob':'twin_cob','twopoint':'twopoint','typeset':'type_set','ucffan':'ucf_fan_','ugalympi':'ugalympi','unarmed':'unarmed_','univers':'univers','upper':'upper','usa':'usa_____','usapq':'usa_pq__','usaflag':'usaflag','utopia':'utopia','utopiab':'utopiab','utopiabi':'utopiabi','utopiai':'utopiai','vortron':'vortron_','warofw':'war_of_w','wavy':'wavy','weird':'weird','whimsy':'whimsy','wideterm':'wideterm','xbrite':'xbrite','xbriteb':'xbriteb','xbritebi':'xbritebi','xbritei':'xbritei','xchartr':'xchartr','xchartri':'xchartri','xcour':'xcour','xcourb':'xcourb','xcourbi':'xcourbi','xcouri':'xcouri','xhelv':'xhelv','xhelvb':'xhelvb','xhelvbi':'xhelvbi','xhelvi':'xhelvi','xsans':'xsans','xsansb':'xsansb','xsansbi':'xsansbi','xsansi':'xsansi','xsbook':'xsbook','xsbookb':'xsbookb','xsbookbi':'xsbookbi','xsbooki':'xsbooki','xtimes':'xtimes','xtty':'xtty','xttyb':'xttyb','yiear':'yie-ar__','yieark':'yie_ar_k','zpilot':'z-pilot_','zigzag':'zig_zag_','zone7':'zone7___'}
        #{"slant": "slant", "3D": "3-d", "5line": "5lineoblique", "alpha": "alphabet", "banner": "banner3-D", "doh": "doh", "iso": "isometric1", "letter": "letters", "allig": "alligator", "dotm": "dotmatrix", "bubble": "bubble", "bulb": "bulbhead", "digi": "digital", "3x5": "3x5"}
        input_str = e.pattern_match.group(1)
        if "." in input_str:
            text, cmd = input_str.split(".", maxsplit=1)
        elif input_str is not None:
            cmd = None
            text = input_str
        if cmd is not None:
            try:
                font = CMD_FIG[cmd]
            except KeyError:

                resultm = builder.article(title="Invalid Fonts.",description="Give Correct input",text="[Invalid selected font.](https://telegra.ph/%E2%84%B9-12-31)",buttons=[[Button.switch_inline("Search Again", query="figlet ", same_peer=True)],],)
                await e.answer([resultm])
            result = pyfiglet.figlet_format(text, font=font)
        else:
            result = pyfiglet.figlet_format(text)
예제 #13
0
from telethon import events, Button
import re, os
from Assist import id
from Assist import xbot
@xbot.on(events.InlineQuery(pattern='wspr'))
async def inline_proboy(event):
  DAISYX = event.text[5:]
  DAISYX, INUKA = DAISYX.split('@')
  os.system("rm -rf wspr.txt")
  f = open("wspr.txt", "a")
  f.write(DAISYX + "\n" + INUKA)
  f.close()
  DEVIL = event.builder
  ALAIN = [[Button.inline("🔐 Sʜᴏᴡ", data='secret')]]
  ALAIN += [[Button.switch_inline("Rᴇᴘʟʏ", query="wspr", same_peer=True)]]
  SKEM = DEVIL.article(title=f"Wʜɪsᴘᴇʀ Fᴏʀ @{INUKA}", text=f"<b>📩 Sᴇᴄʀᴇᴛ Msɢ</b> Tᴏ <b>@{INUKA}</b>. Oɴʟʏ Hᴇ/Sʜᴇ Cᴀɴ Oᴘᴇɴ Iᴛ..", buttons=ALAIN, parse_mode="html")
  await event.answer([ALAIN])

@xbot.on(events.callbackquery.CallbackQuery(data=re.compile(b'secret')))
async def wspr(event):
  try:
    f = open("wspr.txt")
    DEVIL = f.readlines()[0]
    f.close()
    pro = open("wspr.txt")
    DAISYX = pro.readlines()[1].lower()
    pro.close()
    bot = await xbot.get_me()
    sender = f"{event.sender.username}".lower()
    me = f"{borg.me.username}".lower()
    if sender == DAISYX or sender == me or event.sender_id == id:
예제 #14
0
파일: bot.py 프로젝트: YonatanGM/songs.inc
async def handler(message):
    if message.audio:
        if message.file.title and message.file.performer:
            chat = await message.get_sender()
            info = [
                message.file.title.lower(),
                message.file.performer.lower(), message.id, chat.id
            ]
            with open("collection.csv", 'a', encoding='utf8') as file:
                writer = csv.writer(file)
                writer.writerow(info)

        await bot.send_message(chat, "Done. Thanks for supporting us!")


@bot.on(events.InlineQuery(pattern="^(?!\s*$).+"))
async def inlinehandler(event):
    builder = event.builder
    chat = await event.get_sender()
    query = event.text.lower()
    df = pd.read_csv("collection.csv",
                     index_col=['title', 'artist'],
                     encoding='utf8')
    title = df.index.dropna().to_list()
    result = set()

    x = process.extractBests(query, title, score_cutoff=90, limit=8)
    for i in range(len(x)):

        msg_id = df.at[x[i][0], 'msg_id']
        from_peer = df.at[x[i][0], 'from_peer']
예제 #15
0
(((((((((((((((((((((((@LEGENDX22)))))))))))))))))))))))))))
(((((((((((((((((((((((@LEGENDX22)))))))))))))))))))))))))))
(((((((((((((((((((((((@LEGENDX22)))))))))))))))))))))))))))
(((((((((((((((((((((((@LEGENDX22)))))))))))))))))))))))))))
                 MADE BY LEGENDX22 AND PROBOYX
                   CREDITS #TEAMLEGEND 
                PLEASE DON'T REMOVE CREDITS
"""

from telethon import events, Button, custom
import re, os
from userbot import bot
PHOTO = "https://telegra.ph/file/fe58623891803d36979f7.jpg"


@tgbot.on(events.InlineQuery(pattern="alive_x"))
async def awake(event):
    builder = event.builder
    aniex = event.sender.first_name
    DENVIL_PRO = "HELLO THIS IS ANIE OFFICIAL \n\n"
    DENVIL_PRO += "ALL SYSTEM WORKING PROPERLY\n\n"
    DENVIL_PRO += "ANIE OS : 3.8 LATEST\n\n"
    DENVIL_PRO += f"MY MASTER {aniex} ☺️\n\n"
    DENVIL_PRO += "FULLY UPDATED\n\n"
    DENVIL_PRO += "TELETHON : 1.19.5 LATEST\n\n"
    DENVIL_PRO += "THANKS FOR ADD ME HERE"
    BUTTON = [[
        Button.url("MASTER", "https://t.me/denvil_pro"),
        Button.url("DEVLOPER", "https://t.me/Denvil_pro")
    ]]
    BUTTON += [[custom.Button.inline("REPOSITORYS", data="DENVIL_PRO")]]
예제 #16
0
from AnimeBot import AnimeBot
from telethon import events, Button
from ..helpers.search import shorten, anime_query, GRAPHQL
import requests
import telethon
from telethon.tl.types import BotInlineResult, InputBotInlineMessageMediaAuto, DocumentAttributeImageSize, InputWebDocument, InputBotInlineResult
from telethon.tl.functions.messages import SetInlineBotResultsRequest
from ..helpers.other import format_results

@AnimeBot.on(events.InlineQuery(pattern='anime ?(.*)'))
async def inline_anime(event):
    builder = event.builder
    query = event.pattern_match.group(1)
    variables = {'search': query}
    json = requests.post(GRAPHQL, json={'query': anime_query, 'variables': variables}).json()[
        'data'].get('Media', None)
    if json:
        msg, info, trailer, image = format_results(json)
        if trailer:
            buttons =[
                        [
                            Button.url("More Info", url=info),
                            Button.url("Trailer 🎬", url=trailer)
                        ]
                    ]
        else:
            buttons =[
                        [
                            Button.url("More Info", url=info)
                        ]
                    ]
예제 #17
0
  





import math
import heroku3

from userbot import HEROKU_APP_NAME, HEROKU_API_KEY

heroku = heroku3.from_key(HEROKU_API_KEY)
heroku_api = "https://api.heroku.com"


@tgbot.on(events.InlineQuery(pattern=r"logs"))
async def inline_id_handler(event: events.InlineQuery.Event):
    builder = event.builder
    me = await client.get_me()
    if event.query.user_id == me.id:
        try:
            Heroku = heroku3.from_key(HEROKU_API_KEY);app = Heroku.app(HEROKU_APP_NAME)
        except:
            shivamslog = builder.article(title="Cant Get It",description="Configuration Error",text="Please Check Heroku App Name It Must Be Same As Your App Name Or Check Heroku Api Key U Can Regenerate From https://dashboard.heroku.com/account Scroll Down Regenerate And Change In settings Of App U Need To Reveal Config Vars",buttons=[[Button.switch_inline("Search Again", query="logs", same_peer=True)],], )
            await event.answer([shivamslog])
            return
        else:
            with open('logs.txt', 'w') as log:
                log.write(app.get_log())
            shivamlog=builder.document("logs.txt",title="Logs",description="logs of 100+ lines use .paste to past in dogbin",text="use .paste to paste inn dogbin",buttons=[[Button.switch_inline("Search Again", query="logs", same_peer=True)],], )
            await event.answer([shivamlog])
예제 #18
0
# COPYRIGHT (C) BY 2021 BY ULTRA X
# made by madboy482
# kang mat kr lawde

import asyncio
import os
import re
import sys
from ULTRAX import ID
import requests
from telethon import events, Button, custom, functions, errors
from ULTRA.utils import admin_cmd, sudo_cmd


@tgbot.on(events.InlineQuery(pattern=r"redeploy"))
async def inline_id_handler(event: events.InlineQuery.Event):
    MADBOY = event.builder
    MB = [[custom.Button.inline("⁂⁂ 𝑹𝒆𝒅𝒆𝒑𝒍𝒐𝒚 ⁂⁂", data="redeploy")]]  #REDEPLOY
    query = event.text  # MADBOY482
    result = MADBOY.article("MADBOY",
                            text="**Cʟɪᴄᴋ RᴇDᴇᴘʟᴏʏ Tᴏ RᴇDᴇᴘʟᴏʏ Yᴏᴜʀ Bᴏᴛ**",
                            buttons=MB,
                            link_preview=False)
    await event.answer([result])  # MADBOY482


from telethon import Button, custom, events
import os, re, sys, asyncio


@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b'redeploy'))
예제 #19
0
running_processes: dict = {}
import os
import re
import urllib
from math import ceil
from userbot import tebot as tgbot
from userbot import bot as borg
import requests
from telethon import Button, custom, events, functions
#MADE BY SH1VAM USED CODES OF ORIGINAL JAVES
# DONOT KANG
#HEHE I SECURED HARMFUL CMDS TOO
#BY SHIVAM


@tgbot.on(events.InlineQuery(pattern=r"exec (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):

    builder = event.builder
    code = event.pattern_match.group(1)
    urllib.parse.quote_plus(code)
    me = await client.get_me()
    if event.query.user_id == me.id:
        if not code:
            resultm = builder.article(
                title="No Results.",
                description="hmm",
                text=
                f"`{JAVES_NNAME}:` **At least a variable is required toexecute. Use !help script for an example.**",
                buttons=[
                    [
예제 #20
0
                url=result['snippet']['thumbnails']['default']['url'],
                size=0,
                mime_type='image/jpg',
                attributes=[]),
            text=
            f"https://www.youtube.com/playlist?list={result['id']['playlistId']}"
            if switch == '.p' else
            f"https://www.youtube.com/watch?v={result['id']['videoId']}")
        for result in await youtube_search(
            search_type='video' if switch == '.v' else 'playlist',
            search_query=event.text[2:] if not switch else event.text,
            amount=10)
    ]


@client.on(events.InlineQuery())
async def inline_query(event):
    if not event.text or len(event.text) < 3:
        await event.answer([
            event.builder.article(
                'Wrong command',
                text=
                'Usage: @YTmusicRipperBot <.p/.v> <video or playlist query>')
        ])
        return
    else:
        if event.text.startswith('.p'):
            await event.answer(await build_answer('.p', event=event))
        elif event.text.startswith('.v'):
            await event.answer(await build_answer('.v', event=event))
        else:
예제 #21
0
from math import ceil
from userbot import tebot as tgbot
from userbot import bot as borg
import requests
from userbot import CMD_HELP, BOTLOG, BOTLOG_CHATID,client
from telethon import Button, custom, events, functions
#by Shivam don't kang
@tgbot.on(events.InlineQuery(pattern=r"ihelp"))
async def inline_id_handler(event: events.InlineQuery.Event):
    builder = event.builder
    me = await client.get_me()
    if event.query.user_id == me.id:
            s = builder.article(title="Inline Help",description="For Inline commands",text="for cmd like yt,google and pic u need to specify Querry;number and for base64 :- base64 (en|de) querry;for whisper u need @username Querry and for button see .chkbutton",buttons=[[Button.switch_inline("Inline Help", query="ihelp", same_peer=True),Button.switch_inline("Alive", query="alive", same_peer=True),Button.switch_inline("Javes", query="javes", same_peer=True),Button.switch_inline("Button Url", query="url", same_peer=True)],[Button.switch_inline("Base64", query="base64 ", same_peer=True),Button.switch_inline("Help", query="helpme", same_peer=True),Button.switch_inline("Torrent", query="tor ", same_peer=True),Button.switch_inline("You Tube", query="yt ", same_peer=True)],[Button.switch_inline("Pic", query="pic ", same_peer=True),Button.switch_inline("Exec", query="exec ", same_peer=True),Button.switch_inline("Eval", query="eval ", same_peer=True),Button.switch_inline("Bot Logs", query="logs", same_peer=True)],[Button.switch_inline("Hash", query="hash ", same_peer=True),Button.switch_inline("Whisper", query="secret ", same_peer=True),Button.switch_inline("Url Button", query="buttons ", same_peer=True),Button.switch_inline("Send Module", query="send ", same_peer=True)],[Button.switch_inline("Send Helper", query="hsend ", same_peer=True),Button.switch_inline("Send SQL", query="ssend ", same_peer=True),Button.switch_inline("Google Search", query="google ", same_peer=True),Button.switch_inline("Figlet", query="figlet ", same_peer=True)],[Button.switch_inline("Style Fonts", query="fstyle ", same_peer=True),Button.switch_inline("List Font Styles", query="sfonts ", same_peer=True)],[Button.inline('❌ Close menu', b'close')],] )
            await event.answer([s])
            return
    if not event.query.user_id == me.id:
        s = builder.article(title="me not your bot",description="Mind Your Business",text="Hey U Must Use https://github.com/Sh1vam/javes-3.0  ",buttons=[[Button.switch_inline("Search Again", query="ihelp", same_peer=True)],], )
        await event.answer([s])
        return
예제 #22
0
import re
import urllib
from math import ceil
from re import findall
from youtube_search import YoutubeSearch
from search_engine_parser import GoogleSearch

from urllib.parse import quote
import requests
from telethon import Button, custom, events, functions
from youtubesearchpython import VideosSearch

from pornhub_api import PornhubApi


@tgbot.on(events.InlineQuery(pattern=r"ph (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):
    builder = event.builder
    if event.query.user_id != bot.uid:
        resultm = builder.article(
            title="- NIKAL LAWDE -",
            text=
            f"You Can't Use This Bot. \nDeploy LEGEND BOTTo Get Your Own BOT Repo Link HERE",
        )
        await event.answer([resultm])
        return
    results = []
    input_str = event.pattern_match.group(1)
    api = PornhubApi()
    data = api.search.search(input_str, ordering="mostviewed")
    ok = 1
예제 #23
0
"""

# MADE BY LEGEND X AND PROBOY

from LEGENDX import bot
import os
import re
import urllib
from math import ceil

import requests
from telethon import Button, custom, events, functions
from youtubesearchpython import SearchVideos


@bot.on(events.InlineQuery(pattern=r"yt (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):
    builder = event.builder
    k = event.pattern_match.group(1)
    if ";" in k:
        testinput, legendx = event.pattern_match.group(1).split(";")
    else:
        testinput = event.pattern_match.group(1)
        legendx = 5
    urllib.parse.quote_plus(testinput)
    lund = event.sender_id
    if lund == lund:
        results = []
        search = SearchVideos(f"{testinput}",
                              offset=1,
                              mode="dict",
예제 #24
0
        return
    await event.edit("Doing some Black Magic")
    if atul:
        font_choice = atul
        dctxt = shivam
        if atul not in DC_FONT_STYLE:
            await event.edit("Please select a valid Font Style!")
            return
    else:
        font_choice = random.choice(DC_FONT_STYLE)
        dctxt = shivam
    dcfontchoice = font_choice.replace(";", "")
    danish = await dc_font_maker(dcfontchoice, dctxt)
    await event.edit(danish)

@tgbot.on(events.InlineQuery(pattern=r"sfonts"))
async def teamdc(event: events.InlineQuery.Event):
    builder = event.builder
    me = await client.get_me()
    if event.query.user_id == me.id:
        resultm = builder.article(title="Fonts",description="Available Fonts.",text="serif\nsans\nsans_i\nserif_i\nmedi_b\nmedi\ndouble\ncursive_b\ncursive\nbigsmall\nreverse\ncircle\ncircle_b\nmono\nsquare_b\nsquare\nsmoth\ngoth\nwide\nweb\nweeb\nweeeb\ntwist\ntwist_b\ntwist_c\n",buttons=[[Button.switch_inline("Search Again", query="sfonts  ", same_peer=True)],],)
        await event.answer([resultm])
    if not event.query.user_id == me.id:
        resultm = builder.article(title="me not your bot",description="Mind Your Business",text="Hey U Must Use https://github.com/Sh1vam/javes-3.0  ",buttons=[[Button.switch_inline("Search Again", query="sfonts  ", same_peer=True)],], )
        await e.answer([resultm])
        return
@tgbot.on(events.InlineQuery(pattern=r"fstyle (.*)"))
async def teamdc(event: events.InlineQuery.Event):
    builder = event.builder
    me = await client.get_me()
    if event.query.user_id == me.id:
예제 #25
0
파일: gg.py 프로젝트: ULTRA-OP/ULTRA_PLUGS
import requests
from telethon import Button, custom, events, functions
#made by Sh1vam Donot kang
opener = urllib.request.build_opener()
useragent = 'Mozilla/5.0 (Linux; Android 9; SM-G960F Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.70 Mobile Safari/537.36'
opener.addheaders = [('User-agent', useragent)]


#made by Sh1vam Donot kang#made by Sh1vam Donot kang
#made by Sh1vam Donot kang
#made by Sh1vam Donot kang#made by Sh1vam Donot kang#made by Sh1vam Donot kang#made by Sh1vam Donot kang#made by Sh1vam Donot kang#made by Sh1vam Donot kang#made by Sh1vam Donot kang#made by Sh1vam Donot kang
#made by Sh1vam Donot kang
#made by Sh1vam Donot kang
#made by Sh1vam Donot kang
#made by Sh1vam Donot kang
@tgbot.on(events.InlineQuery(pattern=r"google (.*)"))
async def inline_id_handler(q_event: events.InlineQuery.Event):
    builder = q_event.builder
    #match = q_event.pattern_match.group(1)

    match, shivam = q_event.pattern_match.group(1).split(";")
    if q_event.query.user_id == bot.uid:
        miraculous = []
        page = findall(r"page=\d+", match)
        try:
            page = page[0]
            page = page.replace("page=", "")
            match = match.replace("page=" + page[0], "")
        except IndexError:
            page = 1
        search_args = (str(match), int(page))
예제 #26
0
@xbot.on(events.callbackquery.CallbackQuery(data=re.compile(b'ass_info')))
async def restart(event):
    if event.sender_id == bot.me.id or event.sender_id == ID:
        await event.edit("Wᴇɪᴛ Mᴀsᴛᴇʀ Sᴇɴᴅɪɴɢ Yᴏᴜʀ Iɴғᴏ")
        await xbot.send_message(
            pro,
            f"**👤 Your details By υℓтяα χ 👤**\n\n**➥ Fɪʀsᴛ Nᴀᴍᴇ**: `{kk}`\n\n**➥ Lᴀsᴛ Nᴀᴍᴇ:** `{last}`\n\n**➥ Usᴇʀ Iᴅ:** `{bc}`\n\n**➥ Bᴏᴛ:** `{boy}`\n\n**➥ Usᴇʀɴᴀᴍᴇ:** @{lol}\n\n**➥ Rᴇsᴛʀɪᴄᴛᴇᴅ:** `{hmm}`\n\n**➥ Vᴇʀɪғɪᴇᴅ:** `{h}`\n\n**➥ Aᴄᴄᴇss Hᴀsʜ:** `{hm}`\n\n**➥ Dᴄ Iᴅ:** `{a}`\n\n**➥ Hᴀᴠᴇ Vɪᴅᴇᴏ Iɴ Pʀᴏғɪʟᴇ:** `{mad}`\n\n**➥ Sᴄᴀᴍ:** `{scam}`\n\n**➥ Dᴇʟᴇᴛᴇᴅ Aᴄᴄᴏᴜɴᴛ:** `{dele}`"
        )
        await event.edit("Successfully Sent Your Info Through Your Assistant")
    else:
        jnl = "Heyy you, Yes you\nWhy u kiddo want to see moi info??\nGo away and mind your own bizness"
        await event.answer(jnl, alert=True)


@xbot.on(events.InlineQuery(pattern=r"me"))
async def inline_id_handler(event: events.InlineQuery.Event):
    LEGENDX = event.builder
    X = [[custom.Button.inline("⁂⁂ 𝐀𝐬𝐬𝐢𝐬𝐭𝐚𝐧𝐭 ⁂⁂", data="ass_info")]]

    X += [[custom.Button.inline("⁂⁂ 𝐂𝐮𝐫𝐫𝐫𝐞𝐧𝐭 𝐂𝐡𝐚𝐭 ⁂⁂", data="ass_chat")]]
    query = event.text
    result = LEGENDX.article(
        "υℓтяα χ вσт",
        text=
        "**Hᴏᴡ ᴡᴏᴜʟᴅ ʏᴏᴜ ʟɪᴋᴇ ᴛᴏ ᴄʜᴇᴄᴋ ʏᴏᴜʀ ɪɴғᴏ !!**\n\n**Assɪsᴛᴀɴᴛ =** `Gᴇᴛ ʏᴏᴜʀ ɪɴғᴏ ᴛʜʀᴏᴜɢʜ ʏᴏᴜʀ ᴀssɪsᴛᴀɴᴛ.`\n\n**Cᴜʀʀᴇɴᴛ Cʜᴀᴛ =** `Sᴇɴᴅ ʏᴏᴜʀ ɪɴғᴏ ɪɴ ᴄᴜʀʀᴇɴᴛ ᴄʜᴀᴛ.`",
        buttons=X)
    await event.answer([result])


@bot.on(admin_cmd(pattern="me"))
예제 #27
0
    )


@callback("deletedissht")
async def ytfuxist(e):
    try:
        await e.answer("Deleted.")
        await e.delete()
    except BaseException:
        try:
            await ultroid.delete_messages(e.chat_id, e.id)
        except BaseException:
            pass


@asst.on(events.InlineQuery(pattern=re.compile("ip_(.*)")))
@in_owner
async def in_pm_ans(event):
    from_user = int(event.pattern_match.group(1))
    try:
        warns = U_WARNS[from_user]
    except Exception as e:
        print(e)
        warns = "?"
    wrns = f"{warns}/{WARNS}"
    await event.answer([
        await event.builder.article(
            title="Inline PMPermit.",
            text=f"**Userbot of {OWNER_NAME}!**",
            buttons=[
                [
예제 #28
0
@borg.on(admin_cmd(pattern="btn (.*)"))
@borg.on(sudo_cmd(pattern="btn", allow_sudo=True))
async def Buttons(event):
    await eor(event, "`Mᴀᴋɪɴɢ Yᴏᴜʀ Bᴜᴛᴛᴏɴ ᴡᴇɪᴛ ᴍᴀsᴛᴇʀ !!!`")
    ULTRAX = Var.TG_BOT_USER_NAME_BF_HER
    pro = event.text[7:]
    pro, boy = pro.split("|")
    f = open("Button.txt", "w")  # by LEGENDX22, PROBOYX
    f.write(f"{pro}\n{boy}")
    f.close()
    LEGENDX = await bot.inline_query(ULTRAX, "BUTTON")
    await LEGENDX[0].click(event.chat_id)
    await event.delete()


@xbot.on(events.InlineQuery(pattern="BUTTON"))
async def file(event):
    f = open("Button.txt")
    ok = f.readlines()[0]
    f.close()
    PROBOYX = open("Button.txt")
    bc = PROBOYX.readlines()[1]
    PROBOYX.close()
    LEGENDX = event.builder
    DEVIL = [[Button.url(f"{ok}", f"{bc}")]]
    INUKA = LEGENDX.article(title="Button by DaisyX",
                            text=f"{ok}",
                            buttons=DEVIL)
    await event.answer([INUKA])

예제 #29
0
 def decorator(func):
     tbot.add_event_handler(func, events.InlineQuery(**args))
     return func
예제 #30
0
파일: cobra.py 프로젝트: erruuuu/javes-2.0
import requests
from telethon import Button, custom, events, functions
from youtubesearchpython import SearchVideos
from userbot.javes_main.heroku_var import Var
from userbot import ALIVE_NAME, CMD_HELP, CMD_LIST
#A stark bhai chori karna aaya ho kya friday me ek bar back btn kang kar k man nahi bhara
#Agar stark nahi ho to kon hai be tu jo bhi hai kang karna he aaya hai mera back , open btn so get lost
if Var.TG_BOT_USER_NAME_BF_HER is not None and tgbot is not None:

    # 🇦 🇦 🇵     🇾 🇦 🇭 🇦    🇦 🇦 🇾 🇪    🇰 🇮 🇸     🇱 🇮 🇾 🇪 ??

    # 🇨 🇭 🇦 🇱 🇴      🇸 🇮 🇷    🇵 🇱 🇪 🇦 🇸 🇪    🇬 🇪 🇹 🇴 🇺 🇹

    #       🇮 🇹 🇳 🇦    🇰 🇾 🇺   🇸 🇵 🇾     🇰 🇷    🇷 🇭 🇪     🇭 🇴      🇸 🇭 🇦 🇦 🇩 🇮    🇰 🇷 🇳 🇮    🇭    🇰 🇾 🇦   🇧 🇸 🇩 🇰

    @tgbot.on(events.InlineQuery(pattern=r"helpr"))  # pylint:disable=E0602
    async def inline_id_handler(event: events.InlineQuery.Event):
        builder = event.builder
        result = None
        query = event.text
        me = await client.get_me()
        if event.query.user_id == me.id and query.startswith("helpr"):
            rev_text = query[::-1]
            dc = paginate_help(0, CMD_HELP, "helpr")
            result = builder.article(
                " Userbot Help",
                text="{}\nCurrently Loaded Plugins: {}".format(
                    query, len(CMD_HELP)),
                buttons=dc,
                link_preview=False)
            await event.answer([result] if result else None)