*Information others add on you:* β /bio*:* will get your or another user's bio. This cannot be set by yourself. β /setbio <text>*:* while replying, will save another user's bio *Examples:* π‘ β© /bio @username(defaults to yours if not specified).` β© /setbio This user is a wolf` (reply to the user) *Overall Information about you:* β /info*:* get information about a user. *What is that health thingy?* Come and see [HP System explained](https://t.me/OnePunchUpdates/192) """ SET_BIO_HANDLER = DisableAbleCommandHandler("setbio", set_about_bio) GET_BIO_HANDLER = DisableAbleCommandHandler("bio", about_bio) STATS_HANDLER = CommandHandler("stats", stats) ID_HANDLER = DisableAbleCommandHandler("id", get_id) GIFID_HANDLER = DisableAbleCommandHandler("gifid", gifid) INFO_HANDLER = DisableAbleCommandHandler(("info", "book"), info) SET_ABOUT_HANDLER = DisableAbleCommandHandler("setme", set_about_me) GET_ABOUT_HANDLER = DisableAbleCommandHandler("me", about_me) dispatcher.add_handler(STATS_HANDLER) dispatcher.add_handler(ID_HANDLER) dispatcher.add_handler(GIFID_HANDLER) dispatcher.add_handler(INFO_HANDLER) dispatcher.add_handler(SET_BIO_HANDLER)
if query.data == "speedtest_image": speedtest_image = speed.results.share() update.effective_message.reply_photo( photo=speedtest_image, caption=replymsg, ) msg.delete() elif query.data == "speedtest_text": result = speed.results.dict() replymsg += f"\nDownload: `{convert(result['download'])}Mb/s`\nUpload: `{convert(result['upload'])}Mb/s`\nPing: `{result['ping']}`" update.effective_message.edit_text(replymsg, parse_mode=ParseMode.MARKDOWN) else: query.answer("You are required to join Heroes Association to use this command.") SPEED_TEST_HANDLER = DisableAbleCommandHandler( "speedtest", speedtestxyz, run_async=True ) SPEED_TEST_CALLBACKHANDLER = CallbackQueryHandler( speedtestxyz_callback, pattern="speedtest_.*", run_async=True ) dispatcher.add_handler(SPEED_TEST_HANDLER) dispatcher.add_handler(SPEED_TEST_CALLBACKHANDLER) __mod_name__ = "SpeedTest" __command_list__ = ["speedtest"] __handlers__ = [SPEED_TEST_HANDLER, SPEED_TEST_CALLBACKHANDLER]
__help__ = """ β’ `/punchme`*:* punchs the user who issued the command *Admins only:* β’ `/ban <userhandle>`*:* bans a user. (via handle, or reply) β’ `/tban <userhandle> x(m/h/d)`*:* bans a user for `x` time. (via handle, or reply). `m` = `minutes`, `h` = `hours`, `d` = `days`. β’ `/unban <userhandle>`*:* unbans a user. (via handle, or reply) β’ `/punch <userhandle>`*:* Punches a user out of the group, (via handle, or reply) """ BAN_HANDLER = CommandHandler("ban", ban) TEMPBAN_HANDLER = CommandHandler(["tban"], temp_ban) PUNCH_HANDLER = CommandHandler("punch", punch) UNBAN_HANDLER = CommandHandler("unban", unban) ROAR_HANDLER = CommandHandler("roar", selfunban) PUNCHME_HANDLER = DisableAbleCommandHandler( "punchme", punchme, filters=Filters.group) dispatcher.add_handler(BAN_HANDLER) dispatcher.add_handler(TEMPBAN_HANDLER) dispatcher.add_handler(PUNCH_HANDLER) dispatcher.add_handler(UNBAN_HANDLER) dispatcher.add_handler(ROAR_HANDLER) dispatcher.add_handler(PUNCHME_HANDLER) __mod_name__ = "Bans" __handlers__ = [ BAN_HANDLER, TEMPBAN_HANDLER, PUNCH_HANDLER, UNBAN_HANDLER, ROAR_HANDLER, PUNCHME_HANDLER ]
def abs(update: Update, context: CallbackContext): args = context.args message = update.effective_message message.reply_text(math.fabs(int(args[0]))) @run_async def log(update: Update, context: CallbackContext): args = context.args message = update.effective_message message.reply_text(math.log(int(args[0]))) __mod_name__ = "Math" SIMPLIFY_HANDLER = DisableAbleCommandHandler("math", simplify) FACTOR_HANDLER = DisableAbleCommandHandler("factor", factor) DERIVE_HANDLER = DisableAbleCommandHandler("derive", derive) INTEGRATE_HANDLER = DisableAbleCommandHandler("integrate", integrate) ZEROES_HANDLER = DisableAbleCommandHandler("zeroes", zeroes) TANGENT_HANDLER = DisableAbleCommandHandler("tangent", tangent) AREA_HANDLER = DisableAbleCommandHandler("area", area) COS_HANDLER = DisableAbleCommandHandler("cos", cos) SIN_HANDLER = DisableAbleCommandHandler("sin", sin) TAN_HANDLER = DisableAbleCommandHandler("tan", tan) ARCCOS_HANDLER = DisableAbleCommandHandler("arccos", arccos) ARCSIN_HANDLER = DisableAbleCommandHandler("arcsin", arcsin) ARCTAN_HANDLER = DisableAbleCommandHandler("arctan", arctan) ABS_HANDLER = DisableAbleCommandHandler("abs", abs) LOG_HANDLER = DisableAbleCommandHandler("log", log)
query_timezone = query.lower() if len(query_timezone) == 2: result = generate_time(query_timezone, ["countryCode"]) else: result = generate_time(query_timezone, ["zoneName", "countryName"]) if not result: send_message.edit_text( f"Timezone info not available for <b>{query}</b>\n" '<b>All Timezones:</b> <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">List here</a>', parse_mode=ParseMode.HTML, disable_web_page_preview=True, ) return send_message.edit_text( result, parse_mode=ParseMode.HTML, disable_web_page_preview=True, ) TIME_HANDLER = DisableAbleCommandHandler("time", gettime, run_async=True) dispatcher.add_handler(TIME_HANDLER) __mod_name__ = "Time" __command_list__ = ["time"] __handlers__ = [TIME_HANDLER]
Γ’β¬Β’ `/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 punch. """ __mod_name__ = "Warnings" WARN_HANDLER = CommandHandler("warn", warn_user, filters=Filters.group) RESET_WARN_HANDLER = CommandHandler(["resetwarn", "resetwarns"], reset_warns, filters=Filters.group) CALLBACK_QUERY_HANDLER = CallbackQueryHandler(button, pattern=r"rm_warn") MYWARNS_HANDLER = DisableAbleCommandHandler("warns", warns, 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,
"(γοΏ£β³οΏ£)γ", "(ο½’β’ Ο β’)ο½’", "( Λ ΙΛ) β¬βͺβ«", "( oΛβ‘Λo) βiiiβ", "β¨o(>_<)oβ¨", "( γ»γ»)γ€β{}@{}@{}-", "(*Β΄Π·`)ε£οΎο½‘οΎε£(γ»βγ» )", "( *^^)oβ*βo(^^* )", "-βββ-ο½(γ»γ» )", "(οΎβ§ββ¦)οΎ β₯β¦ββββ ", "β°( Ν‘Β° ΝΚ Ν‘Β° )γ€βββ*:γ»οΎ", "(β©α_α)βββοΎ*ο½₯q*ο½₯:β‘( Ξ΅:)", ] def react(update: Update, context: CallbackContext): message = update.effective_message react = random.choice(reactions) if message.reply_to_message: message.reply_to_message.reply_text(react) else: message.reply_text(react) REACT_HANDLER = DisableAbleCommandHandler("react", react, run_async=True) dispatcher.add_handler(REACT_HANDLER) __command_list__ = ["react"] __handlers__ = [REACT_HANDLER]
query.answer("You need to be admin to do this.") __help__ = """ Sometimes, you might trust a user not to send unwanted content. Maybe not enough to make them admin, but you might be ok with locks, blacklists, and antiflood not applying to them. That's what approvals are for - approve of trustworthy users to allow them to send *Admin commands:* - `/approval`*:* Check a user's approval status in this chat. - `/approve`*:* Approve of a user. Locks, blacklists, and antiflood won't apply to them anymore. - `/unapprove`*:* Unapprove of a user. They will now be subject to locks, blacklists, and antiflood again. - `/approved`*:* List all approved users. - `/unapproveall`*:* Unapprove *ALL* users in a chat. This cannot be undone. """ APPROVE = DisableAbleCommandHandler("approve", approve) DISAPPROVE = DisableAbleCommandHandler("unapprove", disapprove) APPROVED = DisableAbleCommandHandler("approved", approved) APPROVAL = DisableAbleCommandHandler("approval", approval) UNAPPROVEALL = DisableAbleCommandHandler("unapproveall", unapproveall) UNAPPROVEALL_BTN = CallbackQueryHandler(unapproveall_btn, pattern=r"unapproveall_.*") dispatcher.add_handler(APPROVE) dispatcher.add_handler(DISAPPROVE) dispatcher.add_handler(APPROVED) dispatcher.add_handler(APPROVAL) dispatcher.add_handler(UNAPPROVEALL) dispatcher.add_handler(UNAPPROVEALL_BTN) __mod_name__ = "Approvals"
), parse_mode=ParseMode.HTML, ) except PageError as e: update.message.reply_text( "<code>{}</code>".format(e), parse_mode=ParseMode.HTML ) if res: result = f"<b>{search}</b>\n\n" result += f"<i>{res}</i>\n" result += f"""<a href="https://en.wikipedia.org/wiki/{search.replace(" ", "%20")}">Read more...</a>""" if len(result) > 4000: with open("result.txt", "w") as f: f.write(f"{result}\n\nUwU OwO OmO UmU") with open("result.txt", "rb") as f: context.bot.send_document( document=f, filename=f.name, reply_to_message_id=update.message.message_id, chat_id=update.effective_chat.id, parse_mode=ParseMode.HTML, ) else: update.message.reply_text( result, parse_mode=ParseMode.HTML, disable_web_page_preview=True ) WIKI_HANDLER = DisableAbleCommandHandler("wiki", wiki) dispatcher.add_handler(WIKI_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]
if message.reply_to_message: data = message.reply_to_message.text elif len(args) >= 1: data = message.text.split(None, 1)[1] else: message.reply_text("What am I supposed to do with this?") return key = requests.post('https://nekobin.com/api/documents', json={ "content": data }).json().get('result').get('key') url = f'https://nekobin.com/{key}' reply_text = f'Nekofied to *Nekobin* : {url}' message.reply_text(reply_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True) PASTE_HANDLER = DisableAbleCommandHandler("paste", paste) dispatcher.add_handler(PASTE_HANDLER) __command_list__ = ["paste"] __handlers__ = [PASTE_HANDLER]
from telegram import ParseMode, Update, ChatPermissions from telegram.ext import CallbackContext, run_async from telegram.error import BadRequest import AsunaRobot.modules.animequotes_strings as animequotes_strings from AsunaRobot import dispatcher from AsunaRobot.modules.disable import DisableAbleCommandHandler from AsunaRobot.modules.helper_funcs.chat_status import (is_user_admin) from AsunaRobot.modules.helper_funcs.extraction import extract_user @run_async def animequotes(update: Update, context: CallbackContext): message = update.effective_message name = message.reply_to_message.from_user.first_name if message.reply_to_message else message.from_user.first_name reply_photo = message.reply_to_message.reply_photo if message.reply_to_message else message.reply_photo reply_photo(random.choice(animequotes_strings.QUOTES_IMG)) __help__ = """ β’ `/animequotes`*:* gives random anime quotes """ ANIMEQUOTES_HANDLER = DisableAbleCommandHandler("animequotes", animequotes) dispatcher.add_handler(ANIMEQUOTES_HANDLER) __mod_name__ = "AnimeQuotes" __command_list__ = ["animequotes"] __handlers__ = [ANIMEQUOTES_HANDLER]
import html import random import AsunaRobot.modules.truth_and_dare_string as truth_and_dare_string from AsunaRobot import dispatcher from telegram import ParseMode, Update, Bot from AsunaRobot.modules.disable import DisableAbleCommandHandler from telegram.ext import CallbackContext, run_async def truth(update: Update, context: CallbackContext): args = context.args update.effective_message.reply_text( random.choice(truth_and_dare_string.TRUTH)) def dare(update: Update, context: CallbackContext): args = context.args update.effective_message.reply_text( random.choice(truth_and_dare_string.DARE)) TRUTH_HANDLER = DisableAbleCommandHandler("truth", truth, run_async=True) DARE_HANDLER = DisableAbleCommandHandler("dare", dare, run_async=True) dispatcher.add_handler(TRUTH_HANDLER) dispatcher.add_handler(DARE_HANDLER)
"<b>Service uptime:</b> <code>{}</code>".format( telegram_ping, uptime), parse_mode=ParseMode.HTML) @run_async @sudo_plus def pingall(update: Update, context: CallbackContext): to_ping = ["Kaizoku", "Kayo", "Telegram", "Jikan"] pinged_list = ping_func(to_ping) pinged_list.insert(2, '') uptime = get_readable_time((time.time() - StartTime)) reply_msg = "β±Ping results are:\n" reply_msg += "\n".join(pinged_list) reply_msg += '\n<b>Service uptime:</b> <code>{}</code>'.format(uptime) update.effective_message.reply_text(reply_msg, parse_mode=ParseMode.HTML, disable_web_page_preview=True) PING_HANDLER = DisableAbleCommandHandler("ping", ping) PINGALL_HANDLER = DisableAbleCommandHandler("pingall", pingall) dispatcher.add_handler(PING_HANDLER) dispatcher.add_handler(PINGALL_HANDLER) __command_list__ = ["ping", "pingall"] __handlers__ = [PING_HANDLER, PINGALL_HANDLER]
__help__ = """ Get information about anime, manga or characters from [AniList](anilist.co). *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. β’ `/kaizoku <anime>`*:* search an anime on animekaizoku.com β’ `/kayo <anime>`*:* search an anime on animekayo.com β’ `/airing <anime>`*:* returns anime airing info. β’ /whatanime - reply to gif or video """ ANIME_HANDLER = DisableAbleCommandHandler("anime", anime) AIRING_HANDLER = DisableAbleCommandHandler("airing", airing) CHARACTER_HANDLER = DisableAbleCommandHandler("character", character) MANGA_HANDLER = DisableAbleCommandHandler("manga", manga) USER_HANDLER = DisableAbleCommandHandler("user", user) UPCOMING_HANDLER = DisableAbleCommandHandler("upcoming", upcoming) KAIZOKU_SEARCH_HANDLER = DisableAbleCommandHandler("kaizoku", kaizoku) KAYO_SEARCH_HANDLER = DisableAbleCommandHandler("kayo", kayo) BUTTON_HANDLER = CallbackQueryHandler(button, pattern='anime_.*') dispatcher.add_handler(BUTTON_HANDLER) dispatcher.add_handler(ANIME_HANDLER) dispatcher.add_handler(CHARACTER_HANDLER) dispatcher.add_handler(MANGA_HANDLER) dispatcher.add_handler(AIRING_HANDLER) dispatcher.add_handler(USER_HANDLER)
__help__ = """ 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__ = "Stickers Blacklist" 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)
EDIT_SLEEP = 2 #edit how many times in 'police' EDIT_TIMES = 3 POLICE_SIREN = [ "π΄π΄π΄β¬οΈβ¬οΈβ¬οΈπ΅π΅π΅\nπ΄π΄π΄β¬οΈβ¬οΈβ¬οΈπ΅π΅π΅\nπ΄π΄π΄β¬οΈβ¬οΈβ¬οΈπ΅π΅π΅", "π΅π΅π΅β¬οΈβ¬οΈβ¬οΈπ΄π΄π΄\nπ΅π΅π΅β¬οΈβ¬οΈβ¬οΈπ΄π΄π΄\nπ΅π΅π΅β¬οΈβ¬οΈβ¬οΈπ΄π΄π΄" ] @user_admin @run_async def police(update: Update, context: CallbackContext): msg = update.effective_message.reply_text('Police is coming!') for x in range(EDIT_TIMES): msg.edit_text(POLICE_SIREN[x % 2]) time.sleep(EDIT_SLEEP) msg.edit_text('Police is here!') __help__ = """ β’ `/police`*:* Sends a police emoji animation. """ POLICE_HANDLER = DisableAbleCommandHandler("police", police) dispatcher.add_handler(POLICE_HANDLER) __mod_name__ = "Animation" __command_list__ = ["police"] __handlers__ = [POLICE_HANDLER]
β /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__ = "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) dispatcher.add_handler( MessageHandler(Filters.all & Filters.group, del_lockables), PERM_GROUP)
} rep = f"{user} was listening to:\n" for artist, song in track_dict.items(): rep += f"π§ <code>{artist} - {song}</code>\n" last_user = (requests.get( f"{base_url}?method=user.getinfo&user={username}&api_key={LASTFM_API_KEY}&format=json" ).json().get("user")) scrobbles = last_user.get("playcount") rep += f"\n(<code>{scrobbles}</code> scrobbles so far)" buttons = InlineKeyboardMarkup([[ InlineKeyboardButton( "πΊ Youtube", url= f"https://www.youtube.com/results?search_query={artist}+-+{song}", ) ]]) msg.reply_text(rep, reply_markup=buttons, parse_mode=ParseMode.HTML) SET_USER_HANDLER = CommandHandler("setuser", set_user, pass_args=True, run_async=True) CLEAR_USER_HANDLER = CommandHandler("clearuser", clear_user, run_async=True) LASTFM_HANDLER = DisableAbleCommandHandler("lastfm", last_fm, run_async=True) dispatcher.add_handler(SET_USER_HANDLER) dispatcher.add_handler(CLEAR_USER_HANDLER) dispatcher.add_handler(LASTFM_HANDLER)
β /blacklistmode <off/del/warn/ban/kick/mute/tban/tmute>*:* Action to perform when someone sends blacklisted words. 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 Note: β <sticker link> can be `https://t.me/addstickers/<sticker>` or just `<sticker>` or reply to the sticker message """ BLACKLIST_HANDLER = DisableAbleCommandHandler("blacklist", blacklist, pass_args=True, admin_ok=True) ADD_BLACKLIST_HANDLER = CommandHandler("addblacklist", add_blacklist) UNBLACKLIST_HANDLER = CommandHandler("unblacklist", 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, allow_edit=True, ) dispatcher.add_handler(BLACKLIST_HANDLER) dispatcher.add_handler(ADD_BLACKLIST_HANDLER)
β’ `/shrug`*:* get shrug XD β’ `/table`*:* get flip/unflip :v β’ `/decide`*:* Randomly answers yes/no/maybe β’ `/toss`*:* Tosses A coin β’ `/bluetext`*:* check urself :V β’ `/roll`*:* Roll a dice β’ `/rlg`*:* Join ears,nose,mouth and create an emo ;-; β’ `/shout <keyword>`*:* write anything you want to give loud shout β’ `/weebify <text>`*:* returns a weebified text β’ `/sanitize`*:* always use this before /pat or any contact β’ `/pat`*:* pats a user, or get patted β’ `/8ball`*:* predicts using 8ball method """ SANITIZE_HANDLER = DisableAbleCommandHandler("sanitize", sanitize, run_async=True) RUNS_HANDLER = DisableAbleCommandHandler("runs", runs, run_async=True) SLAP_HANDLER = DisableAbleCommandHandler("slap", slap, run_async=True) PAT_HANDLER = DisableAbleCommandHandler("pat", pat, run_async=True) ROLL_HANDLER = DisableAbleCommandHandler("roll", roll, run_async=True) TOSS_HANDLER = DisableAbleCommandHandler("toss", toss, run_async=True) SHRUG_HANDLER = DisableAbleCommandHandler("shrug", shrug, run_async=True) BLUETEXT_HANDLER = DisableAbleCommandHandler("bluetext", bluetext, run_async=True) RLG_HANDLER = DisableAbleCommandHandler("rlg", rlg, run_async=True) DECIDE_HANDLER = DisableAbleCommandHandler("decide", decide, run_async=True) EIGHTBALL_HANDLER = DisableAbleCommandHandler("8ball", eightball, run_async=True)
β /slap*:* slap a user, or get slapped if not a reply β /shrug*:* get shrug XD β /table*:* get flip/unflip :v β /decide*:* Randomly answers yes/no/maybe β /toss*:* Tosses A coin β /bluetext*:* check urself :V β /roll*:* Roll a dice β /rlg*:* Join ears,nose,mouth and create an emo ;-; β /shout <keyword>*:* write anything you want to give loud shout β /weebify <text>*:* returns a weebified text β /sanitize*:* always use this before /pat or any contact β /pat*:* pats a user, or get patted β /8ball*:* predicts using 8ball method """ SANITIZE_HANDLER = DisableAbleCommandHandler("sanitize", sanitize) RUNS_HANDLER = DisableAbleCommandHandler("runs", runs) SLAP_HANDLER = DisableAbleCommandHandler("slap", slap) PAT_HANDLER = DisableAbleCommandHandler("pat", pat) ROLL_HANDLER = DisableAbleCommandHandler("roll", roll) TOSS_HANDLER = DisableAbleCommandHandler("toss", toss) SHRUG_HANDLER = DisableAbleCommandHandler("shrug", shrug) BLUETEXT_HANDLER = DisableAbleCommandHandler("bluetext", bluetext) RLG_HANDLER = DisableAbleCommandHandler("rlg", rlg) DECIDE_HANDLER = DisableAbleCommandHandler("decide", decide) EIGHTBALL_HANDLER = DisableAbleCommandHandler("8ball", eightball) TABLE_HANDLER = DisableAbleCommandHandler("table", table) SHOUT_HANDLER = DisableAbleCommandHandler("shout", shout) WEEBIFY_HANDLER = DisableAbleCommandHandler("weebify", weebify) dispatcher.add_handler(WEEBIFY_HANDLER)
β /delgpic*:* Same as above but to remove group profile pic. β /setsticker*:* As a reply to some sticker to set it as group sticker set! β /setdescription <description>*:* Sets new chat description in group. β /admincache*:* force refresh the admins list β /antispam <on/off/yes/no>*:* Will toggle our antispam tech or return your current settings. β /del*:* deletes the message you replied to β /purge*:* deletes all messages between this and the replied to message. β /purge <integer X>*:* deletes the replied message, and X messages following it if replied to a message. *Note:* Night Mode chats get Automatically closed at 12 am(IST) and Automatically openned at 6 am(IST) To Prevent Night Spams. β οΈ `Read from top` """ ADMINLIST_HANDLER = DisableAbleCommandHandler("admins", adminlist) PIN_HANDLER = CommandHandler("pin", pin, filters=Filters.group) UNPIN_HANDLER = CommandHandler("unpin", unpin, filters=Filters.group) INVITE_HANDLER = DisableAbleCommandHandler("invitelink", invite) PROMOTE_HANDLER = DisableAbleCommandHandler("promote", promote) DEMOTE_HANDLER = DisableAbleCommandHandler("demote", demote) SET_TITLE_HANDLER = CommandHandler("title", set_title) ADMIN_REFRESH_HANDLER = CommandHandler( "admincache", refresh_admin, filters=Filters.group ) CHAT_PIC_HANDLER = CommandHandler("setgpic", setchatpic, filters=Filters.group)
β’ `/weebify <text>`*:* returns a weebified text β’ `/sanitize`*:* always use this before `/pat` or any contact β’ `/pat`*:* pats a user, or get patted (^-^) - - - - - - - - - - β’ *Games* π² *:* β’ `/truth`*:* Get ready to reveal a surprising truthπ€« β’ `/dare`*:* A dare is on way π β’ `/igris`*:* Summon up IGRIS β’ `/insult`*:* Insult the person β’ `/decide`*:* Randomly answers yes/no/maybe/idk β’ `/toss`*:* Tosses A coin β’ `/roll`*:* Roll a dice & get you a number """ INSULT_HANDLER = DisableAbleCommandHandler("insult", insult) ARISE_HANDLER = DisableAbleCommandHandler("arise", arise) IGRIS_HANDLER = DisableAbleCommandHandler("igris", igris) TRUTH_HANDLER = DisableAbleCommandHandler("truth", truth) DARE_HANDLER = DisableAbleCommandHandler("dare", dare) SANITIZE_HANDLER = DisableAbleCommandHandler("sanitize", sanitize) RUNS_HANDLER = DisableAbleCommandHandler("runs", runs) SLAP_HANDLER = DisableAbleCommandHandler("slap", slap) PAT_HANDLER = DisableAbleCommandHandler("pat", pat) ROLL_HANDLER = DisableAbleCommandHandler("roll", roll) TOSS_HANDLER = DisableAbleCommandHandler("toss", toss) SHRUG_HANDLER = DisableAbleCommandHandler("shrug", shrug) BLUETEXT_HANDLER = DisableAbleCommandHandler("bluetext", bluetext) RLG_HANDLER = DisableAbleCommandHandler("rlg", rlg) DECIDE_HANDLER = DisableAbleCommandHandler("decide", decide) TABLE_HANDLER = DisableAbleCommandHandler("table", table)
β’ `/removeallfilters`*:* Remove all chat filters at once. *Note*: Filters also support markdown formatters like: {first}, {last} etc.. and buttons. Check `/markdownhelp` to know more! """ __mod_name__ = "Filters" FILTER_HANDLER = CommandHandler("filter", filters) STOP_HANDLER = CommandHandler("stop", stop_filter) RMALLFILTER_HANDLER = CommandHandler( "removeallfilters", rmall_filters, filters=Filters.group) RMALLFILTER_CALLBACK = CallbackQueryHandler( rmall_callback, pattern=r"filters_.*") 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) dispatcher.add_handler(RMALLFILTER_CALLBACK) __handlers__ = [ FILTER_HANDLER, STOP_HANDLER, LIST_HANDLER, (CUST_FILTER_HANDLER, HANDLER_GROUP, RMALLFILTER_HANDLER) ]
"(ο½’β’ Ο β’)ο½’", "( Λ ΙΛ) β¬βͺβ«", "( oΛβ‘Λo) βiiiβ", "β¨o(>_<)oβ¨", "( γ»γ»)γ€β{}@{}@{}-", "(*Β΄Π·`)ε£οΎο½‘οΎε£(γ»βγ» )", "( *^^)oβ*βo(^^* )", "-βββ-ο½(γ»γ» )", "(οΎβ§ββ¦)οΎ β₯β¦ββββ ", "β°( Ν‘Β° ΝΚ Ν‘Β° )γ€βββ*:γ»οΎ", "(β©α_α)βββοΎ*ο½₯q*ο½₯:β‘( Ξ΅:)", ] @run_async def react(update: Update, context: CallbackContext): message = update.effective_message react = random.choice(reactions) if message.reply_to_message: message.reply_to_message.reply_text(react) else: message.reply_text(react) REACT_HANDLER = DisableAbleCommandHandler("react", react) dispatcher.add_handler(REACT_HANDLER) __command_list__ = ["react"] __handlers__ = [REACT_HANDLER]
speed.download() speed.upload() replymsg = "SpeedTest Results:" if query.data == "speedtest_image": speedtest_image = speed.results.share() update.effective_message.reply_photo(photo=speedtest_image, caption=replymsg) msg.delete() elif query.data == "speedtest_text": result = speed.results.dict() replymsg += f"\nDownload: `{convert(result['download'])}Mb/s`\nUpload: `{convert(result['upload'])}Mb/s`\nPing: `{result['ping']}`" update.effective_message.edit_text(replymsg, parse_mode=ParseMode.MARKDOWN) else: query.answer( "You are required to join Heroes Association to use this command.") SPEED_TEST_HANDLER = DisableAbleCommandHandler("speedtest", speedtestxyz) SPEED_TEST_CALLBACKHANDLER = CallbackQueryHandler(speedtestxyz_callback, pattern="speedtest_.*") dispatcher.add_handler(SPEED_TEST_HANDLER) dispatcher.add_handler(SPEED_TEST_CALLBACKHANDLER) __mod_name__ = "SpeedTest" __command_list__ = ["speedtest"] __handlers__ = [SPEED_TEST_HANDLER, SPEED_TEST_CALLBACKHANDLER]
""" __mod_name__ = "Notes" GET_HANDLER = CommandHandler("get", cmd_get, run_async=True) HASH_GET_HANDLER = MessageHandler(Filters.regex(r"^#[^\s]+"), hash_get, run_async=True) SLASH_GET_HANDLER = MessageHandler(Filters.regex(r"^/\d+$"), slash_get, run_async=True) SAVE_HANDLER = CommandHandler("save", save, run_async=True) DELETE_HANDLER = CommandHandler("clear", clear, run_async=True) LIST_HANDLER = DisableAbleCommandHandler(["notes", "saved"], list_notes, admin_ok=True, run_async=True) CLEARALL = DisableAbleCommandHandler("removeallnotes", clearall, run_async=True) CLEARALL_BTN = CallbackQueryHandler(clearall_btn, pattern=r"notes_.*", run_async=True) 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(SLASH_GET_HANDLER) dispatcher.add_handler(CLEARALL)
β’ `/reverse`*:* Does a reverse image search of the media which it was replied to. *Wikipedia:* β’ `/wiki <query>`*:* wikipedia your query *Wallpapers:* β’ `/wall <query>`*:* get a wallpaper from wall.alphacoders.com *Currency converter:* β’ `/cash`*:* currency converter Example: `/cash 1 USD INR` _OR_ `/cash 1 usd inr` Output: `1.0 USD = 75.505 INR` """ ECHO_HANDLER = DisableAbleCommandHandler("echo", echo, filters=Filters.chat_type.groups, run_async=True) MD_HELP_HANDLER = CommandHandler("markdownhelp", markdown_help, run_async=True) PING_HANDLER = DisableAbleCommandHandler("ping", ping, run_async=True) PASTE_HANDLER = DisableAbleCommandHandler("paste", paste, pass_args=True, run_async=True) WIKI_HANDLER = DisableAbleCommandHandler("wiki", wiki) WALLPAPER_HANDLER = DisableAbleCommandHandler("wall", wall, run_async=True) dispatcher.add_handler(ECHO_HANDLER) dispatcher.add_handler(MD_HELP_HANDLER) dispatcher.add_handler(PING_HANDLER) dispatcher.add_handler(WIKI_HANDLER) dispatcher.add_handler(WALLPAPER_HANDLER)
def check_afk(update, context, user_id, fst_name, userc_id): if sql.is_afk(user_id): user = sql.check_afk_status(user_id) if int(userc_id) == int(user_id): return if not user.reason: res = "{} is afk".format(fst_name) update.effective_message.reply_text(res) else: res = "{} is afk.\nReason: <code>{}</code>".format( html.escape(fst_name), html.escape(user.reason)) update.effective_message.reply_text(res, parse_mode="html") AFK_HANDLER = DisableAbleCommandHandler("afk", afk) AFK_REGEX_HANDLER = DisableAbleMessageHandler(Filters.regex(r"^(?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) __mod_name__ = "AFK" __command_list__ = ["afk"] __handlers__ = [ (AFK_HANDLER, AFK_GROUP),