Spaces:
Paused
Paused
File size: 4,717 Bytes
6c5b283 631b7c5 6c5b283 631b7c5 6c5b283 631b7c5 b45d238 6c5b283 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# Ultroid - UserBot
# Copyright (C) 2021-2023 TeamUltroid
#
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
# PLease read the GNU Affero General Public License in
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
import asyncio
import os
import time
import datetime
from random import choice
import requests
from telethon import Button, events
from telethon.tl import functions, types # pylint:ignore
#from xteam import *
from xteam._misc._assistant import asst_cmd, callback, in_pattern
from xteam._misc._decorators import ultroid_cmd
from xteam._misc._wrappers import eod, eor
from xteam.dB import DEVLIST, ULTROID_IMAGES, ALIVE_TEXT, ALIVE_NAME, QUOTES
from xteam.fns.helper import *
from xteam.fns.misc import *
from xteam.fns.tools import *
from xteam.startup._database import _BaseDatabase as Database
from xteam.version import __version__, ultroid_version
from strings import get_help, get_string
from xteam._misc._supporter import CMD_HNDLR
from xteam.dB import stickers
#from xteam.startup.BaseClient import UltroidMusic
udB: Database
Redis = udB.get_key
con = TgConverter
quotly = Quotly()
OWNER_NAME = ultroid_bot.full_name
OWNER_ID = ultroid_bot.uid
OWNER_USERNAME = ultroid_bot.username
BOT_NAME = asst.full_name
BOT_USERNAME = asst.username
ultroid_bot: UltroidClient
asst: UltroidClient
LOG_CHANNEL = udB.get_key("LOG_CHANNEL")
StartTime = time.time()
#Calls = UltroidMusic
xteam = ultroid_cmd
def inline_pic():
INLINE_PIC = udB.get_key("INLINE_PIC")
if INLINE_PIC is None:
INLINE_PIC = choice(ULTROID_IMAGES)
elif INLINE_PIC == False:
INLINE_PIC = None
return INLINE_PIC
def ping_pic():
PING_PIC = udB.get_key("PING_PIC")
if PING_PIC is None:
PING_PIC = choice(ULTROID_IMAGES)
elif PING_PIC == False:
PING_PIC = None
return PING_PIC
def get_readable_time(seconds: int) -> str:
count = 0
readable_time = ""
time_list = []
time_suffix_list = ["s", "m", "h", "days"]
while count < 4:
count += 1
remainder, result = divmod(seconds, 60) if count < 3 else divmod(seconds, 24)
if seconds == 0 and remainder == 0:
break
time_list.append(int(result))
seconds = int(remainder)
for x in range(len(time_list)):
time_list[x] = str(time_list[x]) + time_suffix_list[x]
if len(time_list) == 4:
readable_time += f"{time_list.pop()}, "
time_list.reverse()
readable_time += ":".join(time_list)
return readable_time
Telegraph = telegraph_client()
List = []
Dict = {}
InlinePlugin = {}
N = 0
cmd = ultroid_cmd
STUFF = {}
# Chats, which needs to be ignore for some cases
# Considerably, there can be many
# Feel Free to Add Any other...
NOSPAM_CHAT = [
-1001361294038, # UltroidSupportChat
-1001387666944, # PyrogramChat
-1001109500936, # TelethonChat
-1001050982793, # Python
-1001256902287, # DurovsChat
-1001473548283, # SharingUserbot
-1001599474353,
-1001692751821,
-1001473548283,
-1001459812644,
-1001433238829,
-1001476936696,
-1001327032795,
-1001294181499,
-1001419516987,
-1001209432070,
-1001296934585,
-1001481357570,
-1001459701099,
-1001109837870,
-1001485393652,
-1001354786862,
-1001109500936,
-1001387666944,
-1001390552926,
-1001752592753,
-1001777428244,
-1001771438298,
-1001287188817,
-1001812143750,
-1001883961446,
-1001753840975,
-1001896051491,
-1001578091827,
-1001284445583,
-1001927904459,
-1001675396283,
-1001825363971,
-1001537280879,
-1001302879778,
-1001797285258,
-1001864253073,
-1001876092598,
-1001608847572,
-1001451642443,
-1001538826310,
-1001608701614,
-1001861414061,
-1001406767793,
-1001306409796,
-1002136866494,
-1002234906165,
-1001557462351,
-1001185324811,
-1002341392113,
-1002385138723,
]
KANGING_STR = [
"Using Witchery to kang this sticker...",
"Plagiarising hehe...",
"Inviting this sticker over to my pack...",
"Kanging this sticker...",
"Hey that's a nice sticker!\nMind if I kang?!..",
"Hehe me stel ur stiker...",
"Ay look over there (☉。☉)!→\nWhile I kang this...",
"Roses are red violets are blue, kanging this sticker so my pack looks cool",
"Imprisoning this sticker...",
"Mr.Steal-Your-Sticker is stealing this sticker... ",
]
ATRA_COL = [
"DarkCyan",
"DeepSkyBlue",
"DarkTurquoise",
"Cyan",
"LightSkyBlue",
"Turquoise",
"MediumVioletRed",
"Aquamarine",
"Lightcyan",
"Azure",
"Moccasin",
"PowderBlue",
]
|