예제 #1
0
import time
import random

from telethon.events import StopPropagation
from telethon.tl import types, functions
from typing import Tuple

from userbot import client
from userbot.plugins import plugins_data
from userbot.utils.helpers import _humanfriendly_seconds, get_chat_link
from userbot.utils.events import NewMessage

DEFAULT_MUTE_SETTINGS = types.InputPeerNotifySettings(
    silent=True, mute_until=datetime.timedelta(days=365))
AFK = plugins_data.AFK
AFK.privates = plugins_data.load_data('userbot_afk_privates')
AFK.groups = plugins_data.load_data('userbot_afk_groups')
AFK.sent = plugins_data.load_data('userbot_afk_sent')

AFKMEMEZ = [
    "You missed me, next time aim better.",
    "Me no here, Me go bye.\nLeave me message. Me reply.",
    "I'll be back in a few minutes and if I'm not...,\nwait longer.",
    "I'm not here right now, so I'm probably somewhere else.",
    "Roses are red, violets are blue.\
        \nLeave me a message, and I'll get back to you.",
    "I'll be right back,\nbut if I'm not right back,\nI'll be back later.",
    "If you haven't figured it out already,\nI'm not here.",
    "Hello, welcome to my away message, how may I ignore you today?",
    "You know the drill, you leave a message, and I'll ignore it.",
    "I'm away from the keyboard at the moment,\
예제 #2
0
import random

from telethon.events import StopPropagation
from telethon.tl import types, functions
from typing import Tuple

from userbot import client
from userbot.plugins import plugins_data
from userbot.utils.helpers import _humanfriendly_seconds, get_chat_link
from userbot.utils.events import NewMessage

DEFAULT_MUTE_SETTINGS = types.InputPeerNotifySettings(
    silent=True, mute_until=datetime.timedelta(days=365))

AFK = plugins_data.AFK
AFK.privates = plugins_data.load_data("userbot_afk_privates")
AFK.groups = plugins_data.load_data("userbot_afk_groups")
AFK.sent = plugins_data.load_data("userbot_afk_sent")

going_afk = "`AFK AF!`"
going_afk_reason = "`Going AFK!`" + "\n**Reason:** __{reason}.__"
not_afk = "`I'm back!`"
currently_afk_reason = "`I'm currently AFK!`\
    \n**Last seen:** __{elapsed} ago.__\
    \n**Reason:** __{reason}.__"

AFKMEMEZ = [
    "You missed me, next time aim better.",
    "Me no here, Me go bye.\nLeave me message. Me reply.",
    "I'll be back in a few minutes and if I'm not...,\nwait longer.",
    "I'm not here right now, so I'm probably somewhere else.",