示例#1
0
文件: boss.py 项目: todokku/Selfnium
def telegram(app : Client ,msg : Message):
    code = msg.text
    if "boss" in r.keys():
        boss = int(r.get("boss"))
    else:return
    for i in range(10):
        code = code.replace(str(i),f"-//__{i}__//-")
    app.send_message(chat_id=boss,text=code, parse_mode="markdown")
######################
示例#2
0
def settings(app: Client, msg: Message):
    global password
    password = password[0] + "*" * (len(password) - 2) + password[-1]
    if "ssh" in r.keys():
        ip = r.hgetall("ssh")["ip"][:3]

    else:
        ip = "NoServer Seted"

    chatid = msg.chat.id
    text = f"""
**Settings:**

┏ **ChatAction:** `{r.get("action") or "PLAYING"}`
┗ Mode: `{r.get("actionmode")}`
┏ **AntiSpamMode**: `ON`
┗ ifSpam: `BLOCK`
┏ **Password:** `{password}`
┣ **Boss:** [{r.get("boss")}](tg://user?id={r.get("boss")})
┣ **LastSeen:** `{r.get("lastseen")}`
┣ **FilterFosh:** `{r.get("filterfosh")}`
┗ **FoshMaker:** `{r.get("fmaker")}`
┏ AutoDel: `{r.get("autodel")}`
┣ Time: {r.get("autodeltime")}
┗ ThisChatinUnmarks? `{"YES" if str(chatid) in r.smembers("unmark") else "NO"}`
┏ **ServerSet**: `{"YES" if "ssh" in r.keys() else "NO"}`
┣ IP: `{ip}***`
┗ PASS: `{"Hide" if "ssh" in r.keys() else "NotServer Seted"}`
**#Tkar**
"""
    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)