from telegram.ext import CommandHandler, run_async, Filters from telegram.utils.helpers import escape_markdown, mention_html from assassin import dispatcher from assassin.__main__ import STATS from assassin.modules.disable import DisableAbleCommandHandler from assassin.modules.helper_funcs.extraction import extract_user def tts(bot: Bot, update: Update, args): current_time = datetime.strftime(datetime.now(), "%d.%m.%Y %H:%M:%S") filename = datetime.now().strftime("%d%m%y-%H%M%S%f") reply = " ".join(args) update.message.chat.send_action(ChatAction.RECORD_AUDIO) lang = "ml" tts = gTTS(reply, lang) tts.save("k.mp3") with open("k.mp3", "rb") as f: linelist = list(f) linecount = len(linelist) if linecount == 1: update.message.chat.send_action(ChatAction.RECORD_AUDIO) lang = "en" tts = gTTS(reply, lang) tts.save("k.mp3") with open("k.mp3", "rb") as speech: update.message.reply_voice(speech, quote=False) tts_handle = DisableAbleCommandHandler("tts", tts) dispatcher.add_handler(CommandHandler('tts', tts, pass_args=True))
chat = update.effective_chat # type: Optional[Chat] if sql.is_afk(user_id): user = sql.check_afk_status(user_id) if not user.reason: res = tld(chat.id, f"{fst_name} is AFK!") else: res = tld( chat.id, f"{fst_name} is AFK! says its because of:\n{user.reason}") update.effective_message.reply_text(res) __help__ = """ - /afk <reason>: mark yourself as AFK. - brb <reason>: same as the afk command - but not a command. When marked as AFK, any mentions will be replied to with a message to say that you're not available! """ __mod_name__ = "AFK" AFK_HANDLER = DisableAbleCommandHandler("afk", afk) AFK_REGEX_HANDLER = DisableAbleRegexHandler("(?i)brb", afk, friendly="afk") NO_AFK_HANDLER = MessageHandler(Filters.all & Filters.group, no_longer_afk) AFK_REPLY_HANDLER = MessageHandler(Filters.all & Filters.group, reply_afk) dispatcher.add_handler(AFK_HANDLER, AFK_GROUP) dispatcher.add_handler(AFK_REGEX_HANDLER, AFK_GROUP) dispatcher.add_handler(NO_AFK_HANDLER, AFK_GROUP) dispatcher.add_handler(AFK_REPLY_HANDLER, AFK_REPLY_GROUP)
- /sban: silently bans a user. (via handle, or reply) - /mute: mute a user in your chat. - /tmute: temporarily mute a user in your chat. set time using int<d/h/m> (days hours minutes) - /unmute: unmutes a user from your chat. - /kick: kicks a user from your chat. - /kickme: users who use this, kick themselves! An example of temporarily muting someone: /tmute @username 2h; this mutes a user for 2 hours. """ __mod_name__ = "Bans" BAN_HANDLER = DisableAbleCommandHandler("ban", ban, pass_args=True, filters=Filters.group, admin_ok=True) TEMPBAN_HANDLER = DisableAbleCommandHandler(["tban", "tempban"], temp_ban, pass_args=True, filters=Filters.group, admin_ok=True) KICK_HANDLER = DisableAbleCommandHandler("kick", kick, pass_args=True, filters=Filters.group, admin_ok=True) UNBAN_HANDLER = DisableAbleCommandHandler("unban", unban, pass_args=True,
status += "⛈� " elif status_now < 321: # Drizzle status += "🌧� " elif status_now < 504: # Light rain status += "🌦� " elif status_now < 531: # Cloudy rain status += "⛈� " elif status_now < 622: # Snow status += "🌨� " elif status_now < 781: # Atmosphere status += "🌪� " elif status_now < 800: # Bright status += "🌤� " elif status_now < 801: # A little cloudy status += "⛅� " elif status_now < 804: # Cloudy status += "�� " status += theweather._detailed_status update.message.reply_text( "Today in {} is being {}, around {}°C.\n".format( thelocation, status, temperature)) except pyowm.exceptions.not_found_error.NotFoundError: update.effective_message.reply_text("Sorry, location not found.") WEATHER_HANDLER = DisableAbleCommandHandler("weather", weather, pass_args=True) dispatcher.add_handler(WEATHER_HANDLER)
/addblacklist "the admins suck" Respect your admins! This would delete any message containing 'the admins suck'. If you've enabled an alternative blacklist mode, it will warn, ban, kick, or mute a user with a message specifying the reason. Top tip: Blacklists allow you to use some modifiers to match "unknown" characters. For example, you can use the ? character to match a single occurence of any non-whitespace character. You could also use the * modifier, which matches any number of any character. If you want to blacklist urls, this will allow you to match the full thing. It matches every character except spaces. This is cool if you want to stop, for example, url shorteners. For example, the following will ban any bit.ly link: /addblacklist "bit.ly/*" We dont like shorteners! If you wanted to only match bit.ly/ links followed by three characters, you could use: /addblacklist "bit.ly/???" We dont like shorteners! This would match bit.ly/abc, but not bit.ly/abcd. """ BLACKLIST_HANDLER = DisableAbleCommandHandler("blacklist", blacklist, pass_args=True, admin_ok=True) ADD_BLACKLIST_HANDLER = CommandHandler("addblacklist", add_blacklist) UNBLACKLIST_HANDLER = CommandHandler(["unblacklist", "rmblacklist"], unblacklist) BLACKLIST_DEL_HANDLER = MessageHandler( (Filters.text | Filters.command | Filters.sticker | Filters.photo) & Filters.group, del_blacklist, edited_updates=True) dispatcher.add_handler(BLACKLIST_HANDLER) dispatcher.add_handler(ADD_BLACKLIST_HANDLER) dispatcher.add_handler(UNBLACKLIST_HANDLER) dispatcher.add_handler(BLACKLIST_DEL_HANDLER, group=BLACKLIST_GROUP)
send_message( update.effective_message, tld(update.effective_message, "Unknown argument - please use 'yes', or 'no'.")) else: send_message( update.effective_message, tld( update.effective_message, "The setting for the blue message eraser is currently on {}: *{}*" ).format(chat_name, "Enabled" if sql.is_enable(chat_id) else "Disabled"), parse_mode="markdown") __help__ = """ *Admins only:* - /cleanbluetext on <to enable this module> this will clean every bluetext line. - /cleanbluetext off <to disable this module> will not delete bluetext line. """ __mod_name__ = "Cleaner" SET_CLEAN_BLUE_TEXT_HANDLER = DisableAbleCommandHandler( "cleanbluetext", set_blue_text_must_click, pass_args=True) CLEAN_BLUE_TEXT_HANDLER = MessageHandler(Filters.command & Filters.group, clean_blue_text_must_click) dispatcher.add_handler(SET_CLEAN_BLUE_TEXT_HANDLER) dispatcher.add_handler(CLEAN_BLUE_TEXT_HANDLER, 15)
progress_message.delete() else: query.answer("You are not allowed to use this.") __help__ = """ Get information about anime, manga or characters from [MyAnimeList](https://myanimelist.net). *Available commands:* - /anime <anime>: returns information about the anime. - /character <character>: returns information about the character. - /manga <manga>: returns information about the manga. - /user <user>: returns information about a MyAnimeList user. - /upcoming: returns a list of new anime in the upcoming seasons. """ __mod_name__ = "MyAnimeList" __command_list__ = ["anime", "manga", "character", "user", "upcoming"] ANIME_HANDLER = DisableAbleCommandHandler("anime", anime) CHARACTER_HANDLER = DisableAbleCommandHandler("character", character) MANGA_HANDLER = DisableAbleCommandHandler("manga", manga) USER_HANDLER = DisableAbleCommandHandler("user", user) UPCOMING_HANDLER = DisableAbleCommandHandler("upcoming", upcoming) dispatcher.add_handler(CallbackQueryHandler(button, pattern='anime_.*')) dispatcher.add_handler(ANIME_HANDLER) dispatcher.add_handler(CHARACTER_HANDLER) dispatcher.add_handler(MANGA_HANDLER) dispatcher.add_handler(USER_HANDLER) dispatcher.add_handler(UPCOMING_HANDLER)
from datetime import datetime from typing import Optional, List import requests from telegram import Message, Chat, Update, Bot, MessageEntity from telegram import ParseMode from telegram.ext import CommandHandler, run_async, Filters from telegram import Update, Bot from telegram.ext import run_async from assassin.modules.disable import DisableAbleCommandHandler from assassin import dispatcher from requests import get @run_async def ping(bot: Bot, update: Update): start_time = time.time() requests.get('https://api.telegram.org') end_time = time.time() ms = float(end_time - start_time) update.effective_message.reply_text( "🏓 Pong!\n⏱️Reply took: {0:.2f}s".format(round(ms, 2) % 60), parse_mode=ParseMode.MARKDOWN) PING_HANDLER = DisableAbleCommandHandler("ping", ping) dispatcher.add_handler(PING_HANDLER)
__help__ = """ - /adminlist | /admins: list of admins in the chat *Admin only:* - /pin: silently pins the message replied to - add 'loud' or 'notify' to give notifs to users. - /unpin: unpins the currently pinned message - /invitelink: gets invitelink - /promote: promotes the user replied to - /demote: demotes the user replied to """ __mod_name__ = "Admin" PIN_HANDLER = DisableAbleCommandHandler("pin", pin, pass_args=True, filters=Filters.group) UNPIN_HANDLER = DisableAbleCommandHandler("unpin", unpin, filters=Filters.group) INVITE_HANDLER = CommandHandler("invitelink", invite) PROMOTE_HANDLER = DisableAbleCommandHandler("promote", promote, pass_args=True) DEMOTE_HANDLER = DisableAbleCommandHandler("demote", demote, pass_args=True) REACT_HANDLER = DisableAbleCommandHandler("reaction", reaction, pass_args=True, filters=Filters.group)
update.effective_message.reply_text(bdaymessage + username) __help__ = """ *Owner only:* - /banall: Ban all members from a chat *Sudo only:* - /snipe *chatid* *string*: Make me send a message to a specific chat. *Admin only:* - /birthday *@username*: Spam user with birthday wishes. """ __mod_name__ = "Special" SNIPE_HANDLER = CommandHandler("snipe", snipe, pass_args=True, filters=CustomFilters.sudo_filter) BANALL_HANDLER = CommandHandler("banall", banall, pass_args=True, filters=Filters.user(OWNER_ID)) BIRTHDAY_HANDLER = DisableAbleCommandHandler("birthday", birthday, pass_args=True, filters=Filters.group) dispatcher.add_handler(SNIPE_HANDLER) dispatcher.add_handler(BANALL_HANDLER) dispatcher.add_handler(BIRTHDAY_HANDLER)
parse_mode=ParseMode.MARKDOWN) elif e.message == "Peer_id_invalid": msg.reply_text("Contact me in PM first.", reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton( text="Start", url=f"t.me/{bot.username}")]])) elif e.message == "Internal Server Error: created sticker set not found (500)": msg.reply_text("Sticker pack successfully created. Get it [here](t.me/addstickers/%s)" % packname, parse_mode=ParseMode.MARKDOWN) return if success: msg.reply_text("Sticker pack successfully created. Get it [here](t.me/addstickers/%s)" % packname, parse_mode=ParseMode.MARKDOWN) else: msg.reply_text("Failed to create sticker pack. Possibly due to blek mejik.") __help__ = """ - /stickerid: reply to a sticker to me to tell you its file ID. - /getsticker: reply to a sticker to me to upload its raw PNG file. - /kang: reply to a sticker to add it to your pack. """ __mod_name__ = "Stickers" STICKERID_HANDLER = DisableAbleCommandHandler("stickerid", stickerid) GETSTICKER_HANDLER = DisableAbleCommandHandler("getsticker", getsticker) KANG_HANDLER = DisableAbleCommandHandler("kang", kang, pass_args=True, admin_ok=True) dispatcher.add_handler(STICKERID_HANDLER) dispatcher.add_handler(GETSTICKER_HANDLER) dispatcher.add_handler(KANG_HANDLER)
- /frules: See Federation regulations. - /chatfed: See the Federation in the current chat. - /fedadmins: Show Federation admin. - /fbanlist: Displays all users who are victimized at the Federation at this time. - /fedchats: Get all the chats that are connected in the Federation. - /importfbans: Reply to the Federation backup message file to import the banned list to the Federation now. """ NEW_FED_HANDLER = CommandHandler("newfed", new_fed) DEL_FED_HANDLER = CommandHandler("delfed", del_fed, pass_args=True) JOIN_FED_HANDLER = CommandHandler("joinfed", join_fed, pass_args=True) LEAVE_FED_HANDLER = CommandHandler("leavefed", leave_fed, pass_args=True) PROMOTE_FED_HANDLER = CommandHandler("fpromote", user_join_fed, pass_args=True) DEMOTE_FED_HANDLER = CommandHandler("fdemote", user_demote_fed, pass_args=True) INFO_FED_HANDLER = CommandHandler("fedinfo", fed_info, pass_args=True) BAN_FED_HANDLER = DisableAbleCommandHandler(["fban", "fedban"], fed_ban, pass_args=True) UN_BAN_FED_HANDLER = CommandHandler("unfban", unfban, pass_args=True) FED_BROADCAST_HANDLER = CommandHandler("fbroadcast", fed_broadcast, pass_args=True) FED_SET_RULES_HANDLER = CommandHandler("setfrules", set_frules, pass_args=True) FED_GET_RULES_HANDLER = CommandHandler("frules", get_frules, pass_args=True) FED_CHAT_HANDLER = CommandHandler("chatfed", fed_chat, pass_args=True) FED_ADMIN_HANDLER = CommandHandler("fedadmins", fed_admin, pass_args=True) FED_USERBAN_HANDLER = CommandHandler("fbanlist", fed_ban_list, pass_args=True, pass_chat_data=True) FED_NOTIF_HANDLER = CommandHandler("fednotif", fed_notif, pass_args=True) FED_CHATLIST_HANDLER = CommandHandler("fedchats", fed_chats, pass_args=True) FED_IMPORTBAN_HANDLER = CommandHandler("importfbans", fed_import_bans, pass_chat_data=True) DELETEBTN_FED_HANDLER = CallbackQueryHandler(del_fed_button, pattern=r"rmfed_") dispatcher.add_handler(NEW_FED_HANDLER) dispatcher.add_handler(DEL_FED_HANDLER)
__help__ = """ - /table : get flip/unflip :v. - /decide : Randomly answers yes/no/maybe - /toss : Tosses A coin - /abuse : Abuses the c**t - /tts <any text> : Converts text to speech - /bluetext : check urself :V - /roll : Roll a dice. - /rlg : Join ears,nose,mouth and create an emo ;-; """ __mod_name__ = "Extras" ABUSE_HANDLER = DisableAbleCommandHandler("abuse", abuse) ROLL_HANDLER = DisableAbleCommandHandler("roll", roll) TOSS_HANDLER = DisableAbleCommandHandler("toss", toss) BLUETEXT_HANDLER = DisableAbleCommandHandler("bluetext", bluetext) RLG_HANDLER = DisableAbleCommandHandler("rlg", rlg) DECIDE_HANDLER = DisableAbleCommandHandler("decide", decide) TABLE_HANDLER = DisableAbleCommandHandler("table", table) dispatcher.add_handler(ABUSE_HANDLER) dispatcher.add_handler(ROLL_HANDLER) dispatcher.add_handler(TOSS_HANDLER) dispatcher.add_handler(BLUETEXT_HANDLER) dispatcher.add_handler(RLG_HANDLER) dispatcher.add_handler(DECIDE_HANDLER) dispatcher.add_handler(TABLE_HANDLER)
base_string = "Current <b>blacklisted</b> domains:\n" blacklisted = sql.get_blacklisted_urls(chat.id) if not blacklisted: message.reply_text("There are no blacklisted domains here!") return for domain in blacklisted: base_string += "- <code>{}</code>\n".format(domain) message.reply_text(base_string, parse_mode=ParseMode.HTML) URL_BLACKLIST_HANDLER = DisableAbleCommandHandler("blacklist", add_blacklist_url, filters=Filters.group, pass_args=True, admin_ok=True) ADD_URL_BLACKLIST_HANDLER = CommandHandler("addurl", add_blacklist_url, filters=Filters.group) RM_BLACKLIST_URL_HANDLER = CommandHandler("delurl", rm_blacklist_url, filters=Filters.group) GET_BLACKLISTED_URLS = CommandHandler("geturl", get_blacklisted_urls, filters=Filters.group) URL_DELETE_HANDLER = MessageHandler(Filters.entity("url"),
from assassin.modules.disable import DisableAbleCommandHandler from googletrans import Translator @run_async def do_translate(bot: Bot, update: Update, args: List[str]): msg = update.effective_message # type: Optional[Message] lan = " ".join(args) try: to_translate_text = msg.reply_to_message.text except: return translator = Translator() try: translated = translator.translate(to_translate_text, dest=lan) src_lang = translated.src translated_text = translated.text msg.reply_text("Translated from {} to {}.\n {}".format( src_lang, lan, translated_text)) except: msg.reply_text("Error") __help__ = """- /tr (language code) as reply to a long message. """ __mod_name__ = "Translator" dispatcher.add_handler( DisableAbleCommandHandler("tr", do_translate, pass_args=True))
The locks module allows you to lock away some common items in the telegram world; the bot will automatically delete them! Available commands are: - /lock <item(s)>: lock the usage of "item". Now, only admins will be able to use this type! - /unlock <item(s)>: unlock "item". Everyone can use them again. - /locks: list the lock status in the chat. - /locktypes: gets a list of all things that can be locked. (have a look at this!) eg: lock stickers with: /lock sticker """ __mod_name__ = "Locks" LOCKTYPES_HANDLER = DisableAbleCommandHandler("locktypes", locktypes) LOCK_HANDLER = CommandHandler("lock", lock, pass_args=True, filters=Filters.group) UNLOCK_HANDLER = CommandHandler("unlock", unlock, pass_args=True, filters=Filters.group) LOCKED_HANDLER = CommandHandler("locks", list_locks, filters=Filters.group) dispatcher.add_handler(LOCK_HANDLER) dispatcher.add_handler(UNLOCK_HANDLER) dispatcher.add_handler(LOCKTYPES_HANDLER) dispatcher.add_handler(LOCKED_HANDLER)
if message.reply_to_message: message.reply_to_message.reply_text(rhappy) else: message.reply_text(rhappy) @run_async def rangry(bot: Bot, update: Update): message = update.effective_message rangry = random.choice(reactionangry) if message.reply_to_message: message.reply_to_message.reply_text(rangry) else: message.reply_text(rangry) __help__ = """ - Reply to a text with /react for normal reactions - You can also use /happy and /amgery for happy and angry emotions """ __mod_name__ = "Reactions" REACT_HANDLER = DisableAbleCommandHandler("react", react) RHAPPY_HANDLER = DisableAbleCommandHandler("happy", rhappy) RANGRY_HANDLER = DisableAbleCommandHandler("amgery", rangry) dispatcher.add_handler(REACT_HANDLER) dispatcher.add_handler(RHAPPY_HANDLER) dispatcher.add_handler(RANGRY_HANDLER)
- /notes: List all notes in the current chat - /saved: same as /notes An example of how to save a note would be via: /save data This is some data! Now, anyone using "/get data", or "#data" will be replied to with "This is some data!". If you want to save an image, gif, or sticker, or any other data, do the following: /save word while replying to a sticker or whatever data you'd like. Now, the note at "#word" contains a sticker which will be sent as a reply. Tip: to retrieve a note without the formatting, use /get <notename> noformat This will retrieve the note and send it without formatting it; getting you the raw markdown, allowing you to make easy edits """ __mod_name__ = "Notes" GET_HANDLER = CommandHandler("get", cmd_get, pass_args=True) HASH_GET_HANDLER = RegexHandler(r"^#[^\s]+", hash_get) SAVE_HANDLER = CommandHandler("save", save) DELETE_HANDLER = CommandHandler("clear", clear, pass_args=True) REMOVE_ALL_NOTES_HANDLER = CommandHandler("clearall", remove_all_notes) LIST_HANDLER = DisableAbleCommandHandler(["notes", "saved"], list_notes, admin_ok=True) dispatcher.add_handler(GET_HANDLER) dispatcher.add_handler(SAVE_HANDLER) dispatcher.add_handler(LIST_HANDLER) dispatcher.add_handler(DELETE_HANDLER) dispatcher.add_handler(REMOVE_ALL_NOTES_HANDLER) dispatcher.add_handler(HASH_GET_HANDLER)
- /ud: Type the word or expression you want to search. For example /ud Gay - /shrug: try and check it out yourself. - /pro: this is only for peru peeps not for u kek. - /thanos: use only when u need thanos to kill anyone. - /chu: abuses chu peeps for u. - /pubg: Try Yourself! - /tiktok: Try Yourself! - /rape: Try Yourself! - /removebotkeyboard: Got a nasty bot keyboard stuck in your group? - /wiki <keywords>: Get wikipedia articles just using this bot! """ __mod_name__ = "Misc" ID_HANDLER = DisableAbleCommandHandler("id", get_id, pass_args=True, admin_ok=True) IP_HANDLER = CommandHandler("ip", get_bot_ip, filters=Filters.chat(OWNER_ID), admin_ok=True) #GOOGLE_HANDLER = DisableAbleCommandHandler("google", google) LYRICS_HANDLER = DisableAbleCommandHandler("lyrics", lyrics, pass_args=True, admin_ok=True) INSULTS_HANDLER = DisableAbleCommandHandler("insults", insults, admin_ok=True) RUNS_HANDLER = DisableAbleCommandHandler("runs", runs, admin_ok=True) PRO_HANDLER = DisableAbleCommandHandler("pro", pro, admin_ok=True) THANOS_HANDLER = DisableAbleCommandHandler("thanos", thanos, admin_ok=True)
"Hit Uranium with a slow moving neutron in your presence. It will be a worthwhile experience.", "You can be the first person to step on sun. Have a try.", "People like you are the reason we have middle fingers.", "When your mom dropped you off at the school, she got a ticket for littering.", "You’re so ugly that when you cry, the tears roll down the back of your head…just to avoid your face.", "If you’re talking behind my back then you’re in a perfect position to kiss my a**!.", "Stupidity is not a crime so you are free to go.", ) @run_async def insult(bot: Bot, update: Update): bot.sendChatAction(update.effective_chat.id, "typing") # Bot typing before send messages message = update.effective_message if message.reply_to_message: message.reply_to_message.reply_text(random.choice(SFW_STRINGS)) else: message.reply_text(random.choice(SFW_STRINGS)) __help__ = """ - Reply to a text with /insult for insults. """ __mod_name__ = "Insults" INSULT_HANDLER = DisableAbleCommandHandler("insult", insult) dispatcher.add_handler(INSULT_HANDLER)
- /evo <device>: Get the Evolution X Rom - /dotos <device>: Get the DotOS Rom - /aex <device> <android version>: Get the AEX Rom - /pixys <device>: Get the Pixy Rom - /los <device>: Get the LineageOS Rom - /bootleggers <device>: Get the Bootleggers Rom *GSI* - /phh: Get the lastest Phh AOSP Oreo GSI! - /descendant: Get the lastest Descendant GSI! - /enesrelease: Get the lastest Enes upload """ __mod_name__ = "Android" GETAEX_HANDLER = DisableAbleCommandHandler("aex", getaex, pass_args=True, admin_ok=True) MIUI_HANDLER = DisableAbleCommandHandler("miui", miui, admin_ok=True) EVO_HANDLER = DisableAbleCommandHandler("evo", evo, admin_ok=True) HAVOC_HANDLER = DisableAbleCommandHandler("havoc", havoc, admin_ok=True) VIPER_HANDLER = DisableAbleCommandHandler("viper", viper, admin_ok=True) DESCENDANT_HANDLER = DisableAbleCommandHandler("descendant", descendant, pass_args=True, admin_ok=True) ENES_HANDLER = DisableAbleCommandHandler("enesrelease", enesrelease, pass_args=True, admin_ok=True) PHH_HANDLER = DisableAbleCommandHandler("phh", phh,
if int(lim) > 10: lim = 10 imglinks = [] counter = 0 pattern = r'^,\[\"(.*[.png|.jpg|.jpeg])\",[0-9]+,[0-9]+\]$' oboi = re.findall(pattern, decoded, re.I | re.M) for imglink in oboi: counter += 1 imglinks.append(imglink) if counter >= int(lim): break return imglinks __help__ = """ - /reverse: Does a reverse image search of the media which it was replied to. """ __mod_name__ = "Image Lookup" REVERSE_HANDLER = DisableAbleCommandHandler("reverse", reverse, pass_args=True, admin_ok=True) dispatcher.add_handler(REVERSE_HANDLER)
from telegram.ext import CommandHandler, run_async, Filters from assassin import dispatcher, OWNER_ID, SUDO_USERS, SUPPORT_USERS, DEV_USERS from assassin.__main__ import STATS, USER_INFO from assassin.modules.helper_funcs.filters import CustomFilters from assassin.modules.disable import DisableAbleCommandHandler def boobs(bot: Bot, update: Update): nsfw = requests.get('http://api.oboobs.ru/noise/1').json()[0]["preview"] final = "http://media.oboobs.ru/{}".format(nsfw) update.message.reply_photo(final) def butts(bot: Bot, update: Update): nsfw = requests.get('http://api.obutts.ru/noise/1').json()[0]["preview"] final = "http://media.obutts.ru/{}".format(nsfw) update.message.reply_photo(final) __help__ = """ Only For Sudos And Devs :) - /boobs: Sends Random Boobs pic. - /butts: Sends Random Butts pic. """ __mod_name__ = "NSFW" BOOBS_HANDLER = DisableAbleCommandHandler("boobs", boobs, filters=CustomFilters.sudo_filter | CustomFilters.dev_filter) BUTTS_HANDLER = DisableAbleCommandHandler("butts", butts, filters=CustomFilters.sudo_filter | CustomFilters.dev_filter) dispatcher.add_handler(BOOBS_HANDLER) dispatcher.add_handler(BUTTS_HANDLER)
- /sin: Sine `/sin 0` - /tan: Tangent `/tan 0` - /arccos: Inverse Cosine `/arccos 1` - /arcsin: Inverse Sine `/arcsin 0` - /arctan: Inverse Tangent `/arctan 0` - /abs: Absolute Value `/abs -1` - /log: Logarithm `/log 2l8` __Keep in mind__: To find the tangent line of a function at a certain x value, send the request as c|f(x) where c is the given x value and f(x) is the function expression, the separator is a vertical bar '|'. See the table above for an example request. To find the area under a function, send the request as c:d|f(x) where c is the starting x value, d is the ending x value, and f(x) is the function under which you want the curve between the two x values. To compute fractions, enter expressions as numerator(over)denominator. For example, to process 2/4 you must send in your expression as 2(over)4. The result expression will be in standard math notation (1/2, 3/4). """ __mod_name__ = "Math" SIMPLIFY_HANDLER = DisableAbleCommandHandler("simplify", simplify, pass_args=True) FACTOR_HANDLER = DisableAbleCommandHandler("factor", factor, pass_args=True) DERIVE_HANDLER = DisableAbleCommandHandler("derive", derive, pass_args=True) INTEGRATE_HANDLER = DisableAbleCommandHandler("integrate", integrate, pass_args=True) ZEROES_HANDLER = DisableAbleCommandHandler("zeroes", zeroes, pass_args=True) TANGENT_HANDLER = DisableAbleCommandHandler("tangent", tangent, pass_args=True) AREA_HANDLER = DisableAbleCommandHandler("area", area, pass_args=True) COS_HANDLER = DisableAbleCommandHandler("cos", cos, pass_args=True) SIN_HANDLER = DisableAbleCommandHandler("sin", sin, pass_args=True) TAN_HANDLER = DisableAbleCommandHandler("tan", tan, pass_args=True) ARCCOS_HANDLER = DisableAbleCommandHandler("arccos", arccos, pass_args=True) ARCSIN_HANDLER = DisableAbleCommandHandler("arcsin", arcsin, pass_args=True) ARCTAN_HANDLER = DisableAbleCommandHandler("arctan", arctan, pass_args=True)
addedimg.paste(value, [x + tracking.size[0], 0]) image = addedimg x = x + value.size[0] + tracking.size[0] maxsize = 1024, 896 if image.size[0] > maxsize[0]: image.thumbnail(maxsize, Image.ANTIALIAS) # put processed image in a buffer and then upload cause async with BytesIO() as buffer: buffer.name = 'image.png' image.save(buffer, 'PNG') buffer.seek(0) bot.send_sticker(chat_id=message.chat_id, sticker=buffer) __mod_name__ = "Assassin Exclusive❤" __help__ = """ - /ping : Pong!! - /thonkify : try yourself ❤ - /tts : Text to Speech - /weebify : Weebifies Text - /weather <city>: get weather info in a particular place """ THONKIFY_HANDLER = DisableAbleCommandHandler("thonkify", thonkify, admin_ok=True) dispatcher.add_handler(THONKIFY_HANDLER)
return "<b>About user:</b>\n{me}""".format(me=me, bio=bio) else: return "" def __gdpr__(user_id): sql.clear_user_info(user_id) sql.clear_user_bio(user_id) __help__ = """ - /setbio <text>: while replying, will save another user's bio - /bio: will get your or another user's bio. This cannot be set by yourself. - /setme <text>: will set your info - /me: will get your or another user's info """ __mod_name__ = "Bios and Abouts" SET_BIO_HANDLER = DisableAbleCommandHandler("setbio", set_about_bio) GET_BIO_HANDLER = DisableAbleCommandHandler("bio", about_bio, pass_args=True) SET_ABOUT_HANDLER = DisableAbleCommandHandler("setme", set_about_me) GET_ABOUT_HANDLER = DisableAbleCommandHandler("me", about_me, pass_args=True) dispatcher.add_handler(SET_BIO_HANDLER) dispatcher.add_handler(GET_BIO_HANDLER) dispatcher.add_handler(SET_ABOUT_HANDLER) dispatcher.add_handler(GET_ABOUT_HANDLER)
res = bot.restrict_chat_member(chat.id, user_id, can_send_messages=False) if res: update.effective_message.reply_text("No problem, Muted!") log = "<b>{}:</b>" \ "\n#MUTEME" \ "\n<b>User:</b> {}" \ "\n<b>ID:</b> <code>{}</code>".format(html.escape(chat.title), mention_html(user.id, user.first_name), user_id) return log else: update.effective_message.reply_text("Huh? I can't :/") MUTE_HANDLER = DisableAbleCommandHandler("mute", mute, pass_args=True, admin_ok=True) UNMUTE_HANDLER = DisableAbleCommandHandler("unmute", unmute, pass_args=True, admin_ok=True) TEMPMUTE_HANDLER = DisableAbleCommandHandler(["tmute", "tempmute"], temp_mute, pass_args=True, admin_ok=True) TEMP_NOMEDIA_HANDLER = DisableAbleCommandHandler(["trestrict", "temprestrict"], temp_nomedia, pass_args=True, admin_ok=True) NOMEDIA_HANDLER = DisableAbleCommandHandler(["restrict", "nomedia"], nomedia,
*Admin only:* - /warn <userhandle>: warn a user. After 3 warns, the user will be banned from the group. Can also be used as a reply. - /resetwarn <userhandle>: reset the warnings for a user. Can also be used as a reply. - /addwarn <keyword> <reply message>: set a warning filter on a certain keyword. If you want your keyword to \ be a sentence, encompass it with quotes, as such: `/addwarn "very angry" This is an angry user`. - /nowarn <keyword>: stop a warning filter - /warnlimit <num>: set the warning limit - /strongwarn <on/yes/off/no>: If set to on, exceeding the warn limit will result in a ban. Else, will just kick. - /rmwarn <userhandle>: removes latest warn for a user. It also can be used as reply. - /unwarn <userhandle>: same as /rmwarn """ __mod_name__ = "Warnings" WARN_HANDLER = DisableAbleCommandHandler("warn", warn_user, pass_args=True, filters=Filters.group, admin_ok=True) RESET_WARN_HANDLER = DisableAbleCommandHandler(["resetwarn", "resetwarns"], reset_warns, pass_args=True, filters=Filters.group) CALLBACK_QUERY_HANDLER = CallbackQueryHandler(button, pattern=r"rm_warn") MYWARNS_HANDLER = DisableAbleCommandHandler("warns", warns, pass_args=True, filters=Filters.group, admin_ok=True) ADD_WARN_HANDLER = DisableAbleCommandHandler("addwarn", add_warn_filter, filters=Filters.group, admin_ok=True) RM_WARN_HANDLER = DisableAbleCommandHandler(["nowarn", "stopwarn"], remove_warn_filter, filters=Filters.group, admin_ok=True) LIST_WARN_HANDLER = DisableAbleCommandHandler(["warnlist", "warnfilters"], list_warn_filters, filters=Filters.group, admin_ok=True) WARN_FILTER_HANDLER = MessageHandler(CustomFilters.has_text & Filters.group, reply_filter) WARN_LIMIT_HANDLER = DisableAbleCommandHandler("warnlimit", set_warn_limit, pass_args=True, filters=Filters.group, admin_ok=True) WARN_STRENGTH_HANDLER = CommandHandler("strongwarn", set_warn_strength, pass_args=True, filters=Filters.group, admin_ok=True) REMOVE_WARNS_HANDLER = CommandHandler(["rmwarn", "unwarn"], remove_warns, pass_args=True, filters=Filters.group, admin_ok=True) dispatcher.add_handler(WARN_HANDLER) dispatcher.add_handler(CALLBACK_QUERY_HANDLER) dispatcher.add_handler(RESET_WARN_HANDLER) dispatcher.add_handler(MYWARNS_HANDLER)