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 . Note: - `<sticker link>` can be `https://t.me/addstickers/<sticker>` or just `<sticker>` or reply to the sticker message. """ __mod_name__ = "STICKER BLACKLIST" BLACKLIST_STICKER_HANDLER = DisableAbleCommandHandler("blsticker", blackliststicker, pass_args=True, admin_ok=True) ADDBLACKLIST_STICKER_HANDLER = DisableAbleCommandHandler( "addblsticker", add_blackliststicker) UNBLACKLIST_STICKER_HANDLER = CommandHandler(["unblsticker", "rmblsticker"], unblackliststicker) BLACKLISTMODE_HANDLER = CommandHandler("blstickermode", blacklist_mode, pass_args=True) 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)
"Total Confirmed: `" + str(total_confirmed_global) + "`\n" "Total Deaths: `" + str(total_deaths_global) + "`\n" "Total Recovered: `" + str(total_recovered_global) + "`\n" "Active Cases: `" + str(active_cases_covid19) + "`") message.reply_text(reply_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True) return elif fetch.status_code == 404: reply_text = "The API is currently down." message.reply_text(reply_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True) __help__ = """ - /covid: get worldwide corona status - /covindia <state>: Get real time COVID-19 stats for the input Indian state """ __mod_name__ = 'COVID-19 Tracker' COV_INDIA_HANDLER = CommandHandler('covindia', covindia) CORONA_HANDLER = DisableAbleCommandHandler("covid", corona, admin_ok=True) dispatcher.add_handler(CORONA_HANDLER) dispatcher.add_handler(COV_INDIA_HANDLER)
__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. """ 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) __mod_name__ = "WORD BLACKLISTS" __handlers__ = [BLACKLIST_HANDLER, ADD_BLACKLIST_HANDLER, UNBLACKLIST_HANDLER, (BLACKLIST_DEL_HANDLER, BLACKLIST_GROUP)]
__help__ = """ - /adminlist: 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 - /settitle: sets a custom title for an admin that the bot promoted - /setgpic: As a reply to file or photo to set group profile pic. - /delgpic: Remove group profile pic. """ ADMINLIST_HANDLER = DisableAbleCommandHandler(["adminlist", "admins"], adminlist) PIN_HANDLER = CommandHandler("pin", pin, pass_args=True, filters=Filters.group) UNPIN_HANDLER = CommandHandler("unpin", unpin, filters=Filters.group) INVITE_HANDLER = DisableAbleCommandHandler("invitelink", invite, filters=Filters.group) PROMOTE_HANDLER = CommandHandler("promote", promote, pass_args=True) DEMOTE_HANDLER = CommandHandler("demote", demote, pass_args=True) SET_TITLE_HANDLER = CommandHandler("settitle", set_title, pass_args=True) GITPULL_HANDLER = CommandHandler("gitpull", gitpull) RESTART_HANDLER = CommandHandler("restart", restart)
def __chat_settings__(chat_id, user_id): cust_filters = sql.get_chat_triggers(chat_id) return "There are `{}` custom filters here.".format(len(cust_filters)) __help__ = """ - /filters: list all active filters in this 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. - /stopall: stop all filters """ __mod_name__ = "FILTERS" FILTER_HANDLER = CommandHandler("filter", filters) STOP_HANDLER = CommandHandler("stop", stop_filter) STOPALL_HANDLER = DisableAbleCommandHandler("stopall", stop_all_filters) 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(STOPALL_HANDLER) dispatcher.add_handler(LIST_HANDLER) dispatcher.add_handler(CUST_FILTER_HANDLER, HANDLER_GROUP)
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) SBAN_HANDLER = CommandHandler("sban", sban, pass_args=True, filters=Filters.group) ROAR_HANDLER = CommandHandler("roar", selfunban, pass_args=True) 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)
res = "{} is afk".format(fst_name) update.effective_message.reply_text(res) else: if int(userc_id) == int(user_id): return res = "{} is AFK.\nReason: {}".format(fst_name, user.reason) update.effective_message.reply_text(res) __help__ = """ - /afk <reason>: mark yourself as AFK(away from keyboard). - 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 you're not available! """ 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) __mod_name__ = "AFK" __command_list__ = ["afk"] __handlers__ = [(AFK_HANDLER, AFK_GROUP), (AFK_REGEX_HANDLER, AFK_GROUP), (NO_AFK_HANDLER, AFK_GROUP), (AFK_REPLY_HANDLER, AFK_REPLY_GROUP)]