__help__ = """ Blacklists are used to stop certain triggers from being said in a group. Any time the trigger is mentioned, the message will immediately be deleted. A good combo is sometimes to pair this up with warn filters! *NOTE*: Blacklists do not affect group admins. × /blacklist: View the current blacklisted words. Admin only: × /addblacklist <triggers>: Add a trigger to the blacklist. Each line is considered one trigger, so using different lines will allow you to add multiple triggers. × /unblacklist <triggers>: Remove triggers from the blacklist. Same newline logic applies here, so you can remove multiple triggers at once. × /rmblacklist <triggers>: Same as above. × /blacklistmode <off/del/warn/ban/kick/mute/tban/tmute>: Action to perform when someone sends blacklisted words. """ BLACKLIST_HANDLER = DisableAbleCommandHandler("blacklist", blacklist, pass_args=True, admin_ok=True) ADD_BLACKLIST_HANDLER = CommandHandler("addblacklist", add_blacklist) UNBLACKLIST_HANDLER = CommandHandler(["unblacklist", "rmblacklist"], unblacklist) BLACKLISTMODE_HANDLER = CommandHandler("blacklistmode", blacklist_mode, pass_args=True) BLACKLIST_DEL_HANDLER = MessageHandler( (Filters.text | Filters.command | Filters.sticker | Filters.photo) & Filters.group, del_blacklist) dispatcher.add_handler(BLACKLIST_HANDLER) dispatcher.add_handler(ADD_BLACKLIST_HANDLER) dispatcher.add_handler(UNBLACKLIST_HANDLER) dispatcher.add_handler(BLACKLISTMODE_HANDLER)
× /lock <type>: Lock items of a certain type (not available in private) × /unlock <type>: Unlock items of a certain type (not available in private) × /locks: The current list of locks in this chat. Locks can be used to restrict a group's users. eg: Locking urls will auto-delete all messages with urls, locking stickers will restrict all \ non-admin users from sending stickers, etc. Locking bots will stop non-admins from adding bots to the chat. Note: • Unlocking permission *info* will allow members (non-admins) to change the group information, such as the description or the group name • Unlocking permission *pin* will allow members (non-admins) to pinned a message in a group """ __mod_name__ = "Lock🔐" 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) dispatcher.add_handler( MessageHandler(Filters.all & Filters.group, del_lockables), PERM_GROUP)
WARN_HANDLER = CommandHandler("warn", warn_user, pass_args=True, filters=Filters.group) RESET_WARN_HANDLER = CommandHandler(["resetwarn", "resetwarns"], reset_warns, pass_args=True, filters=Filters.group) REMOVE_WARNS_HANDLER = CommandHandler(["rmwarn", "unwarn"], remove_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) ADD_WARN_HANDLER = CommandHandler("addwarn", add_warn_filter, filters=Filters.group) RM_WARN_HANDLER = CommandHandler(["nowarn", "stopwarn"], remove_warn_filter, filters=Filters.group) 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 = CommandHandler("warnlimit", set_warn_limit,
*#PHONE* × /phone +9XXXXXXXXXX :send you the info of the mobile number Note - Only group admins will able to use this command , others can simply use in bot's pm *#CARBON* × /carbon <text> : Get your own carbon image of the text. *#REMOVE_BG* × /removebg ; reply to the image to remove the background of an image. """ __mod_name__ = "Misc💩" ID_HANDLER = DisableAbleCommandHandler("id", get_id, pass_args=True) INFO_HANDLER = DisableAbleCommandHandler("info", info, pass_args=True) ECHO_HANDLER = CommandHandler("echo", echo, filters=CustomFilters.sudo_filter) MD_HELP_HANDLER = CommandHandler("markdownhelp", markdown_help, filters=Filters.private) STATS_HANDLER = CommandHandler("stats", stats, filters=Filters.user(OWNER_ID)) GDPR_HANDLER = CommandHandler("gdpr", gdpr, filters=Filters.private) WIKI_HANDLER = DisableAbleCommandHandler("wiki", wiki) WALLPAPER_HANDLER = DisableAbleCommandHandler("wall", wall, pass_args=True) UD_HANDLER = DisableAbleCommandHandler("ud", ud) GETLINK_HANDLER = CommandHandler("getlink", getlink, pass_args=True, filters=Filters.user(OWNER_ID)) STAFFLIST_HANDLER = CommandHandler("staffids", staff_ids, filters=Filters.user(OWNER_ID)) REDDIT_MEMES_HANDLER = DisableAbleCommandHandler("rmeme", rmemes) SRC_HANDLER = CommandHandler("source", src, filters=Filters.private) dispatcher.add_handler(WALLPAPER_HANDLER) dispatcher.add_handler(UD_HANDLER)
def __gdpr__(user_id): sql.rm_afk(user_id) __help__ = """ When marked as AFK, any mentions will be replied to with a message to say you're not available! × /afk <reason>: Mark yourself as AFK. × brb <reason>: Same as the afk command - but not a command. """ __mod_name__ = "Afk🎃" AFK_HANDLER = DisableAbleCommandHandler("afk", afk) AFK_REGEX_HANDLER = DisableAbleMessageHandler(Filters.regex("(?i)brb"), afk, friendly="afk") NO_AFK_HANDLER = MessageHandler( Filters.all & Filters.group & ~Filters.update.edited_message, no_longer_afk) AFK_REPLY_HANDLER = MessageHandler(Filters.all & Filters.group, reply_afk) # AFK_REPLY_HANDLER = MessageHandler(Filters.entity(MessageEntity.MENTION) | Filters.entity(MessageEntity.TEXT_MENTION), # 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)
def __chat_settings__(chat_id, user_id): blacklisted = sql.num_stickers_chat_filters(chat_id) return "There are `{} `blacklisted stickers.".format(blacklisted) def __stats__(): return "• {} blacklist stickers, across {} chats.".format( sql.num_stickers_filters(), sql.num_stickers_filter_chats()) __mod_name__ = "Block Stickers❌" BLACKLIST_STICKER_HANDLER = DisableAbleCommandHandler("blsticker", blackliststicker, admin_ok=True) ADDBLACKLIST_STICKER_HANDLER = DisableAbleCommandHandler( "addblsticker", add_blackliststicker) UNBLACKLIST_STICKER_HANDLER = CommandHandler(["unblsticker", "rmblsticker"], unblackliststicker) BLACKLISTMODE_HANDLER = CommandHandler("blstickermode", blacklist_mode) BLACKLIST_STICKER_DEL_HANDLER = MessageHandler(Filters.sticker & Filters.group, del_blackliststicker) dispatcher.add_handler(BLACKLIST_STICKER_HANDLER) dispatcher.add_handler(ADDBLACKLIST_STICKER_HANDLER) dispatcher.add_handler(UNBLACKLIST_STICKER_HANDLER) dispatcher.add_handler(BLACKLISTMODE_HANDLER) dispatcher.add_handler(BLACKLIST_STICKER_DEL_HANDLER)
""" __mod_name__ = "Ban♈️" BAN_HANDLER = CommandHandler("ban", ban, pass_args=True, filters=Filters.group) TEMPBAN_HANDLER = CommandHandler(["tban", "tempban"], temp_ban, pass_args=True, filters=Filters.group) KICK_HANDLER = CommandHandler("kick", kick, pass_args=True, filters=Filters.group) UNBAN_HANDLER = CommandHandler("unban", unban, pass_args=True, filters=Filters.group) KICKME_HANDLER = DisableAbleCommandHandler("kickme", kickme, filters=Filters.group) BANME_HANDLER = DisableAbleCommandHandler("banme", banme, filters=Filters.group) dispatcher.add_handler(BAN_HANDLER) dispatcher.add_handler(TEMPBAN_HANDLER) dispatcher.add_handler(KICK_HANDLER) dispatcher.add_handler(UNBAN_HANDLER) dispatcher.add_handler(KICKME_HANDLER) dispatcher.add_handler(BANME_HANDLER)
filters=Filters.group) SETDESC_HANDLER = CommandHandler("setdescription", set_desc, filters=Filters.group) PROMOTE_HANDLER = CommandHandler("promote", promote, pass_args=True, filters=Filters.group) DEMOTE_HANDLER = CommandHandler("demote", demote, pass_args=True, filters=Filters.group) SET_TITLE_HANDLER = DisableAbleCommandHandler("settitle", set_title, pass_args=True) ADMINLIST_HANDLER = DisableAbleCommandHandler("adminlist", adminlist, filters=Filters.group) dispatcher.add_handler(PIN_HANDLER) dispatcher.add_handler(UNPIN_HANDLER) dispatcher.add_handler(INVITE_HANDLER) dispatcher.add_handler(PROMOTE_HANDLER) dispatcher.add_handler(DEMOTE_HANDLER) dispatcher.add_handler(ADMINLIST_HANDLER) dispatcher.add_handler(SET_TITLE_HANDLER) dispatcher.add_handler(CHAT_PIC_HANDLER) dispatcher.add_handler(DEL_CHAT_PIC_HANDLER) dispatcher.add_handler(SETCHAT_TITLE_HANDLER)
NOTE - In group only group admins are allowd , others simple can use in bot's pm *#QUOTLY_CAPTURE* - /click : reply the command to someone's mssg kek NOTE - In group only group admins are allowd , others simple can use in bot's pm *#STICKER_BLACKLIST* Blacklist sticker is used to stop certain stickers. Whenever a sticker is sent, the message will be deleted immediately. *NOTE:* Blacklist stickers do not affect the group admin. • `/blsticker`*:* See current blacklisted sticker. *Only admin:* • `/addblsticker <sticker link>`*:* Add the sticker trigger to the black list. Can be added via reply sticker. • `/unblsticker <sticker link>`*:* Remove triggers from blacklist. The same newline logic applies here, so you can delete multiple triggers at once. • `/rmblsticker <sticker link>`*:* Same as above. • `/blstickermode <ban/tban/mute/tmute>`*:* sets up a default action on what to do if users use blacklisted stickers. (`tmute seems broken right now`) Note: • `<sticker link>` can be `https://t.me/addstickers/<sticker>` or just `<sticker>` or reply to the sticker message. """ __mod_name__ = "Sticker👄" KANG_HANDLER = DisableAbleCommandHandler("kang", kang, pass_args=True, admin_ok=True) STICKERID_HANDLER = DisableAbleCommandHandler("stickerid", stickerid) GETSTICKER_HANDLER = DisableAbleCommandHandler("getsticker", getsticker) dispatcher.add_handler(KANG_HANDLER) dispatcher.add_handler(STICKERID_HANDLER) dispatcher.add_handler(GETSTICKER_HANDLER)
`/save notename` while replying to a sticker or whatever data you'd like. Now, the note at "#notename" 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__ = "Note✍️" GET_HANDLER = CommandHandler("get", cmd_get, pass_args=True) HASH_GET_HANDLER = MessageHandler(Filters.regex(r"^#[^\s]+"), hash_get) SAVE_HANDLER = CommandHandler("save", save) DELETE_HANDLER = CommandHandler("clear", clear, pass_args=True) LIST_HANDLER = DisableAbleCommandHandler(["notes", "saved"], list_notes, admin_ok=True) CLEARALLNOTES_HANDLER = CommandHandler("rmallnotes", clear_notes, filters=Filters.group) RMBTN_HANDLER = CallbackQueryHandler(rmbutton, pattern=r"rmnotes_") dispatcher.add_handler(GET_HANDLER) dispatcher.add_handler(SAVE_HANDLER) dispatcher.add_handler(LIST_HANDLER) dispatcher.add_handler(DELETE_HANDLER) dispatcher.add_handler(HASH_GET_HANDLER) dispatcher.add_handler(CLEARALLNOTES_HANDLER) dispatcher.add_handler(RMBTN_HANDLER)
Auditor will reply random strings accordingly when these words are used! All regex filters can be disabled incase u don't want... like: `/disable goodmorning`. *#AUTO_CHAT* Chatbot utilizes the CoffeeHouse API and allows Bot to talk back making your chat more interactive. - /autochat : Enables Chatbot mode - /stopchat : Disables Chatbot mode note - only group admins will be able to use this command others simply can use in bot's pm """ __mod_name__ = "Meme👻" SHRUG_HANDLER = DisableAbleCommandHandler("shrug", shrug) DECIDE_HANDLER = DisableAbleMessageHandler(Filters.regex(r"(?i)^auditor\?"), decide, friendly="decide") SNIPE_HANDLER = CommandHandler("snipe", snipe, pass_args=True, filters=CustomFilters.sudo_filter) ABUSE_HANDLER = DisableAbleCommandHandler("abuse", abuse) PORT_BUG_HANDLER = CommandHandler("bug", ports_bug) RUNS_HANDLER = DisableAbleCommandHandler("runs", runs) SLAP_HANDLER = DisableAbleCommandHandler("slap", slap, pass_args=True) PUNCH_HANDLER = DisableAbleCommandHandler("punch", punch, pass_args=True) HUG_HANDLER = DisableAbleCommandHandler("warm", hug, pass_args=True) GBUN_HANDLER = CommandHandler("gbun", gbun) TABLE_HANDLER = DisableAbleCommandHandler("table", table) CRI_HANDLER = DisableAbleCommandHandler("cri", cri) PASTA_HANDLER = DisableAbleCommandHandler("pasta", copypasta) CLAP_HANDLER = DisableAbleCommandHandler("clap", clapmoji) OWO_HANDLER = DisableAbleCommandHandler("owo", owo) STRECH_HANDLER = DisableAbleCommandHandler("stretch", stretch)
def scam(imgspage, lim): """Parse/Scrape the HTML code for the info we want.""" single = opener.open(imgspage).read() decoded = single.decode('utf-8') 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 REVERSE_HANDLER = DisableAbleCommandHandler("reverse", reverse, pass_args=True, admin_ok=True) dispatcher.add_handler(REVERSE_HANDLER)
string = "" if message.reply_to_message: string = message.reply_to_message.text.lower().replace(" ", " ") if args: string = ' '.join(args).lower() if not string: message.reply_text("Usage is `/weebify <text>`", parse_mode=ParseMode.MARKDOWN) return for normiecharacter in string: if normiecharacter in normiefont: weebycharacter = weebyfont[normiefont.index(normiecharacter)] string = string.replace(normiecharacter, weebycharacter) if message.reply_to_message: message.reply_to_message.reply_text(string) else: message.reply_text(string) WEEBIFY_HANDLER = DisableAbleCommandHandler("weebify", weebify) dispatcher.add_handler(WEEBIFY_HANDLER) __command_list__ = ["weebify"] __handlers__ = [WEEBIFY_HANDLER]
× /filters: List all active filters saved in the chat. *Admin only:* × /filter <keyword> <reply message>: Add a filter to this chat. The bot will now reply that message whenever 'keyword'\ is mentioned. If you reply to a sticker with a keyword, the bot will reply with that sticker. NOTE: all filter \ keywords are in lowercase. If you want your keyword to be a sentence, use quotes. eg: /filter "hey there" How you \ doin? × /stop <filter keyword>: Stop that filter. *Chat creator only:* × /rmallfilter: Stop all chat filters at once. *Note*: Filters also support markdown formatters like: {first}, {last} etc.. and buttons. Check `/markdownhelp` to know more! """ __mod_name__ = "Filter↗️" FILTER_HANDLER = CommandHandler("filter", filters) STOP_HANDLER = CommandHandler("stop", stop_filter) RMALLFILTER_HANDLER = CommandHandler("rmallfilter", rmall_filters, filters=Filters.group) LIST_HANDLER = DisableAbleCommandHandler("filters", list_handlers, admin_ok=True) CUST_FILTER_HANDLER = MessageHandler(CustomFilters.has_text & ~Filters.update.edited_message, reply_filter) dispatcher.add_handler(FILTER_HANDLER) dispatcher.add_handler(STOP_HANDLER) dispatcher.add_handler(LIST_HANDLER) dispatcher.add_handler(CUST_FILTER_HANDLER, HANDLER_GROUP) dispatcher.add_handler(RMALLFILTER_HANDLER)
promoting your profile. All bios are displayed on /info command. × /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 An example of setting a bio for yourself: `/setme I work for Telegram`; Bio is set to yourself. An example of writing someone else' bio: Reply to user's message: `/setbio He is such cool person`. *Notice:* Do not use /setbio against yourself! """ __mod_name__ = "Bio🔅" 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)