@run_async @sudo_plus def stats(update: Update, context: CallbackContext): stats = "Current stats:\n" + "\n".join([mod.__stats__() for mod in STATS]) result = re.sub(r'(\d+)', r'<code>\1</code>', stats) update.effective_message.reply_text(result, parse_mode=ParseMode.HTML) __help__ = """ • `/id`*:* get the current group id. If used by replying to a message, gets that user's id. • `/gifid`*:* reply to a gif to me to tell you its file ID. • `/info`*:* get information about a user. • `/markdownhelp`*:* quick summary of how markdown works in telegram - can only be called in private chats. """ ID_HANDLER = DisableAbleCommandHandler("id", get_id) GIFID_HANDLER = DisableAbleCommandHandler("gifid", gifid) INFO_HANDLER = DisableAbleCommandHandler(["info"], info) ECHO_HANDLER = DisableAbleCommandHandler("echo", echo, filters=Filters.group) MD_HELP_HANDLER = CommandHandler( "markdownhelp", markdown_help, filters=Filters.private) STATS_HANDLER = CommandHandler("stats", stats) dispatcher.add_handler(ID_HANDLER) dispatcher.add_handler(GIFID_HANDLER) dispatcher.add_handler(INFO_HANDLER) dispatcher.add_handler(ECHO_HANDLER) dispatcher.add_handler(MD_HELP_HANDLER) dispatcher.add_handler(STATS_HANDLER) __mod_name__ = "Misc"
"administrator", "creator")) __help__ = """ • `/adminlist`*:* Lista de administradores en el chat *Solo administradores:* • `/pin`*:* Fija silenciosamente el mensaje al que respondió - agregue` 'loud'` o `' notify'` para dar notificaciones a los usuarios. • `/unpin`*:* Quita el mensaje anclado actualmente. • `/invitelink`*:* Obtén el link del grupo. • `/promote`*:* Promueve el usuario al que respondió. • `/demote`*:* Rebaja al usuario al que respondió. • `/settitle`*:* Establece un título personalizado para un administrador que promovió el bot. """ ADMINLIST_HANDLER = DisableAbleCommandHandler(["adminlist", "admins"], adminlist) PIN_HANDLER = CommandHandler("pin", pin, filters=Filters.group) UNPIN_HANDLER = CommandHandler("unpin", unpin, filters=Filters.group) INVITE_HANDLER = DisableAbleCommandHandler("invitelink", invite, filters=Filters.group) PROMOTE_HANDLER = DisableAbleCommandHandler("promote", promote) DEMOTE_HANDLER = DisableAbleCommandHandler("demote", demote) SET_TITLE_HANDLER = CommandHandler("settitle", set_title) dispatcher.add_handler(ADMINLIST_HANDLER) dispatcher.add_handler(PIN_HANDLER)
reply_text(random.choice(fun_strings.TABLE)) __help__ = """ • `/runs`*:* reply a random string from an array of replies. • `/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 ;-; """ RUNS_HANDLER = DisableAbleCommandHandler("runs", runs) SLAP_HANDLER = DisableAbleCommandHandler("slap", slap) 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) dispatcher.add_handler(RUNS_HANDLER) dispatcher.add_handler(SLAP_HANDLER) dispatcher.add_handler(ROLL_HANDLER) dispatcher.add_handler(TOSS_HANDLER) dispatcher.add_handler(SHRUG_HANDLER) dispatcher.add_handler(BLUETEXT_HANDLER)
% 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, admin_ok=True) dispatcher.add_handler(STICKERID_HANDLER) dispatcher.add_handler(GETSTICKER_HANDLER) dispatcher.add_handler(KANG_HANDLER)
res = "{} estará afk".format(fst_name) update.effective_message.reply_text(res) else: if int(userc_id) == int(user_id): return res = "{} estará afk.\nRazón: {}".format(fst_name, user.reason) update.effective_message.reply_text(res) __help__ = """ • `/afk <razón>`*:* Se marca como AFK (lejos del teclado). • `brb <razón>`*:* Igual que el comando afk, pero no un comando. Cuando se marca como AFK, cualquier mención será respondida con un mensaje para decirle que no está disponible. """ AFK_HANDLER = DisableAbleCommandHandler("afk", afk) AFK_REGEX_HANDLER = MessageHandler(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), (AFK_REGEX_HANDLER, AFK_GROUP), (NO_AFK_HANDLER, AFK_GROUP),
else: result = generate_time(query_timezone, ["zoneName", "countryName"]) if not result: send_message.edit_text( f'La información de zona horaria no está disponible para <b>{query}</b>\n' '<b>Todas las zonas horarias:</b> <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">Lista aquí</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) __help__ = """ • `/time <lugar>`*:* Da información sobre una zona horaria. *Lugares disponibles:* Código de país/Nombre de país/Nombre de zona horaria. • 🕐 [Lista de Zonas Horarias](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) """ TIME_HANDLER = DisableAbleCommandHandler("time", gettime) dispatcher.add_handler(TIME_HANDLER) __mod_name__ = "Tiempo" __command_list__ = ["time"] __handlers__ = [TIME_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]
If you would like to retrieve the contents of a note without any formatting, use `/get <notename> noformat`. This can \ be useful when updating a current note. *Admins only:* • `/save <notename> <notedata>`*:* saves notedata as a note with name notename A button can be added to a note by using standard markdown link syntax - the link should just be prepended with a \ `buttonurl:` section, as such: `[somelink](buttonurl:example.com)`. Check `/markdownhelp` for more info. • `/save <notename>`*:* save the replied message as a note with name notename • `/clear <notename>`*:* clear note with this name *Note:* Note names are case-insensitive, and they are automatically converted to lowercase before getting saved. """ __mod_name__ = "Notes" GET_HANDLER = CommandHandler("get", cmd_get) HASH_GET_HANDLER = MessageHandler(Filters.regex(r"^#[^\s]+"), hash_get) SLASH_GET_HANDLER = MessageHandler(Filters.regex(r"^\/[0-9]*$"), slash_get) SAVE_HANDLER = CommandHandler("save", save) DELETE_HANDLER = CommandHandler("clear", clear) 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(HASH_GET_HANDLER) dispatcher.add_handler(SLASH_GET_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('La policia esta aquí!') __help__ = """ • `/police`*:* Envía una animación con emojis de sirena de policía. """ POLICE_HANDLER = DisableAbleCommandHandler("police", police) dispatcher.add_handler(POLICE_HANDLER) __mod_name__ = "Animation" __command_list__ = ["police"] __handlers__ = [POLICE_HANDLER]
• `/exploitme`*:* Explota al usuario que emitió el comando *Solo administradores:* • `/ban <userhandle>`*: * Prohíbe a un usuario. (a través de manejar o responder) • `/tban <userhandle> x (m / h / d)`*: * Prohíbe a un usuario durante el tiempo `x`. (a través del identificador o respuesta). `m` =` minutos`, `h` =` horas`, `d` =` días`. • `/unban <userhandle>`*: * Desbloquea a un usuario. (a través de manejar o responder) • `/exploit <userhandle>`*: * Saca a un usuario del grupo, (a través del identificador o respuesta) """ BAN_HANDLER = CommandHandler("ban", ban) TEMPBAN_HANDLER = CommandHandler(["tban"], temp_ban) EXPLOIT_HANDLER = CommandHandler("exploit", exploit) UNBAN_HANDLER = CommandHandler("unban", unban) ROAR_HANDLER = CommandHandler("roar", selfunban) EXPLOITME_HANDLER = DisableAbleCommandHandler("exploitme", exploitme, filters=Filters.group) dispatcher.add_handler(BAN_HANDLER) dispatcher.add_handler(TEMPBAN_HANDLER) dispatcher.add_handler(EXPLOIT_HANDLER) dispatcher.add_handler(UNBAN_HANDLER) dispatcher.add_handler(ROAR_HANDLER) dispatcher.add_handler(EXPLOITME_HANDLER) __mod_name__ = "Bans" __handlers__ = [ BAN_HANDLER, TEMPBAN_HANDLER, EXPLOIT_HANDLER, UNBAN_HANDLER, ROAR_HANDLER, EXPLOITME_HANDLER ]
@run_async 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) __help__ = """ • `/ping`*:* get ping time of bot to telegram server • `/pingall`*:* get all listed ping time """ PING_HANDLER = DisableAbleCommandHandler("ping", ping) PINGALL_HANDLER = DisableAbleCommandHandler("pingall", pingall) dispatcher.add_handler(PING_HANDLER) dispatcher.add_handler(PINGALL_HANDLER) __mod_name__ = "Ping" __command_list__ = ["ping", "pingall"] __handlers__ = [PING_HANDLER, PINGALL_HANDLER]
).json() if not json_rep.get("success"): msg.reply_text( f"¡Ocurrió un error! Informar esto en {SUPPORT_CHAT}") else: wallpapers = json_rep.get("wallpapers") if not wallpapers: msg.reply_text( "No se han encontrado resultados! Refina tu búsqueda.") return else: index = randint(0, len(wallpapers) - 1) # Choose random index wallpaper = wallpapers[index] wallpaper = wallpaper.get("url_image") wallpaper = wallpaper.replace("\\", "") bot.send_photo(chat_id, photo=wallpaper, caption='Preview', reply_to_message_id=msg_id, timeout=60) bot.send_document(chat_id, document=wallpaper, filename='wallpaper', caption=caption, reply_to_message_id=msg_id, timeout=60) WALLPAPER_HANDLER = DisableAbleCommandHandler("wall", wall) dispatcher.add_handler(WALLPAPER_HANDLER)
for pos, symbol in enumerate(text[1:]): result.append(symbol + ' ' + ' ' * pos + symbol) result = list("\n".join(result)) result[0] = text[0] result = "".join(result) msg = "```\n" + result + "```" return update.effective_message.reply_text(msg, parse_mode="MARKDOWN") __help__ = """ A little piece of fun wording! Give a loud shout out in the chatroom. i.e `/shout HELP`, bot replies with huge coded *HELP* letters within the square. • `/shout <keyword>`*:* write anything you want to give loud shout. ``` t e s t e e s s t t ``` """ SHOUT_HANDLER = DisableAbleCommandHandler("shout", shout) dispatcher.add_handler(SHOUT_HANDLER) __mod_name__ = "Shout" __command_list__ = ["shout"] __handlers__ = [SHOUT_HANDLER]
__help__ = """ Los stickers de lista negra se utiliza para bloquear ciertos stickers. Siempre que se envíe un , el mensaje se eliminará inmediatamente. *NOTA:* Las pegatinas de la lista negra no afectan al administrador del grupo. • `/blsticker`*:* Ver el sticker actual en la lista negra. * Solo administrador:* • `/addblsticker <enlace de etiqueta>`*:* Agrega el disparador de etiqueta a la lista negra. Se puede agregar a través de la etiqueta de respuesta. • `/unblsticker <enlace adhesivo>`*:* Elimina los disparadores de la lista negra. Aquí se aplica la misma lógica de nueva línea, por lo que puede eliminar varios activadores a la vez. • `/rmblsticker <enlace de etiqueta>`*:* Igual que arriba. • `/blstickermode <ban / tban / mute / tmute>`*:* Configura una acción predeterminada sobre qué hacer si los usuarios usan pegatinas en la lista negra. (`tmute parece roto en este momento`) Nota: • `<enlace de etiqueta>` puede ser `https://t.me/addstickers/ <sticker>` o simplemente `<sticker>` o responder al mensaje con el sticker. """ __mod_name__ = "Sticker 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)
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) __help__ = """ • `/paste`*:* Do a paste at `neko.bin` """ PASTE_HANDLER = DisableAbleCommandHandler("paste", paste) dispatcher.add_handler(PASTE_HANDLER) __mod_name__ = "Paste" __command_list__ = ["paste"] __handlers__ = [PASTE_HANDLER]
• `/resetwarn <ID o alias de usuraio>`*:* Restablece las advertencias para un usuario. También se puede utilizar como respuesta. • `/addwarn <palabra clave> <mensaje de respuesta>`*:* Establece un filtro de advertencia en una determinada palabra clave. Si desea que su palabra clave\ser una oración, incluirla entre comillas, como tal: `/addwarn" Muy enojado "Este es un usuario enojado`. • `/nowarn <palabra clave>`*:* Detener un filtro de advertencia. • `/warnlimit <número>` *:* Establece el límite de advertencias. • `/strongwarn <on/yes/off/no>`*:* Si se activa, exceder el límite de advertencia resultará en un ban. De lo contrario, solo kickeará. """ __mod_name__ = "Advertencias" 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,
from MeguBot import dispatcher from MeguBot.modules.disable import DisableAbleCommandHandler from telegram import ParseMode, Update from telegram.ext import CallbackContext, run_async @run_async def ud(update: Update, context: CallbackContext): message = update.effective_message text = message.text[len('/ud '):] results = requests.get( f'https://api.urbandictionary.com/v0/define?term={text}').json() try: reply_text = f'*{text}*\n\n{results["list"][0]["definition"]}\n\n_{results["list"][0]["example"]}_' except: reply_text = "No results found." message.reply_text(reply_text, parse_mode=ParseMode.MARKDOWN) __help__ = """ • `/ud <word>`*:* Type the word or expression you want to search use. """ UD_HANDLER = DisableAbleCommandHandler(["ud"], ud) dispatcher.add_handler(UD_HANDLER) __mod_name__ = "Urban dictionary" __command_list__ = ["ud"] __handlers__ = [UD_HANDLER]
La lista negra se utiliza para evitar que ciertos factores desencadenantes se digan en un grupo. Cada vez que se menciona el disparador, \ el mensaje se eliminará inmediatamente. A veces, una buena combinación es combinar esto con filtros de advertencia. * NOTA:* las listas negras no afectan a los administradores de grupo. • `/blacklist`*:* Ver las palabras actuales de la lista negra. *Solo administradores:* • `/addblacklist <triggers>`*:* Agrega un trigger a la lista negra. Cada línea se considera un trigger, por lo que el uso de \ las líneas le permitirán agregar múltiples activadores. • `/unblacklist <triggers>`*:* Elimina los triggers de la lista negra. Aquí se aplica la misma lógica de nueva línea, por lo que puede eliminar \ múltiples disparadores a la vez. • `/rmblacklist <triggers>`*:* Igual que arriba. """ BLACKLIST_HANDLER = DisableAbleCommandHandler("blacklist", blacklist) 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, allow_edit=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) __mod_name__ = "Palabras Prohibidas" __handlers__ = [
elif bio: return f"<b>Lo que otros dicen:</b>\n{bio}\n" elif me: return f"<b>Acerca del usuario:</b>\n{me}" else: return "" __help__ = """ • `/setbio <text>`*:* Mientras responde, guardará la biografía de otro usuario. • `/bio`*:* Obtendrá tu biografía o la de otro usuario. Esto no lo puede configurar usted mismo. • `/setme <text>`*:* Establecerá su información. •` /me`*:* Obtendrá tu información o la de otro usuario. """ SET_BIO_HANDLER = DisableAbleCommandHandler("setbio", set_about_bio) GET_BIO_HANDLER = DisableAbleCommandHandler("bio", about_bio) SET_ABOUT_HANDLER = DisableAbleCommandHandler("setme", set_about_me) GET_ABOUT_HANDLER = DisableAbleCommandHandler("me", about_me) dispatcher.add_handler(SET_BIO_HANDLER) dispatcher.add_handler(GET_BIO_HANDLER) dispatcher.add_handler(SET_ABOUT_HANDLER) dispatcher.add_handler(GET_ABOUT_HANDLER) __mod_name__ = "Bios e info" __command_list__ = ["setbio", "bio", "setme", "me"] __handlers__ = [ SET_BIO_HANDLER, GET_BIO_HANDLER, SET_ABOUT_HANDLER, GET_ABOUT_HANDLER ]
if args: string = ' '.join(args).lower() if not string: message.reply_text( "El uso es `/weebify <texto>`", 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) __help__ = """ • `/weebify <texto>`*:* Regresa un texto weebificado. """ WEEBIFY_HANDLER = DisableAbleCommandHandler("weebify", weebify) dispatcher.add_handler(WEEBIFY_HANDLER) __mod_name__ = "Weebify" __command_list__ = ["weebify"] __handlers__ = [WEEBIFY_HANDLER]
Obtén información sobre anime, manga o personajes de [AniList](anilist.co). * Comandos disponibles: * • `/anime <anime>`*:* Devuelve información sobre el anime. • `/character <carácter>`*:* Devuelve información sobre el carácter. • `/manga <manga>`*:* Devuelve información sobre el manga. • `/user <user>`*:* Devuelve información sobre un usuario de MyAnimeList. • `/next`*: * Devuelve una lista de nuevos animes en las próximas temporadas. • `/kaizoku <anime>`*:* Busca un anime en animekaizoku.com • `/kayo <anime>`*:* Busca un anime en animekayo.com • `/airing <anime>`*:* Devuelve información de emisión de anime. """ 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)
*Solo administradores:* •`/filter <palabra clave> <mensaje de respuesta>`*:* Agrega un trigger a este chat. El bot ahora responderá ese mensaje siempre que una 'palabra clave' \ sea mencionada. Si responde a una pegatina con una palabra clave, el bot responderá con esa pegatina. \ Si desea que su palabra clave sea una oración, use comillas. *Ejemplo:*`/filter" Hola allí "¿Cómo estás?` •`/stop <palabra clave de trigger>`*: * Detiene ese trigger. Nota: Los triggers ahora tienen expresiones regulares, por lo que cualquier trigger existente que tenga no distingue entre mayúsculas y minúsculas de forma predeterminada. \ Para guardar expresiones regulares que no distinguen entre mayúsculas y minúsculas, utilice \ `/filter" (?i) mi oracion de respuesta" mi respuesta que ignora el caso` \ En caso de que necesite ayuda de expresiones regulares más avanzada, comuníquese con nosotros en {SUPPORT_CHAT}. """ FILTER_HANDLER = CommandHandler("filter", filters) STOP_HANDLER = CommandHandler("stop", stop_filter) LIST_HANDLER = DisableAbleCommandHandler("filters", list_handlers, admin_ok=True) CUST_FILTER_HANDLER = MessageHandler(CustomFilters.has_text, 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) __mod_name__ = "Filters" __handlers__ = [ FILTER_HANDLER, STOP_HANDLER, LIST_HANDLER, (CUST_FILTER_HANDLER, HANDLER_GROUP) ]
× /unlock <tipo>: Desbloquea elementos de un tipo determinado (no disponible en privado) × /locks: La lista actual de bloqueos en este chat. Los bloqueos se pueden utilizar para restringir los usuarios de un grupo. Por ejemplo: El bloqueo de URL eliminará automáticamente todos los mensajes con URL, el bloqueo de pegatinas restringirá todos \ que los usuarios no administradores envíen pegatinas, etc. El bloqueo de bots evitará que los no administradores agreguen bots al chat. Nota: • Desbloquear el permiso * info * permitirá a los miembros (no administradores) cambiar la información del grupo, como la descripción o el nombre del grupo • Desbloquear el permiso * pin * permitirá a los miembros (no administradores) anclar un mensaje en un grupo """ __mod_name__ = "Bloqueos" 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)
parse_mode=ParseMode.MARKDOWN) except IndexError: update.effective_message.reply_text( "Responder mensajes o escribir mensajes en otros idiomas para traducirlos al idioma deseado\n\n" "*Ejemplo:* `/tr en-ml` Para traducir del inglés al Malayalam\n" "*O use:* `/tr ml` Para la detección automática y su traducción al malayalam.\n\n" "*Lista de códigos de idioma:*\n\n`af,am,ar,az,be,bg,bn,bs,ca,ceb,co,cs,cy,da,de,el,en,eo,es,et,eu,fa,fi,fr,fy,ga,gd,gl,gu,ha,haw,hi,hmn,hr,ht,hu,hy,id,ig,is,it,iw,ja,jw,ka,kk,km,kn,ko,ku,ky,la,lb,lo,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,my,ne,nl,no,ny,pa,pl,ps,pt,ro,ru,sd,si,sk,sl,sm,sn,so,sq,sr,st,su,sv,sw,ta,te,tg,th,tl,tr,uk,ur,uz,vi,xh,yi,yo,zh,zh_CN,zh_TW,zu`", parse_mode="markdown", disable_web_page_preview=True) except ValueError: update.effective_message.reply_text( "No se encuentra el idioma deseado!") else: return __help__ = """ • `/tr` o `/tl` (código de idioma) como respuesta a un mensaje largo. *Ejemplo:* `/ tr es`*:* Traduce algo al español. `/ tr en-es`*:* Traduce del inglés al español. """ TRANSLATE_HANDLER = DisableAbleCommandHandler(["tr", "tl"], totranslate) dispatcher.add_handler(TRANSLATE_HANDLER) __mod_name__ = "Traductor" __command_list__ = ["tr", "tl"] __handlers__ = [TRANSLATE_HANDLER]
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")}">Leer más...</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) __help__ = """ WIKIPEDIA! *Comandos disponibles:* • `/wiki <busqueda>`*:* Busca en wikipedia. """ __mod_name__ = "Wikipedia" WIKI_HANDLER = DisableAbleCommandHandler("wiki", wiki) dispatcher.add_handler(WIKI_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("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)