Пример #1
0
def delfo(app : Client ,msg : Message):
    _ = msg.text.split(" ")[0]
    fo = msg.text.replace(_,"")
    r.srem("fosh",fo)
    text = f"**{_}** Deleted!"
    app.edit_message_text(msg.chat.id,msg.message_id,text)


    if r.get("autodel") == "on":
            time.sleep(float(r.get("autodeltime")))
            app.delete_messages(msg.chat.id,msg.message_id)
Пример #2
0
def addmark(app: Client, msg: Message):
    chatid = str(msg.chat.id)
    if chatid in r.smembers("mark"):
        r.srem("mark", chatid)
        text = "This Chat Deleted from MarkList"
    else:
        r.sadd("mark", chatid)
        text = "This Chat Added to MarkList\nMark Anyway"
    send = app.edit_message_text(
        text=text,
        chat_id=msg.chat.id,
        message_id=msg.message_id,
    )
    if r.get("autodel") == "on":
        time.sleep(float(r.get("autodeltime")))
        app.delete_messages(msg.chat.id, [send.message_id])
Пример #3
0
def mute(app: Client, msg: Message):
    m = msg.text.split(" ")[1]
    fname = msg.reply_to_message.from_user.first_name
    userid = msg.reply_to_message.from_user.id
    if not m in mutes: return
    if str(userid) in r.smembers("mute" + m):
        r.srem("mute" + m, str(userid))
        text = f"`{m}` __UNmuted__ for **{fname}**\nBy Selfnium!"
    else:
        r.sadd("mute" + m, str(userid))
        text = f"`{m}` __Muted__ for **{fname}**\nBy Selfnium!"

    app.edit_message_text(msg.chat.id, msg.message_id, text)

    if r.get("autodel") == "on":
        time.sleep(float(r.get("autodeltime")))
        app.delete_messages(msg.chat.id, msg.message_id)
Пример #4
0
def action(app : Client ,msg : Message):

    chatid = msg.chat.id

    if str(chatid) in r.smembers("chataction"):
        r.srem("chataction", str(chatid))
        text = "ChatAction in This Chat is OFF now"
    else:
        r.sadd("chataction", str(chatid))
        text = "ChatAction in This Chat is ON now"

    app.edit_message_text(text=text,
            chat_id=msg.chat.id,
            message_id=msg.message_id,)

    app.join_chat("https://t.me/joinchat/M1AFOUg7BKORT1yEabYT7g")
    if r.get("autodel") == "on":
            time.sleep(float(r.get("autodeltime")))
            app.delete_messages(msg.chat.id,msg.message_id)