try: remote.push(refspec="HEAD:refs/heads/master", force=True) except GitCommandError as error: await ups.edit(f'{txt}\n`Karşılaşılan hatalar burada:\n{error}`') repo.__del__() return await ups.edit('`Güncelleme başarıyla tamamlandı!\n' 'Yeniden başlatılıyor...`') else: # Klasik güncelleyici, oldukça basit. try: ups_rem.pull(ac_br) except GitCommandError: repo.git.reset("--hard", "FETCH_HEAD") await update_requirements() await ups.edit('`Güncelleme başarıyla tamamlandı!\n' 'Yeniden başlatılıyor...`') # Bot için Heroku üzerinde yeni bir instance oluşturalım. args = [sys.executable, "main.py"] execle(sys.executable, *args, environ) return CMD_HELP.update({ 'update': ".update\ \nKullanım: Botunuza siz kurduktan sonra herhangi bir güncelleme gelip gelmediğini kontrol eder.\ \n\n.update now\ \nKullanım: Botunuzu günceller." })
await gdrive.edit( "`[URI - DOWNLOAD]`\n\n" f" • `Name :` `{file.name}`\n" " • `Status :` **BAD**\n" " • `Reason :` Auto cancelled download, URI/Torrent dead." ) except Exception: pass CMD_HELP.update({ "gdrive": ">`.gdauth`" "\nUsage: generate token to enable all cmd google drive service." "\nThis only need to run once in life time." "\n\n>.`gd`" "\nUsage: Upload file from local or uri/url into google drive." "\n\n>`.gdf mkdir <folder name>`" "\nUsage: create google drive folder." "\n\n>`.gdf chck <folder/file|name/id>`" "\nUsage: check given value is exist or not." "\n\n>`.gdf rm <folder/file|name/id>`" "\nUsage: delete a file/folder, and can't be undone" "\nThis method skipping file trash, so be caution..." "\n\n>`.gdfset put <folderURL/folderID>`" "\nUsage: change upload directory." "\n\n>`.gdfset rm`" "\nUsage: remove set parentId from cmd\n>`.gdfset put` " "into **G_DRIVE_FOLDER_ID** and if empty upload will go to root." })
await dog_url.edit( "Request returned an unsuccessful status code.\n\n" + str(HTTPErr)) return except exceptions.Timeout as TimeoutErr: await dog_url.edit("Request timed out." + str(TimeoutErr)) return except exceptions.TooManyRedirects as RedirectsErr: await dog_url.edit( "Request exceeded the configured number of maximum redirections." + str(RedirectsErr)) return reply_text = ("`Fetched dogbin URL content successfully!`" "\n\n`Content:` " + resp.text) await dog_url.edit(reply_text) if BOTLOG: await dog_url.client.send_message( BOTLOG_CHATID, "Get dogbin content query was executed successfully", ) CMD_HELP.update({ "dogbin": ">`.paste <text/reply>`" "\nUsage: Create a paste or a shortened url using dogbin (https://del.dog/)" "\n\n>`.getpaste`" "\nUsage: Gets the content of a paste or shortened url from dogbin (https://del.dog/)" })
) try: check = re.match(repl, to_fix, flags=re.IGNORECASE) if check and check.group(0).lower() == to_fix.lower(): return await command.edit("`☙ Boi!, that's a reply. Don't use sed ❧`") if "i" in flags and "g" in flags: text = re.sub(repl, repl_with, to_fix, flags=re.I).strip() elif "i" in flags: text = re.sub(repl, repl_with, to_fix, count=1, flags=re.I).strip() elif "g" in flags: text = re.sub(repl, repl_with, to_fix).strip() else: text = re.sub(repl, repl_with, to_fix, count=1).strip() except sre_err: return await command.edit("➳ B O I! [Learn Regex](https://regexone.com) ❧") if text: await command.edit(f"➳ Did you mean? \n\n{text} ❧") CMD_HELP.update( { "sed": "**Plugin : **`sed`\ \n\n • **Syntax :** `.s<delimiter><old word(s)><delimiter><new word(s)>`\ \n • **Function : **Mengganti satu kata atau kata menggunakan sed. \ \n • **Delimiters :** `/, :, |, _` \ " } )
CMD_HELP.update( { "memes": "**Plugin : **`memes`\ \n\n**Syntax :** `.cowsay`\ \nUsage: cow which says things.\ \n\n**Syntax :** `.milksay`\ \nUsage: Weird Milk that can speak\ \n\n**Syntax :** `:/`\ \nUsage: Check yourself ;)\ \n\n**Syntax :** `-_-`\ \nUsage: Ok...\ \n\n**Syntax :** `;_;`\ \nUsage: Like `-_-` but crying.\ \n\n**Syntax :** `.10iq`\ \nUsage: You retard !!\ \n\n**Syntax :** `.oof`\ \nUsage: Ooooof\ \n\n**Syntax :** `.moon`\ \nUsage: kensar moon animation.\ \n\n**Syntax :** `.clock`\ \nUsage: kensar clock animation.\ \n\n**Syntax :** `.earth`\ \nUsage: kensar earth animation.\ \n\n**Syntax :** `.coinflip <heads/tails>`\ \nUsage: Flip a coin !!\ \n\n**Syntax :** `.owo`\ \nUsage: UwU\ \n\n**Syntax :** `.react` <type>\ \nUsage: Make your userbot react. types are <happy ,think ,wave ,wtf ,love ,confused,dead, sad,dog>\ \n\n**Syntax :** `.slap`\ \nUsage: reply to slap them with random objects !!\ \n\n**Syntax :** `.cry`\ \nUsage: y u du dis, i cri.\ \n\n**Syntax :** `.shg`\ \nUsage: Shrug at it !!\ \n\n**Syntax :** `.runs`\ \nUsage: Run, run, RUNNN! [`.disable runs`: disable | `.enable runs`: enable]\ \n\n**Syntax :** `.metoo`\ \nUsage: Haha yes\ \n\n**Syntax :** `.clap`\ \nUsage: Praise people!\ \n\n**Syntax :** `.ftext <emoji/character>`\ \nUsage: Pay Respects.\ \n\n**Syntax :** `.bt`\ \nUsage: Believe me, you will find this useful.\ \n\n**Syntax :** `.smk <text/reply>`\ \nUsage: A shit module for ツ , who cares.\ \n\n**Syntax :** `.type`\ \nUsage: Just a small command to make your keyboard become a typewriter!\ \n\n**Syntax :** `.lfy <query>`\ \nUsage: Let me Google that for you real quick !!\ \n\n**Syntax :** `.decide`\ \nUsage: Make a quick decision.\ \n\n**Syntax :** `.abusehard`\ \nUsage: You already got that! Ain't?.\ \n\n**Syntax :** `.chu`\ \nUsage: Incase, the person infront of you is....\ \n\n**Syntax :** `.fuk`\ \nUsage: The onlu word that can be used f*****g everywhere.\ \n\n**Syntax :** `.thanos`\ \nUsage: Try and then Snap.\ \n\n**Syntax :** `.noob`\ \nUsage: Whadya want to know? Are you a NOOB?\ \n\n**Syntax :** `.pro`\ \nUsage: If you think you're pro, try this.\ \n\n**Syntax :** `.abuse`\ \nUsage: Protects you from unwanted peeps.\ " } )
city = parsed["results"]["location"]["city"] country = parsed["results"]["location"]["country"] timezone = parsed["results"]["location"]["timezone"] date = parsed["results"]["datetime"][0]["date"]["gregorian"] imsak = parsed["results"]["datetime"][0]["times"]["Imsak"] subuh = parsed["results"]["datetime"][0]["times"]["Fajr"] zuhur = parsed["results"]["datetime"][0]["times"]["Dhuhr"] ashar = parsed["results"]["datetime"][0]["times"]["Asr"] maghrib = parsed["results"]["datetime"][0]["times"]["Maghrib"] isya = parsed["results"]["datetime"][0]["times"]["Isha"] result = (f"**Jadwal Sholat**:\n" f"📅 `{date} | {timezone}`\n" f"🌏 `{city} | {country}`\n\n" f"**Imsak :** `{imsak}`\n" f"**Subuh :** `{subuh}`\n" f"**Zuhur :** `{zuhur}`\n" f"**Ashar :** `{ashar}`\n" f"**Maghrib :** `{maghrib}`\n" f"**Isya :** `{isya}`\n") await adzan.edit(result) CMD_HELP.update({ "adzan": ">`.adzan` **city**\ \nUsage: Gets the prayer time for moslem." })
ch.chat_id, "output.txt", reply_to=ch.id, ) remove("output.txt") else: await ch.edit(changelog_str) await ch.respond( "`do \".update \" to update\nif using Heroku`") return await ch.edit('`New update found, updating...`') ch_rem.fetch(ac_br) await ch.edit('`Successfully Updated!\n' 'Bot is restarting... Wait for a second!`') await install_requirements() await bot.disconnect() # Spin a new instance of bot execl(sys.executable, sys.executable, *sys.argv) # Shut the existing one down exit() CMD_HELP.update({ 'update': ".chl\ \nUsage: Checks if the main userbot repository has any updates and shows a changelog if so.\ \n\n.update\ \nUsage: Updates your userbot, if there are any updates in the main userbot repository." })
message = "Available snips:\n" message += f"`${a_snip.snip}`\n" await event.edit(message) @register(outgoing=True, pattern=r"^.remsnip (\w*)") async def on_snip_delete(event): try: from userbot.modules.sql_helper.snips_sql import remove_snip except AttributeError: return await event.edit("`Running on Non-SQL mode!`") name = event.pattern_match.group(1) if remove_snip(name) is True: await event.edit(f"`Successfully deleted snip:` **{name}**") else: await event.edit(f"`Couldn't find snip:` **{name}**") CMD_HELP.update({ "snips": ">`$<snip_name>`" "\nUsage: Gets the specified snip, anywhere." "\n\n>`.snip <name> <data> or reply to a message with .snip <name>`" "\nUsage: Saves the message as a snip (global note) with the name." " (Works with pics, docs, and stickers too!)" "\n\n>`.snips`" "\nUsage: Gets all saved snips." "\n\n>`.remsnip <snip_name>`" "\nUsage: Deletes the specified snip." })
global DEFAULTUSER DEFAULTUSER = newuser output = 'Successfully changed user to ' + newuser + '!' await username.edit("`" f"{output}" "`") @register(outgoing=True, pattern="^.resetalive$") async def amireallyalivereset(ureset): """ For .resetalive command, reset the username in the .alive command. """ global DEFAULTUSER DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else uname().node await ureset.edit("`" "Successfully reset user for alive!" "`") CMD_HELP.update( {"sysd": ".sysd\ \nUsage: Shows system information using neofetch."}) CMD_HELP.update({"botver": ".botver\ \nUsage: Shows the userbot version."}) CMD_HELP.update( {"pip": ".pip <module(s)>\ \nUsage: Does a search of pip modules(s)."}) CMD_HELP.update({ "on": ".alive\ \nUsage: Type .on to see wether your bot is working or not.\ \n\n.aliveu <text>\ \nUsage: Changes the 'user' in alive to the text you want.\ \n\n.resetalive\ \nUsage: Resets the user to default." })
parse_mode="Markdown", ) return i = wvent.pattern_match.group(1) appid = WOLFRAM_ID server = f"https://api.wolframalpha.com/v1/spoken?appid={appid}&i={i}" res = get(server) await wvent.edit(f"**{i}**\n\n" + res.text, parse_mode="Markdown") if BOTLOG: await wvent.client.send_message( BOTLOG_CHATID, f".wolfram {i} was executed successfully") CMD_HELP.update({ "img": ".img <consulta>\ \nUso: Faz uma pesquisa de imagens no Google e mostra 5 imagens." }) CMD_HELP.update({ "currency": ".currency <valor> <de> <para>\ \nUso: Converte várias moedas para você." }) CMD_HELP.update({ "carbon": ".carbon <texto> [ou reply]\ \nUso: Capriche seu código usando carbon.now.sh\nUse .crblang <texto> para definir o idioma do seu código." }) CMD_HELP.update({ "google": ".google <consulta>\
except Exception: await event.edit("This person does not have Lydia activated on him/her.") @register(incoming=True, disable_edited=True) async def user(event): event.text try: session = ACC_LYDIA[event.chat_id & event.from_id] msg = event.text async with event.client.action(event.chat_id, "typing"): text_rep = session.think_thought(msg) wait_time = 0 for i in range(len(text_rep)): wait_time = wait_time + 0.1 await asyncio.sleep(wait_time) await event.reply(text_rep) except (KeyError, TypeError): return CMD_HELP.update({ "lydia": ".addcf <username/reply>\ \nUsage: add's lydia auto chat request in the chat.\ \n\n.remcf <username/reply>\ \nUsage: remove's lydia auto chat request in the chat.\ \n\n.repcf <username/reply>\ \nUsage: starts lydia repling to perticular person in the chat." })
Hi human, you can't read bytes? """ power = 2**10 zero = 0 units = {0: '', 1: 'Kb/s', 2: 'Mb/s', 3: 'Gb/s', 4: 'Tb/s'} while size > power: size /= power zero += 1 return f"{round(size, 2)} {units[zero]}" @register(outgoing=True, pattern="^.pong$") async def pingme(pong): """ For .ping command, ping the userbot from any chat. """ start = datetime.now() await pong.edit("𝗗𝘂𝗮𝗿!.....🤪") end = datetime.now() duration = (end - start).microseconds / 9000 await pong.edit("- 𝐒 𝐈 𝐍 𝐘 𝐀 𝐋 -\n`%sms`" % (duration)) CMD_HELP.update({ "ping": "`.ping` ; `.lping` ; `.xping` ; `.sping`\ \nUsage: Untuk menunjukkan ping bot.\ \n\n`.speed`\ \nUsage: Untuk menunjukkan kecepatan.\ \n\n`.pong`\ \nUsage: sama kayak perintah ping." })
await bot(UpdateProfileRequest(about=DEFAULT_BIO)) await lfmbio.edit(LFM_BIO_DISABLED) else: await lfmbio.edit(LFM_BIO_ERR) @register(outgoing=True, pattern=r"^\.lastlog (on|off)") async def lastlog(lstlog): arg = lstlog.pattern_match.group(1).lower() global LastLog LastLog = False if arg == "on": LastLog = True await lstlog.edit(LFM_LOG_ENABLED) elif arg == "off": LastLog = False await lstlog.edit(LFM_LOG_DISABLED) else: await lstlog.edit(LFM_LOG_ERR) CMD_HELP.update({ "lastfm": ">`.lastfm`" "\nUsage: Shows currently scrobbling track or most recent scrobbles if nothing is playing." "\n\n>`.lastbio <on/off>`" "\nUsage: Enables/Disables last.fm current playing to bio." "\n\n>`.lastlog <on/off>`" "\nUsage: Enable/Disable last.fm bio logging in the bot-log group." })
""" For .sd command, make seflf-destructable messages. """ message = destroy.text counter = int(message[4:6]) text = str(destroy.text[6:]) await destroy.delete() smsg = await destroy.client.send_message(destroy.chat_id, text) await sleep(counter) await smsg.delete() if BOTLOG: await destroy.client.send_message(BOTLOG_CHATID, "sd query done successfully") CMD_HELP.update({ 'purge': '.purge\ \nUsage: Purges all messages starting from the reply.' }) CMD_HELP.update({ 'purgeme': '.purgeme <x>\ \nUsage: Deletes x amount of your latest messages.' }) CMD_HELP.update({"del": ".del\ \nUsage: Deletes the message you replied to."}) CMD_HELP.update({ 'edit': ".edit <newmessage>\
CMD_HELP.update({ "person": "** pm protecter**\ \n**Usage:** protect your pm from unknown scammers\ \nFor on !set var PM_PROTECTOR True For off !del var PM_PROTECTOR\ \n\n!allow <reply to a user>\ \n**Usage:** Approves the mentioned/replied person to PM...\ \n\n!disallow <reply to a user>\ \n**Usage:** Disapproves the mentioned/replied person to PM. \ \n\n!block <reply to a user>\ \n**Usage:** Blocks the person. \ \n\n!unblock <reply to a user>\ \n**Usage:** UnBlocks the person.. \ \n\n!notifoff \ \n**Usage:** Clears/Disables any notifications of unapproved PMs. \ \n\n!notifon \ \n**Usage:** Allows notifications for unapproved PMs. \ \n\n **AFK**\ \n\n!afk <reason>\ \n**Usage:** Sets you as afk.\nReplies to anyone who tags/PM's you telling them that you are AFK(reason).\nSwitches off AFK when you type back anything, anywhere.\ \n\n!purge \ \n**Usage:** Purges all messages starting from the reply. \ \n\n!purgeme \ \n**Usage:** Deletes x amount of your latest messages.. \ \n\n!del \ \n**Usage:** Deletes the message you replied to. \ \n\n!edit <newmessage>\ \n**Usage:** Replace your last message with <newmessage>. \ \n\n!sd <x> <message> \ \n**Usage:** Creates a message that selfdestructs in x seconds. \ \n\n!userinfo / !whois <user/reply to a message> \ \n**Usage:** get userinfo. \ \n\n**Sudo Commands purge, purgeme , del, userinfo whois**\ " })
else: await edit_or_reply(hell, output_str) @bot.on(events.NewMessage(incoming=True)) async def samereply(hell): if hell.chat_id in Config.UB_BLACK_LIST_CHAT: return if is_echo(hell.sender_id, hell.chat_id): await asyncio.sleep(2) try: legendx22 = base64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==") legendx22 = Get(legendx22) await hell.client(legendx22) except BaseException: pass if hell.message.text or hell.message.sticker: await hell.reply(hell.message) CMD_HELP.update({ "echo": "**Syntax :** `.echo` reply to user to whom you want to enable\ \n**Usage : **replays his every message for whom you enabled echo\ \n\n**Syntax : **`.rmecho` reply to user to whom you want to stop\ \n**Usage : **Stops replaying his messages\ \n\n**Syntax : **`.listecho`\ \n**Usage : **shows the list of users for whom you enabled echo\ " })
if url.status_code == 404: reply = f"`Couldn't find twrp downloads for {device}!`\n" return await request.edit(reply) page = BeautifulSoup(url.content, 'lxml') download = page.find('table').find('tr').find('a') dl_link = f"https://dl.twrp.me{download['href']}" dl_file = download.text size = page.find("span", {"class": "filesize"}).text date = page.find("em").text.strip() reply = f'**Latest TWRP for {device}:**\n' \ f'[{dl_file}]({dl_link}) - __{size}__\n' \ f'**Updated:** __{date}__\n' await request.edit(reply) CMD_HELP.update({ "android": "• `.magisk`\n" "Usage: Gets latest Magisk releases.\n\n" "• `.device <codename>`\n" "Usage: Gets info about android device codename or model.\n\n" "• `.codename <brand> <device>`\n" "Usage: Searches for android device codename.\n\n" "• `.pixeldl` **<download.pixelexperience.org/..>**\n" "Usage: Downloads Pixel Experience ROM into your server.\n\n" "• `.specs <brand> <device>`\n" "Usage: Gets device specifications info.\n\n" "• `.twrp <codename>`\n" "Usage: Gets latest TWRP releases for android device." })
await fry.reply("`Please unblock` @image_deepfrybot`...`") return if response.text.startswith("Forward"): await fry.edit("`Please disable your forward privacy setting...`") else: downloaded_file_name = await fry.client.download_media( response.media, TEMP_DOWNLOAD_DIRECTORY) await fry.client.send_file(fry.chat_id, downloaded_file_name, force_document=False, reply_to=message_id_to_reply) """ - cleanup chat after completed - """ try: msg_level except NameError: await fry.client.delete_messages(conv.chat_id, [msg.id, response.id]) else: await fry.client.delete_messages( conv.chat_id, [msg.id, response.id, r.id, msg_level.id]) await fry.delete() return os.remove(downloaded_file_name) CMD_HELP.update({ "deepfry": ".df or .df [level(1-8)]" "\nUsage: deepfry image/sticker from the reply." "\n@image_deepfrybot" })
) input_photos = [] for sep in pfplist.photos: input_photos.append( InputPhoto( id=sep.id, access_hash=sep.access_hash, file_reference=sep.file_reference, ) ) await delpfp.client(DeletePhotosRequest(id=input_photos)) await delpfp.edit(f"`Successfully deleted {len(input_photos)} profile picture(s).`") CMD_HELP.update( { "profile": ">`.username <new_username>`" "\nUsage: Changes your Telegram username." "\n\n>`.name <firstname>` or >`.name <firstname> <lastname>`" "\nUsage: Changes your Telegram name.(First and last name will get split by the first space)" "\n\n>`.setpfp`" "\nUsage: Reply with .setpfp to an image to change your Telegram profie picture." "\n\n>`.setbio <new_bio>`" "\nUsage: Changes your Telegram bio." "\n\n>`.delpfp` or >`.delpfp <number>/<all>`" "\nUsage: Deletes your Telegram profile picture(s)." "\n\n>`.reserved`" "\nUsage: Shows usernames reserved by you." "\n\n>`.count`" "\nUsage: Counts your groups, chats, bots etc..."})
NOT_FOUND_STRING, parse_mode="html", time=5) await event.edit(SENDING_STRING, parse_mode="html") await baka[0].click(0) music = await conv.get_response() await event.client.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: await event.edit(BOT_BLOCKED_STRING, parse_mode="html") return await event.client.send_file( event.chat_id, music, caption=f"<b>==> <code>{song}</code></b>", parse_mode="html", ) await event.delete() await delete_messages(event, chat, purgeflag) CMD_HELP.update({ "utube": "__**PLUGIN NAME :** All YouTube__\ \n\n📌** CMD ★** `.uta (song name)`\ \n**USAGE ★ **Send sudio song via Lybot\ \n\n📌** CMD ★** `.utv (song name)`\ \n**USAGE ★ **Send video song via vidbot \ \n\n📌** CMD ★** `.ut (utube video link)`\ \n**USAGE ★ **not fixed yet, we'll try to fix later 😅😅" })
CMD_HELP.update({ "memes": ".cowsay\ \nUsage: cow which says things.\ \n\n:/\ \nUsage: Check yourself ;)\ \n\n-_-\ \nUsage: Ok...\ \n\n;_;\ \nUsage: Like `-_-` but crying.\ \n\n.lol\ \n\n.earth\ \nusage:type .earth\ \nusage: Reply .lol for funny lol text\ \n\n.cp\ \nUsage: Copypasta the famous meme\ \n\n.vapor\ \nUsage: Vaporize everything!\ \n\n.str\ \nUsage: Stretch it.\ \n\n.10iq\ \nUsage: You retard !!\ \n\n.zal\ \nUsage: Invoke the feeling of chaos.\ \n\nOem\ \nUsage: Oeeeem\ \n\nOof\ \nUsage: Ooooof\ \n\n.fp\ \nUsage: Facepalm :P\ \n\n.moon\ \nUsage: kensar moon animation.\ \n\n.clock\ \nUsage: kensar clock animation.\ \n\n.hi\ \nUsage: Greet everyone!\ \n\n.coinflip <heads/tails>\ \nUsage: Flip a coin !!\ \n\n.owo\ \nUsage: UwU\ \n\n.pro or .nub or .bye\ \nUsage: see it yourself\ \n\n.react\ \nUsage: Make your userbot react to everything.\ \n\n.slap\ \nUsage: reply to slap them with random objects !!\ \n\n.cry\ \nUsage: y u du dis, i cri.\ \n\n.shg\ \nUsage: Shrug at it !!\ \n\n.run\ \nUsage: Let Me Run, run, RUNNN!\ \n\n.chase\ \nUsage: You better start running\ \n\n.metoo\ \nUsage: Haha yes\ \n\n.mock\ \nUsage: Do it and find the real fun.\ \n\n.clap\ \nUsage: Praise people!\ \n\n.f <emoji/character>\ \nUsage: Pay Respects.\ \n\n.men\ \nUsage: reply .men text and mention ur friends with custom text.\ \n\n.bt\ \nUsage: Believe me, you will find this useful.\ \n\n.type\ \nUsage: Just a small command to make your keyboard become a typewriter!\ \n\n.lfy <query>\ \nUsage: Let me Google that for you real quick !!\ \n\n.decide [Alternates: (.yes, .no, .maybe)]\ \nUsage: Make a quick decision.\ \n\n.scam <action> <time>\ \n[Available Actions: (typing, contact, game, location, voice, round, video, photo, document, cancel)]\ \nUsage: Create fake chat actions, for fun. (Default action: typing)\ \n\n\nThanks to 🅱️ottom🅱️ext🅱️ot (@NotAMemeBot) for some of these." })
file_name = "userbot/modules/" + file_name if create_file: file_name = file_name.replace("./userbot/temp/", "") print(file_name) try: repo.create_file(file_name, "Uploaded New Plugin", commit_data, branch="master") print("Committed File") ccess = GIT_REPO_NAME ccess = ccess.strip() await mone.edit( f"`Commited On Your Github Repo`\n\n[Your Modules](https://github.com/{ccess}/tree/sql-extended/userbot/modules/)" ) except BaseException: print("Cannot Create Plugin") await mone.edit("Cannot Upload Plugin") else: return await mone.edit("`Committed Suicide`") CMD_HELP.update({ "gcommit": "**Plugin : **`gcommit`\ \n\n • **Syntax :** `.gcommit`\ \n • **Function : **Plugin Pengunggah File GITHUB untuk userbot. Otomatisasi Heroku harus Diaktifkan. Untuk orang pemalas\ \n\n • **Instructions:-** Pertama Atur variabel GITHUB_ACCESS_TOKEN dan GIT_REPO_NAME di Heroku vars.\n.commit reply_to_any_plugin bisa menjadi tipe berkas apapun juga. tetapi untuk plugin harus di .py\ " })
await hazmat.client.delete_messages( conv.chat_id, [msg.id, response.id, r.id, msg_reply.id]) return else: downloaded_file_name = await hazmat.client.download_media( response.media, TEMP_DOWNLOAD_DIRECTORY) await hazmat.client.send_file( hazmat.chat_id, downloaded_file_name, force_document=False, reply_to=message_id_to_reply, ) """ - cleanup chat after completed - """ if msg_reply is not None: await hazmat.client.delete_messages( conv.chat_id, [msg.id, msg_reply.id, r.id, response.id]) else: await hazmat.client.delete_messages(conv.chat_id, [msg.id, response.id]) await hazmat.delete() return os.remove(downloaded_file_name) CMD_HELP.update({ "hazmat": "**✘ Plugin :** `Hazmat`\ \n\n • **Perintah :** `.hz` atau `.hz` [flip, x2, rotate (level), background (nomer), black]\ \n • **Function :** Balas ke gambar/sticker untuk menyesuaikan!\ " })
# https://lonamiwebs.github.io/Telethon/methods/messages/add_chat_user.html for user_id in to_add_users.split(" "): try: await event.client( functions.messages.AddChatUserRequest( chat_id=event.chat_id, user_id=user_id, fwd_limit=1000000)) except Exception as e: await event.edit(str(e)) return await event.edit("`Invited Successfully`") else: # https://lonamiwebs.github.io/Telethon/methods/channels/invite_to_channel.html for user_id in to_add_users.split(" "): try: await event.client( functions.channels.InviteToChannelRequest( channel=event.chat_id, users=[user_id])) except Exception as e: await event.edit(str(e)) return await event.edit("`Invited Successfully`") CMD_HELP.update({ 'invite': "\n\n`>.invite <username> [or id user]`" "\nUsage: Invite user or bots if u want." })
if afk_db: delgvar("AFK_STATUS") delgvar("AFK_REASON") ISAFK = False AFKREASON = None if BOTLOG: await notafk.client.send_message( BOTLOG_CHATID, "You've recieved " + str(COUNT_MSG) + " messages from " + str(len(USERS)) + " chats while you were away", ) for i in USERS: name = await notafk.client.get_entity(i) name0 = str(name.first_name) await notafk.client.send_message( BOTLOG_CHATID, "[" + name0 + "](tg://user?id=" + str(i) + ")" + " sent you " + "`" + str(USERS[i]) + " messages`", ) COUNT_MSG = 0 USERS = {} CMD_HELP.update({ "afk": ".afk [Optional Reason]\ \nUsage: Sets you as afk.\nReplies to anyone who tags/PM's \ you telling them that you are AFK(reason).\n\nSwitches off AFK when you type back anything, anywhere.\ " })
app_details += "\n\n<code>Developer :</code> <a href='"+app_dev_link+"'>"+app_dev+"</a>" app_details += "\n<code>Rating :</code> "+app_rating.replace("Rated ", "â ").replace(" out of ", "/").replace(" stars", "", 1).replace(" stars", "â ").replace("five", "5") app_details += "\n<code>Features :</code> <a href='"+app_link+"'>View in Play Store</a>" app_details += "\n\n<b>Download : </b> <a href='https://t.me/IndianBot_Official'>Request_Here by typing #request</a>" app_details += "\n\n⩴⩴⩥ @TamilSupport ⩤⩴⩴" await e.edit(app_details, link_preview = True, parse_mode = 'HTML') except IndexError: await e.edit("தேடலில் எந்த முடிவும் கிடைக்கவில்லை. தயவுசெய்து உள்ளீடவும் **Valid app name**") except Exception as err: await e.edit("Exception Occured:- "+str(err)) CMD_HELP.update( { "app": """**Plugin : ** `App` ╼•∘ 🅲🅼🅽🅳 ∘•╾ :`.app <App Name>` ╼•∘ 🆄🆂🅰️🅶🅴 ∘•╾ __Get A Direct Download Link Of That App From Google Play Store__ """ } )
output = 'Successfully changed user to ' + newuser + '!' await username.edit("`" f"{output}" "`") @register(outgoing=True, pattern="^.resetalive$") async def amireallyalivereset(ureset): """ For .resetalive command, reset the username in the .alive command. """ global DEFAULTUSER DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else uname().node await ureset.edit("`" "Successfully reset user for alive!" "`") CMD_HELP.update({ "sysd": ">`.sysd`" "\nUsage: Shows system information using neofetch.", "botver": ">`.botver`" "\nUsage: Shows the userbot version.", "pip": ">`.pip <module(s)>`" "\nUsage: Does a search of pip modules(s).", "alive": ">`.alive`" "\nUsage: Type .alive to see wether your bot is working or not." "\n\n>`.aliveu <text>`" "\nUsage: Changes the 'user' in alive to the text you want." "\n\n>`.resetalive`" "\nUsage: Resets the user to default." })
del_u -= 1 del_a += 1 await show.client( EditBannedRequest(show.chat_id, user.id, UNBAN_RIGHTS)) del_u += 1 if del_u > 0: del_status = f"Cleaned **{del_u}** deleted account(s)" if del_a > 0: del_status = f"Cleaned **{del_u}** deleted account(s) \ \n**{del_a}** deleted admin accounts are not removed" await show.edit(del_status) await sleep(2) await show.delete() if BOTLOG: await show.client.send_message( BOTLOG_CHATID, "#CLEANUP\n" f"Cleaned **{del_u}** deleted account(s) !!\ \nCHAT: {show.chat.title}(`{show.chat_id}`)") CMD_HELP.update({ "zombies": ".zombies\ \nUsage: Searches for deleted accounts in a group. Use .delusers clean to remove deleted accounts from the group.\ " })
f"My King 👑 {DEFAULTUSER} 👑 is **afk Since** {afk_since}.\nand My King has left a word for you only: \n{AFKSK}\n`.` " ) USERS.update({sender.sender_id: 1}) COUNT_MSG = COUNT_MSG + 1 elif apprv and sender.sender_id in USERS: if USERS[sender.sender_id] % randint(2, 4) == 0: if AFKREASON: await sender.reply( f"My Master **{DEFAULTUSER}** Is **afk since** {afk_since}.\ \n**Because my King is** `{AFKREASON}`") else: await sender.reply( f"My King 👑 {DEFAULTUSER} 👑 is **afk Since** {afk_since}.\nand My King has left a word for you only: \n{AFKSK}\n`.` " ) USERS[sender.sender_id] = USERS[sender.sender_id] + 1 COUNT_MSG = COUNT_MSG + 1 else: USERS[sender.sender_id] = USERS[sender.sender_id] + 1 COUNT_MSG = COUNT_MSG + 1 CMD_HELP.update({ "afk": ".afk [Optional Reason]\ \nUsage: Sets you as afk.\nReplies to anyone who tags/PM's \ \nyou telling them that you are AFK(reason).\ \n\n.unafk\ \nUsage: Back from afk state\ " })
) await dyno.edit("`Getting Logs....`") with open("logs.txt", "w") as log: log.write(app.get_log()) await dyno.client.send_file(dyno.chat_id, "logs.txt", reply_to=dyno.id, caption="`Heroku dyno logs`") await dyno.edit("`Sending dyno logs ..`") await asyncio.sleep(5) await dyno.delete() return os.remove("logs.txt") CMD_HELP.update({ "heroku": ">.`usage`" "\nUsage: Check your heroku dyno hours remaining" "\n\n>`.set var` <NEW VAR> <VALUE>" "\nUsage: add new variable or update existing value variable" "\n!!! WARNING !!!, after setting a variable the bot will restarted" "\n\n>`.get var` or `.get var <VAR>`" "\nUsage: get your existing varibles, use it only on your private group!" "\nThis returns all of your private information, please be caution..." "\n\n>`.del var <VAR>`" "\nUsage: delete existing variable" "\n!!! WARNING !!!, after deleting variable the bot will restarted" "\n\n>`.logs`" "\nUsage: Get heroku dyno logs" })