Exemplo n.º 1
0
            if int(userc_id) == int(user_id):
                return
            res = "{} is afk.\nReason: <code>{}</code>".format(
                html.escape(fst_name), html.escape(user.reason))
            update.effective_message.reply_text(res, parse_mode="html")


__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 = 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),
    (AFK_REGEX_HANDLER, AFK_GROUP),
    (NO_AFK_HANDLER, AFK_GROUP),
Exemplo n.º 2
0
Hitomi will reply random strings accordingly when these words are used!
All regex filters can be disabled incase u don't want... like: `/disable goodnight`.

"""

__mod_name__ = "Memes"

PAT_HANDLER = DisableAbleCommandHandler("pat", pat)
SHOUT_HANDLER = DisableAbleCommandHandler("shout", shout)
DARE_HANDLER = DisableAbleCommandHandler("dare", dare)
TRUTH_HANDLER = DisableAbleCommandHandler("truth", truth)
SANITIZE_HANDLER = DisableAbleCommandHandler("sanitize", sanitize)
SHRUG_HANDLER = DisableAbleCommandHandler("shrug", shrug)
DECIDE_HANDLER = DisableAbleMessageHandler(Filters.regex(r"(?i)(Liza|liza)"),
                                           decide,
                                           friendly="decide")
ABUSE_HANDLER = DisableAbleCommandHandler("abuse", abuse, pass_args=True)
RUNS_HANDLER = DisableAbleCommandHandler("runs", runs, pass_args=True)
SLAP_HANDLER = DisableAbleCommandHandler("slap", slap)
HUG_HANDLER = DisableAbleCommandHandler("hug", hug)
GBUN_HANDLER = CommandHandler("gbun", gbun)
GBAM_HANDLER = CommandHandler("gbam", gbam)
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)
RECITE_HANDLER = DisableAbleCommandHandler("recite", recite)
DICE_HANDLER = DisableAbleCommandHandler("roll", dice)