async def pat(e): global _pats switch = e.pattern_match.group(1) caption = e.pattern_match.group(2) url = 'https://headp.at/js/pats.json' if not _pats: async with aiohttp.ClientSession() as session: async with session.post(url) as raw_resp: resp = await raw_resp.text() _pats = json.loads(resp) pats = _pats if 'g' in switch: pats = [i for i in pats if os.path.splitext(i)[1] == '.gif'] elif 'p' in switch: c = lambda j: os.path.splitext(j)[1] in ['.png', '.jpg', '.jpeg'] pats = [i for i in pats if c(i)] pat = random.choice(pats) link = f'https://headp.at/pats/{urlencode(pat)}' if 'l' in switch: caption = f'{caption or ""}\n\n{link}' await asyncio.wait([ e.respond(caption, file=link, reply_to=e.reply_to_msg_id), e.delete() ]) CMD_HELP.update({'pat': '.pat\ \nUsage: sends random pat pics & gifs.'})
CMD_HELP.update({ "remixmisc": "`.app`\ \nUsage: type .app name and get app details.\ \n\n`.undlt`\ \nUsage: undo deleted message but u need admin permission.\ \n\n`.calc`\ \nUsage:.calc <term1><operator><term2>\nFor eg .calc 02*02 or 99*99 (the zeros are important) (two terms and two digits max).\ \n\n`.remove`\ \nUsage:.remove d or y or m or w or o or q or r.\n(d=deletedaccount y=userstatsempty m=userstatsmonth w=userstatsweek o=userstatsoffline q=userstatsonline r=userstatsrecently).\ \n\n`.xcd`\ \nUsage: type xcd <query>.ps:i have no damm idea how it works 🤷\ \n\n`.grab` <count>\ \nUsage:replay .grab or .grab <count> to grab profile picture.\ \n\n`.rnupload` filename.extenstion\ \nUsage:reply to a sticker and type .rnupload xyz.jpg\ \n\n`.clone` @username and '.rclone' for reverting\ \nUsage: clone you whole freking account except username so stay safe\ \n\n`.res`\ \nUsage: type account,channel,group or bot username and reply with .res and check restriction\ \n\n`.watch` <movie/tv> show\ \nUsage:know details about particular movie/show.\ \n\n`.weeb` <text>\ \nUsage:weebify a text\ \n\nIt contains (`.bold <text>`,`.cur <text>`,`.curbold <text>`,`.medi <text>`,`.medibold <text>`,`.doublestruck <text>`)\ \nUsage:makes your text <bold,cursive,cursivebold,medival,medivalbold,gayishbold>\ \n\n`.randompp`\ \nUsage:Automatically changes your profile picture after one hour. To stop this use .restart.\ \n\n`.gps` <location name>.\ \nUsage:Sends you the given location name.\ \n\n`.ls` <directory>.\ \nUsage:Get list file inside directory.\ \n\n<`.modi` or `.trump` or `.cmm` or `.kanna`> <text>\ \n\nUsage: just for fun.\ \n\n`.hc` **sign**\ \nExample:`.hc scorpio`\ \nUsage:Gets your horoscope.\ \n\n`.tweet` <username>.<tweet>\ \nUsage:Create tweet with custom username.\ \n\nmention: Mention users with a custom name.\ \nUsage:`Hi @ender1324[bluid boi]`\ \nResult:Hi [bluid boi](tg://resolve?domain=ender1324)." })
with io.BytesIO() as image: await sticker.client.download_media(img, image) image.name = 'sticker.png' image.seek(0) try: await img.reply(file=image, force_document=True) except Exception: await sticker.edit("`Error, can't send file...`") else: await sticker.delete() return CMD_HELP.update({ "stickers": "`.kang`\ \nUsage: Reply .kang to a sticker or an image to kang it to your wolfuserbot pack.\ \n\n`.kang` [emoji('s)]\ \nUsage: Works just like .kang but uses the emoji('s) you picked.\ \n\n`.kang` [number]\ \nUsage: Kang's the sticker/image to the specified pack but uses 😃 as emoji.\ \n\n`.kang` [emoji('s)] [number]\ \nUsage: Kang's the sticker/image to the specified pack and uses the emoji('s) you picked.\ \n\n`.stkrinfo`\ \nUsage: Gets info about the sticker pack.\ \n\n`.getsticker`\ \nUsage:reply to a sticker to get 'PNG' file of sticker.\ \n\n`.cs <text>`\ \nUsage: Type .cs text and generate rgb sticker." })
""" For .filters command, lists all of the active filters in a chat. """ try: from wolfuserbot.modules.sql_helper.filter_sql import get_filters except AttributeError: return await event.edit("`Running on Non-SQL mode!`") transact = "`There are no filters in this chat.`" filters = get_filters(event.chat_id) for filt in filters: if transact == "`There are no filters in this chat.`": transact = "Active filters in this chat:\n" transact += "`{}`\n".format(filt.keyword) else: transact += "`{}`\n".format(filt.keyword) await event.edit(transact) CMD_HELP.update({ "filter": "`.filters`\ \nUsage: Lists all active wolfuserbot filters in a chat.\ \n\n`.filter` <keyword> <reply text> or reply to a message with .filter <keyword>\ \nUsage: Saves the replied message as a reply to the 'keyword'.\ \nThe bot will reply to the message whenever 'keyword' is mentioned.\ \nWorks with everything from files to stickers.\ \n\n`.stop` <filter>\ \nUsage: Stops the specified filter.\ \n\n`.rmbotfilters` <marie/rose>\ \nUsage: Removes all filters of admin bots (Currently supported: Marie, Rose and their clones.) in the chat." })
"!"): await event.edit("Wo") await asyncio.sleep(0.7) await event.edit("Degi") await asyncio.sleep(1) await event.edit("Tum") await asyncio.sleep(0.8) await event.edit("Ekbar") await asyncio.sleep(0.9) await event.edit("Mang") await asyncio.sleep(1) await event.edit("Kar") await asyncio.sleep(0.8) await event.edit("Toh") await asyncio.sleep(0.7) await event.edit("Dekho") await asyncio.sleep(1) await event.edit("`Wo Degi Tum Ekbar Mang Kar toh Dekho`") @register(outgoing=True, pattern="^.nehi$") async def _(event): if event.fwd_from: return await event.edit("`Wo PaKkA DeGi Tu ManG KaR ToH DekH`") await asyncio.sleep(999) CMD_HELP.update({"degi": ".degi or .nehi\ \nUsage: Sabka Katega."})
return_str += f"`{i+1}. {item}`\n" return_str += "\n`Choose one by typing the number " return_str += "in the command.`\n" return_str += f"Example: .date {c_name} 2" await dat.edit(return_str) return dtnow = dt.now(tz(time_zone)).strftime(d_form) if c_name != COUNTRY: await dat.edit( f"`It's` **{dtnow}** `in {c_name}({time_zone} timezone).`") return elif COUNTRY: await dat.edit(f"`It's` **{dtnow}** `here, in {COUNTRY}" f"({time_zone} timezone).`") return CMD_HELP.update({ "timedate": "`.time` <country name/code> <timezone number>\ \nUsage: Usage: Get the time of a country. If a country has multiple timezones, it will list all of them and let you select one.\ \n\n`.date` <country name/code> <timezone number>\ \nUsage: Get the date of a country. If a country has multiple timezones, it will list all of them and let you select one." })
@register(outgoing=True, pattern="^.remsnip (\w*)") async def on_snip_delete(event): """ For .remsnip command, deletes a snip. """ try: from wolfuserbot.modules.sql_helper.snips_sql import remove_snip except AttributeError: await event.edit("`Running on Non-SQL mode!`") return 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.\ " })
await bot.send_message( chat, "`This inbox has been blessed by my master. Consider yourself lucky.`\n**Increased Stability and Karma** (づ ̄ ³ ̄)づ" ) CMD_HELP.update({ "pm": "\ `.approve`\ \nUsage: Approves the mentioned/replied person to PM.\ \n\n`.disapprove`\ \nUsage: Disapproves the mentioned/replied person to PM.\ \n\n`.block`\ \nUsage: Blocks the person.\ \n\n`.unblock`\ \nUsage: Unblocks the person so they can PM you.\ \n\n`.notifoff`\ \nUsage: Clears/Disables any notifications of unapproved PMs.\ \n\n`.notifon`\ \nUsage: Allows notifications for unapproved PMs.\ \n\n`.pmute`\ \nUsage: Reply .pmute and it will mute that person in pm<can be used in group also>.\ \n\n`.punmute`\ \nUsage: Reply .punmute and it will unmute that person in pm.\ \n\n`logpms`\ \nUsage: If you don't want chat logs than use `.nolog` , for opposite use `.log`. Default is .log enabled\nThis will now log chat msgs to your PM_LOGGR_BOT_API_ID.\ \nnotice: now you can totally disable pm logs by adding heroku vars PM_LOGGR_BOT_API_ID by providing a valid group ID and NC_LOG_P_M_S True or False\ \nwhere False means no pm logs at all..enjoy.. update and do add above mentioned vars." })
CMD_HELP.update({ "admin": "`.promote` <username/reply> <custom rank (optional)>\ \nUsage: Provides admin rights to the person in the chat.\ \n\n`.demote` <username/reply>\ \nUsage: Revokes the person's admin permissions in the chat.\ \n\n`.ban` <username/reply> <reason (optional)>\ \nUsage: Bans the person off your chat.\ \n\n.lock <all (or) type(s)> or .unlock <all (or) type(s)>\ \nUsage: Allows you to lock/unlock some common message types in the chat.\ [NOTE: Requires proper admin rights in the chat !!]\ \n\nAvailable message types to lock/unlock are: \ \n`all, msg, media, sticker, gif, game, inline, poll, invite, pin, info`\ \n\n`.unban` <username/reply>\ \nUsage: Removes the ban from the person in the chat.\ \n\n`.mute` <username/reply> <reason (optional)>\ \nUsage: Mutes the person in the chat, works on admins too.\ \n\n`.unmute` <username/reply>\ \nUsage: Removes the person from the muted list.\ \n\n`.gmute` <username/reply> <reason (optional)>\ \nUsage: Mutes the person in all groups you have in common with them.\ \n\n`.ungmute` <username/reply>\ \nUsage: Reply someone's message with .ungmute to remove them from the gmuted list.\ \n\n`.zombies`\ \nUsage: Searches for deleted accounts in a group. Use .zombies clean to remove deleted accounts from the group.\ \n\n`.admins`\ \nUsage: Retrieves a list of admins in the chat.\ \n\n`.kick`\ \nUsage: kick users from groups.\ \n\n`.users` or `.users` <name of member>\ \nUsage: Retrieves all (or queried) users in the chat.\ \n\n`.setgpic` <reply to image>\ \nUsage: Changes the group's display picture.\ \n\n`.warn reason`\ \nUsage: warns users.\ \n\n`.resetwarns`\ \nUsage: Reset user's warns.\ \n\n`.getwarns`\ \nUsage: Shows the reason of warning.\ \n\n`.setflood` value.\ \nUsage:Sets flood limit in the current chat.\ \n\n`.strongwarn` <yes/on or no/off>.\ \nUsage:sets warn mode i.e <strong warn:bans user, soft warn: kicks user>.\ \n\n`.setwarn` value.\ \nUsage:sets warn limit." })
resp = await kick.get_reply_message() filters = resp.text.split("-")[1:] for i in filters: if bot_type == "marie": await kick.reply("/clear %s" % (i.strip())) if bot_type == "rose": i = i.replace('`', '') await kick.reply("/clear %s" % (i.strip())) await sleep(0.3) await kick.respond( "```Successfully purged bots notes yaay!```\n Gimme cookies!") if BOTLOG: await kick.client.send_message( BOTLOG_CHATID, "I cleaned all Notes at " + str(kick.chat_id)) CMD_HELP.update({ "notes": "\ #<notename>\ \nUsage: Gets the specified note.\ \n\n`.save` <notename> <notedata> or reply to a message with .save <notename>\ \nUsage: Saves the replied message as a note with the notename. (Works with pics, docs, and stickers too!)\ \n\n`.notes`\ \nUsage: Gets all saved notes in a chat.\ \n\n`.clear` <notename>\ \nUsage: Deletes the specified note.\ \n\n`.rmbotnotes` <marie/rose>\ \nUsage: Removes all notes of admin bots (Currently supported: Marie, Rose and their clones.) in the chat." })
event.chat_id, "output.txt", reply_to=event.id, ) remove("output.txt") else: await event.edit(changelog_str) return await event.respond('`do ".update now/deploy" to update`') if force_update: await event.edit( '`Force-Syncing to latest stable wolfuserbot code, please wait...`') else: await event.edit('`Updating Wolf User Bot, please wait....`') if conf == "now": await update(event, repo, ups_rem, ac_br) elif conf == "deploy": await deploy(event, repo, ups_rem, ac_br, txt) return CMD_HELP.update({ 'update': ".update" "\nUsage: Checks if the main wolfuserbot repository has any updates and shows a changelog if so." "\n\n.update now" "\nUsage: Update your wolfuserbot, if there are any updates in your wolfuserbot repository." "\n\n.update deploy" "\nUsage: Deploy your wolfuserbot at heroku, if there are any updates in your wolfuserbot repository." })
@register(outgoing=True, pattern="^.sd") async def selfdestruct(destroy): """ 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({ "messages": "`.purge`\ \nUsage: Purges all messages starting from the reply.\ \n\n`.purgeme` <x>\ \nusage: Deletes x amount of your latest messages..\ \n\n`.del`\ \nUsage: Deletes the message you replied to.\ \n\n`.edit`\ \nUsage: Replace your last message with <newmessage>.\ \n\n`.sd `<x> <message>\ \nUsage: Creates a message that selfdestructs in x seconds.\ \nKeep the seconds under 100 since it puts your bot to sleep" })
driver.find_element_by_xpath("//button[contains(text(),'Export')]").click() # driver.find_element_by_xpath("//button[contains(text(),'4x')]").click() # driver.find_element_by_xpath("//button[contains(text(),'PNG')]").click() await e.edit("`Processing..\n75%`") # Waiting for downloading while not os.path.isfile("/root/wolfuserbot/.bin/carbon.png"): await sleep(0.5) await e.edit("`Processing..\n100%`") file = '/root/wolfuserbot/.bin/carbon.png' await e.edit("`Uploading..`") await e.client.send_file( e.chat_id, file, caption="Made using [Carbon](https://carbon.now.sh/about/),\ \na project by [Dawn Labs](https://dawnlabs.io/)", force_document=True, reply_to=e.message.reply_to_msg_id, ) os.remove('/root/wolfuserbot/.bin/carbon.png') driver.quit() # Removing carbon.png after uploading await e.delete() # Deleting msg CMD_HELP.update({ "carbon": "`.carbon`value <values=1,2,3,4,5>\ \nUsage:reply or type .carbon1 or 2,3,4,5 value and beautify your text." })
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({ "waifu": "`.waifu` text\ \nUsage: for custom stickers.\ \n\n`.hz` or `.hz [flip, x2, rotate (degree), background (number), black]`\ \nUsage: Reply to a image / sticker to suit up!.\ \n\n`.rst`\ \nUsage: To stickerize your text with random sticker templates." })
m_list = None with open(downloaded_file_name, "rb") as fd: m_list = fd.readlines() for m in m_list: page_content += m.decode("UTF-8") + "\n" os.remove(downloaded_file_name) page_content = page_content.replace("\n", "<br>") response = telegraph.create_page(title_of_page, html_content=page_content) end = datetime.now() ms = (end - start).seconds await graph.edit( "Successfully uploaded to [telegra.ph](https://telegra.ph/{})." .format(response["path"], ms), link_preview=True) else: await graph.edit( "`Reply to a message to get a permanent telegra.ph link.`") def resize_image(image): im = Image.open(image) im.save(image, "PNG") CMD_HELP.update({ "telegraph": "`.tg` <media | text>\ \nUsage: Upload text & media on Telegraph.\n<Text: Text format || Media: Media format>" })
afk_since = f"`{int(seconds)}s`" if sender.sender_id not in USERS: if AFKREASON: await sender.reply(f"I'm AFK since {afk_since}.\ \nReason: `{AFKREASON}`") else: await sender.reply(str(choice(AFKSTR))) 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"I'm still AFK since {afk_since}.\ \nReason: `{AFKREASON}`") else: await sender.reply(str(choice(AFKSTR))) 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 \ you telling them that you are AFK(reason).\n\nSwitches off AFK when you type back anything, anywhere.\ " })
def is_gif(file): # ngl this should be fixed, telethon.utils.is_gif but working # lazy to go to github and make an issue kek if not is_video(file): return False if DocumentAttributeAnimated() not in getattr(file, "document", file).attributes: return False return True CMD_HELP.update({ "anime": "`.anime` <anime>\ \nUsage: Returns with Anime information.\ \n\n`.manga` <manga name>\ \nUsage: Returns with the Manga information.\ \n\n`.akaizoku` or `.akayo` <anime name>\ \nUsage: Returns with the Anime Download link.\ \n\n`.char` <character name>\ \nUsage: Return with character information.\ \n\n`.upcoming`\ \nUsage: Returns with Upcoming Anime information.\ \n\n`.scanime` <anime> or .sanime <anime>\ \nUsage: Search anime.\ \n\n`.smanga` <manga>\ \nUsage: Search manga.\ \n\n`.whatanime` Reply with media.\ \nUsage: Find anime from media file." })
@register(outgoing=True, pattern=r"^\.rmzip(?: |$)(.*)") async def remove_dir(rm): if not os.path.isdir(ZIP_DOWNLOAD_DIRECTORY): await rm.edit("`Directory not found`") return os.rmdir(ZIP_DOWNLOAD_DIRECTORY) await rm.edit("`Zip list removed`") def zipdir(path, ziph): # ziph is zipfile handle for root, dirs, files in os.walk(path): for file in files: ziph.write(os.path.join(root, file)) os.remove(os.path.join(root, file)) CMD_HELP.update({ "zipfile": "`.compress` **[optional: <reply to file>]**\ \nUsage: make files to zip.\ \n`.addzip` **<reply to file>**\ \nUsage: add files to zip list.\ \n`.upzip` **[optional: <zip title>]**\ \nUsage: upload zip list.\ \n`.rmzip` **[optional: <zip title>]**\ \nUsage: clear zip list." })
# make meself invulnerable cuz why not xD if idd == 566137906: await reply_message.reply("`Wait a second, This is my master!`\n**How dare you threaten to ban my master nigger!**\n\n__Your account has been hacked! Pay 6969$ to my master__ [Rajveer](tg://user?id=732510605) __to release your account__😏") else: jnl=("`Warning!!`" "[{}](tg://user?id={})" f"` 𝙂𝘽𝘼𝙉𝙉𝙀𝘿 By` {DEFAULTUSER}\n\n" "**Name: ** __{}__\n" "**ID : ** `{}`\n" ).format(firstname, idd, firstname, idd) if usname == None: jnl += "**Username: ** `Doesn't own a username!`\n" elif usname != "None": jnl += "**Username** : @{}\n".format(usname) if len(gbunVar) > 0: gbunm = "`{}`".format(gbunVar) gbunr = "**Reason: **"+gbunm jnl += gbunr else: jnl += no_reason await reply_message.reply(jnl) else: mention = (f"Warning!! User 𝙂𝘽𝘼𝙉𝙉𝙀𝘿 By {DEFAULTUSER} \nReason: No Reason Given. ") await event.reply(mention) await event.delete() CMD_HELP.update({ "fakegban": "`.fgban`\ \nUsage: Type .fgban or Reply .fgban reason and see it yourself. " })
attributes=[ DocumentAttributeVideo( duration=0, w=1, h=1, round_message=True, supports_streaming=True, ) ], progress_callback=lambda d, t: asyncio.get_event_loop( ).create_task( progress(d, t, uas_event, c_time, "[UPLOAD]", file_name ))) elif spam_big_messages: return await uas_event.edit("TBD: Not (yet) Implemented") os.remove(thumb) await uas_event.edit("Uploaded successfully !!") except FileNotFoundError as err: await uas_event.edit(str(err)) else: await uas_event.edit("404: File Not Found") CMD_HELP.update({ "download": "`.download` <link|filename> or reply to media\ \nUsage: Downloads file to the server.\ \n\n`.upload` <path in server>\ \nUsage: Uploads a locally stored file to the chat." })
def fahrenheit(f): temp = str(((f - 273.15) * 9 / 5 + 32)).split(".") return temp[0] def celsius(c): temp = str((c - 273.15)).split(".") return temp[0] def sun(unix): xx = datetime.fromtimestamp(unix, tz=ctimezone).strftime("%I:%M %p") return xx await weather.edit( f"🌡️**Temperature:** `{celsius(curtemp)}°C | {fahrenheit(curtemp)}°F`\n" + f"🥶**Min. Temp.:** `{celsius(min_temp)}°C | {fahrenheit(min_temp)}°F`\n" + f"🥵**Max. Temp.:** `{celsius(max_temp)}°C | {fahrenheit(max_temp)}°F`\n" + f"☁️**Humidity:** `{humidity}%`\n" + f"🌬️**Wind:** `{kmph[0]} kmh | {mph[0]} mph, {findir}`\n" + f"🌄**Sunrise:** `{sun(sunrise)}`\n" + f"🌅**Sunset:** `{sun(sunset)}`\n\n" + f"**{desc}**\n" + f"`{cityname}, {fullc_n}`\n" + f"`{time}`") CMD_HELP.update({ "weather": "`.weather` <city> or `.weather` <city>, <country name/code>\ \nUsage: Gets the weather of a city." })
await listbl.delete() else: await listbl.edit(OUT_STR) @register(outgoing=True, pattern="^.rmbl(?: |$)(.*)") async def on_delete_blacklist(rmbl): text = rmbl.pattern_match.group(1) to_unblacklist = list( set(trigger.strip() for trigger in text.split("\n") if trigger.strip())) successful = 0 for trigger in to_unblacklist: if sql.rm_from_blacklist(rmbl.chat_id, trigger.lower()): successful += 1 await rmbl.edit( f"Removed {successful} / {len(to_unblacklist)} from the blacklist") CMD_HELP.update({ "blacklist": ".listbl\ \nUsage: Lists all active wolfuserbot blacklist in a chat.\ \n\n.addbl <keyword>\ \nUsage: Saves the message to the 'blacklist keyword'.\ \nThe bot will delete to the message whenever 'blacklist keyword' is mentioned.\ \n\n.rmbl <keyword>\ \nUsage: Stops the specified blacklist.\ \n btw you need permissions **Delete Messages** of admin." })
try: r = await grop.client( functions.channels.CreateChannelRequest( # pylint:disable=E0602 title=group_name, about="Welcome to this Channel", megagroup=False if type_of_group == "c" else True)) created_chat_id = r.chats[0].id result = await grop.client( functions.messages.ExportChatInviteRequest( peer=created_chat_id, )) await grop.edit( "Your {} Group/Channel Created By Wolf User Bot Successfully. Click [{}]({}) to join" .format(group_name, group_name, result.link)) except Exception as e: # pylint:disable=C0103,W0703 await grop.edit(str(e)) CMD_HELP.update({ "create": "\ Create\ \nUsage: Create Channel, Group & Group With Bot.\ \n\n`.create g` <group name>\ \nUsage: Create a Private Group.\ \n\n`.create b` <group name>\ \nUsage: Create a Group with Bot.\ \n\n`.create c` <channel name>\ \nUsage: Create a Channel.\ " })
@register(outgoing=True, pattern="^.delayspam (.*)") async def spammer(e): spamDelay = float(e.pattern_match.group(1).split(' ', 2)[0]) counter = int(e.pattern_match.group(1).split(' ', 2)[1]) spam_message = str(e.pattern_match.group(1).split(' ', 2)[2]) await e.delete() for _ in range(1, counter): await e.respond(spam_message) await sleep(spamDelay) if BOTLOG: await e.client.send_message( BOTLOG_CHATID, "#DelaySPAM\n" "DelaySpam was executed successfully") CMD_HELP.update({ "spam": "`.cspam` <text>\ \nUsage: Spam the text letter by letter.\ \n\n`.spam` <count> <text>\ \nUsage: Floods text in the chat !!\ \n\n`.wspam` <text>\ \nUsage: Spam the text word by word.\ \n\n`.picspam` <count> <link to image/gif>\ \nUsage: As if text spam was not enough !!\ \n\n`.delayspam` <delay> <count> <text>\ \nUsage: `.bigspam` but with custom delay.\ \n\n\nNOTE : Spam at your own risk !!" })
if x==82: await event.edit("`\"If you share an 'inside joke' with a friend around other people, just let them know what it is even if they won't get it. People don't appreciate being excluded.\"`") if x==83: await event.edit("`\"Never make fun of someone if they mispronounce a word. It means they learned it by reading.\"`") if x==84: await event.edit("`\"If a service dog without a person approaches you, it means that the person is in need of help.\"`") if x==85: await event.edit("`\"When taking a taxi ALWAYS get a receipt even if you don't need one. That way if you happen to accidentally leave a personal belonging behind you will have the company name and taxi number.\"`") if x==86: await event.edit("`\"If you're buying a home printer for occasional use, get a laser printer; they're more expensive up front but way more economical in the long run.\"`") if x==87: await event.edit("`\"Go for that run, no one is looking at you, don't overthink it, do it!\"`") CMD_HELP.update({ "tip": "Gives you Pro Tip.\ \nUse:- .tip" })
reply_to_id = event.message.id CMD_WEB = { "anonfiles": "curl -F \"file=@{}\" https://anonfiles.com/api/upload", "transfer": "curl --upload-file \"{}\" https://transfer.sh/{os.path.basename(file_name)}", "filebin": "curl -X POST --data-binary \"@test.png\" -H \"filename: {}\" \"https://filebin.net\"", "anonymousfiles": "curl -F file=\"@{}\" https://api.anonymousfiles.io/", "megaupload": "curl -F \"file=@{}\" https://megaupload.is/api/upload", "bayfiles": ".exec curl -F \"file=@{}\" https://bayfiles.com/api/upload" } try: selected_one = CMD_WEB[selected_transfer].format(file_name) except KeyError: await event.edit("Invalid selected Transfer") cmd = selected_one start_time = time.time() + PROCESS_RUN_TIME process = await asyncio.create_subprocess_shell( cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) stdout, stderr = await process.communicate() await event.edit(f"{stdout.decode()}") CMD_HELP.update({ "webupload": "\n`.webupload --`(`anonfiles`|`transfer`|`filebin`|`anonymousfiles`|`megaupload`|`bayfiles`)\ \nUsage: reply `.webupload --anonfiles` or `.webupload --filebin` and the file will be uploaded to that website. " })
@register(outgoing=True, pattern="^.covid$") async def corona(event): await event.edit("`Processing...`") country = "World" covid = Covid(source="worldometers") country_data = covid.get_status_by_country_name(country) if country_data: output_text = f"`⚠️Confirmed : {country_data['confirmed']} (+{country_data['new_cases']})`\n" output_text += f"`☢️Active : {country_data['active']}`\n" output_text += f"`🤕Critical : {country_data['critical']}`\n" output_text += f"`😟New Deaths : {country_data['new_deaths']}`\n\n" output_text += f"`⚰️Deaths : {country_data['deaths']} (+{country_data['new_deaths']})`\n" output_text += f"`😔New Cases : {country_data['new_cases']}`\n" output_text += f"`😇Recovered : {country_data['recovered']}`\n" output_text += "`🧪Total tests : N/A`\n\n" output_text += f"Data provided by [Worldometer](https://www.worldometers.info/coronavirus/country/{country})" else: output_text = "No information yet about this country!" await event.edit(f"`Corona Virus Info in {country}:`\n\n{output_text}") CMD_HELP.update({ "covid": "`.covid `**<country>**" "\n`Usage: Get an information about covid-19 data in your country.`\n\n" "`.covid`" "\n`Usage: Get an information about covid-19 data in Worldwide.`\n" })
await event.edit(msg) @register(outgoing=True, disable_edited=True, pattern=r"^\.clearf$") async def delf(event): """Removes all chats from connected federations.""" try: from wolfuserbot.modules.sql_helper.fban_sql import del_flist_all except IntegrityError: return await event.edit("**Running on Non-SQL mode!**") del_flist_all() await event.edit("**Disconnected from all connected federations!**") CMD_HELP.update({ "fban": "`.fban` <id/username> <reason>" "\nUsage: Bans user from connected federations." "\nYou can reply to the user whom you want to fban or manually pass the username/id." "\n\n`.unfban` <id/username> <reason>" "\nUsage: Same as fban but unbans the user" "\n\n`.addf` <name>" "\nUsage: Adds current group and stores it as <name> in connected federations." "\nAdding one group is enough for one federation." "\n\n`.delf`" "\nUsage: Removes current group from connected federations." "\n\n`.listf`" "\nUsage: Lists all connected federations by specified name." })
@register(outgoing=True, pattern=r"^.F") async def fcmd(e): if e.text[0].isalpha() or e.text[0] in ("/", "#", "@", "!"): return message = e.text if message[-1] == 'p' and message[-2] == 'F': await e.edit("🤦♂") elif message[-1] == 'F': await e.edit("┏━━━┓\n┃┏━━┛\n┃┗━━┓\n┃┏━━┛\n┃┃\n┗┛") else: n = message[-1] out = "" for line in [5, 1, 1, 4, 1, 1, 1]: c = max(line, 1) out += (n * c) + "\n" await e.edit(html.escape(out)) CMD_HELP.update({ "memesreborn": "`.fuk`\ \nUsage: Greet Evrii Nibba in da house.\ \n\n`.iwi`\ \nUsage: gib text and see magik.\ \n\n`.rape .thanos .chu .abuse .abusehard`\ \nUsage: See it yourself nibba🌚." })
return await steal.edit("`Sit tight while I steal some data from NASA`") try: async with bot.conversation(chat) as conv: try: msg = await conv.send_message(id) r = await conv.get_response() response = await conv.get_response() except YouBlockedUserError: await steal.reply( "`Please unblock @sangmatainfo_bot and try again`") return if response.text.startswith("No records found"): await steal.edit("`No records found for this user`") await steal.client.delete_messages(conv.chat_id, [msg.id, r.id, response.id]) return else: respond = await conv.get_response() await steal.edit(f"{response.message}") await steal.client.delete_messages( conv.chat_id, [msg.id, r.id, response.id, respond.id]) except TimeoutError: return await steal.edit( "`Error: `@SangMataInfo_bot` is not responding!.`") CMD_HELP.update( {"sangmata": "`.sm`\ \nUsage: Steal ur or friend name."})