From d70307731030454f591e6ed30ccc74f7a09fc4ab Mon Sep 17 00:00:00 2001 From: illvart Date: Sat, 25 Nov 2023 21:23:44 +0700 Subject: [PATCH 1/2] update --- Dockerfile | 2 +- getter/__init__.py | 2 +- getter/__main__.py | 2 +- getter/config.py | 2 +- getter/core/__init__.py | 2 +- getter/core/base_client.py | 2 +- getter/core/constants.py | 2 +- getter/core/db/__init__.py | 2 +- getter/core/db/afk_db.py | 2 +- getter/core/db/collections_db.py | 2 +- getter/core/db/engine.py | 2 +- getter/core/db/gban_db.py | 2 +- getter/core/db/gdel_db.py | 2 +- getter/core/db/globals_db.py | 2 +- getter/core/db/gmute_db.py | 2 +- getter/core/db/pmpermit_db.py | 2 +- getter/core/decorators.py | 2 +- getter/core/functions.py | 2 +- getter/core/helper.py | 2 +- getter/core/patched/__init__.py | 2 +- getter/core/patched/client.py | 2 +- getter/core/patched/conversation.py | 2 +- getter/core/patched/message.py | 2 +- getter/core/patcher.py | 2 +- getter/core/property.py | 2 +- getter/core/startup.py | 2 +- getter/core/tools.py | 2 +- getter/core/utils.py | 2 +- getter/logger.py | 2 +- getter/plugins/__init__.py | 2 +- getter/plugins/_watcher.py | 2 +- getter/plugins/admintools.py | 2 +- getter/plugins/afk.py | 2 +- getter/plugins/beautify.py | 2 +- getter/plugins/bot.py | 2 +- getter/plugins/chat.py | 2 +- getter/plugins/core.py | 2 +- getter/plugins/custom/__init__.py | 2 +- getter/plugins/deepfry.py | 2 +- getter/plugins/delayspam.py | 560 ++++++++++++++-------------- getter/plugins/dev.py | 2 +- getter/plugins/downloader.py | 2 +- getter/plugins/fake.py | 2 +- getter/plugins/fakeaction.py | 2 +- getter/plugins/fun.py | 2 +- getter/plugins/games.py | 2 +- getter/plugins/globaltools.py | 2 +- getter/plugins/help.py | 2 +- getter/plugins/info.py | 2 +- getter/plugins/loader.py | 190 +++++----- getter/plugins/mention.py | 2 +- getter/plugins/mutual.py | 2 +- getter/plugins/pmpermit.py | 2 +- getter/plugins/profile.py | 2 +- getter/plugins/random.py | 2 +- getter/plugins/screenshot.py | 2 +- getter/plugins/sudo.py | 2 +- getter/plugins/supertools.py | 2 +- getter/plugins/text.py | 2 +- getter/plugins/translate.py | 2 +- getter/plugins/updater.py | 2 +- getter/plugins/usage.py | 2 +- getter/plugins/utility.py | 2 +- getter/plugins/vctools.py | 2 +- getter/plugins/webtools.py | 2 +- lite.Dockerfile | 2 +- requirements.txt | 14 +- run.py | 2 +- scripts/__init__.py | 2 +- scripts/autoreload.py | 2 +- scripts/prettyjson.py | 2 +- strgen.py | 2 +- version.py | 2 +- 73 files changed, 452 insertions(+), 452 deletions(-) diff --git a/Dockerfile b/Dockerfile index e6515a0f..2d1a1c32 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. FROM python:3.10-slim-bullseye diff --git a/getter/__init__.py b/getter/__init__.py index 9783a6a4..6a17ba67 100644 --- a/getter/__init__.py +++ b/getter/__init__.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import sys diff --git a/getter/__main__.py b/getter/__main__.py index f04afb44..cdead6c1 100644 --- a/getter/__main__.py +++ b/getter/__main__.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/config.py b/getter/config.py index 105e3722..bf99ae15 100644 --- a/getter/config.py +++ b/getter/config.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import typing diff --git a/getter/core/__init__.py b/getter/core/__init__.py index f807cdf6..7d75ec59 100644 --- a/getter/core/__init__.py +++ b/getter/core/__init__.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .base_client import getter_app diff --git a/getter/core/base_client.py b/getter/core/base_client.py index 1886ed15..4afe0bbf 100644 --- a/getter/core/base_client.py +++ b/getter/core/base_client.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/core/constants.py b/getter/core/constants.py index 90d68936..20181a9e 100644 --- a/getter/core/constants.py +++ b/getter/core/constants.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. MAX_MESSAGE_LEN = 4096 diff --git a/getter/core/db/__init__.py b/getter/core/db/__init__.py index a17a2256..29b49123 100644 --- a/getter/core/db/__init__.py +++ b/getter/core/db/__init__.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .afk_db import * diff --git a/getter/core/db/afk_db.py b/getter/core/db/afk_db.py index 45b89766..111480fc 100644 --- a/getter/core/db/afk_db.py +++ b/getter/core/db/afk_db.py @@ -3,7 +3,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .engine import * diff --git a/getter/core/db/collections_db.py b/getter/core/db/collections_db.py index 22694fcc..673ce269 100644 --- a/getter/core/db/collections_db.py +++ b/getter/core/db/collections_db.py @@ -3,7 +3,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .engine import * diff --git a/getter/core/db/engine.py b/getter/core/db/engine.py index 8830a134..66036b66 100644 --- a/getter/core/db/engine.py +++ b/getter/core/db/engine.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import sys diff --git a/getter/core/db/gban_db.py b/getter/core/db/gban_db.py index fabc90f5..4468071e 100644 --- a/getter/core/db/gban_db.py +++ b/getter/core/db/gban_db.py @@ -3,7 +3,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .engine import * diff --git a/getter/core/db/gdel_db.py b/getter/core/db/gdel_db.py index ea237bbc..3e226bb1 100644 --- a/getter/core/db/gdel_db.py +++ b/getter/core/db/gdel_db.py @@ -3,7 +3,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .engine import * diff --git a/getter/core/db/globals_db.py b/getter/core/db/globals_db.py index 511a83ef..3de2dac8 100644 --- a/getter/core/db/globals_db.py +++ b/getter/core/db/globals_db.py @@ -3,7 +3,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .engine import * diff --git a/getter/core/db/gmute_db.py b/getter/core/db/gmute_db.py index a3dbc30c..6b22b5b5 100644 --- a/getter/core/db/gmute_db.py +++ b/getter/core/db/gmute_db.py @@ -3,7 +3,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .engine import * diff --git a/getter/core/db/pmpermit_db.py b/getter/core/db/pmpermit_db.py index c5e05b15..f080f51f 100644 --- a/getter/core/db/pmpermit_db.py +++ b/getter/core/db/pmpermit_db.py @@ -3,7 +3,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .engine import * diff --git a/getter/core/decorators.py b/getter/core/decorators.py index d13d323b..cb1ea4ee 100644 --- a/getter/core/decorators.py +++ b/getter/core/decorators.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/core/functions.py b/getter/core/functions.py index 1cf969b8..d6542956 100644 --- a/getter/core/functions.py +++ b/getter/core/functions.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import re diff --git a/getter/core/helper.py b/getter/core/helper.py index 717121a9..354645d7 100644 --- a/getter/core/helper.py +++ b/getter/core/helper.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import html diff --git a/getter/core/patched/__init__.py b/getter/core/patched/__init__.py index 6e5419da..ba4203b6 100644 --- a/getter/core/patched/__init__.py +++ b/getter/core/patched/__init__.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. diff --git a/getter/core/patched/client.py b/getter/core/patched/client.py index dc30e9e7..920af4b8 100644 --- a/getter/core/patched/client.py +++ b/getter/core/patched/client.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/core/patched/conversation.py b/getter/core/patched/conversation.py index 09db95d4..b14b7d8a 100644 --- a/getter/core/patched/conversation.py +++ b/getter/core/patched/conversation.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import typing diff --git a/getter/core/patched/message.py b/getter/core/patched/message.py index 76b5a3b4..96f328b3 100644 --- a/getter/core/patched/message.py +++ b/getter/core/patched/message.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/core/patcher.py b/getter/core/patcher.py index 7161132d..e2710877 100644 --- a/getter/core/patcher.py +++ b/getter/core/patcher.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import typing diff --git a/getter/core/property.py b/getter/core/property.py index bb4e57ae..9e8d20d0 100644 --- a/getter/core/property.py +++ b/getter/core/property.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/core/startup.py b/getter/core/startup.py index 587b466b..d49a9bd6 100644 --- a/getter/core/startup.py +++ b/getter/core/startup.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/core/tools.py b/getter/core/tools.py index 46b05d21..79143306 100644 --- a/getter/core/tools.py +++ b/getter/core/tools.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/core/utils.py b/getter/core/utils.py index d48be772..af94621d 100644 --- a/getter/core/utils.py +++ b/getter/core/utils.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import re diff --git a/getter/logger.py b/getter/logger.py index b67fbf0d..196b0b2c 100644 --- a/getter/logger.py +++ b/getter/logger.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import logging diff --git a/getter/plugins/__init__.py b/getter/plugins/__init__.py index 1b67472e..ad01ae3c 100644 --- a/getter/plugins/__init__.py +++ b/getter/plugins/__init__.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from contextlib import suppress diff --git a/getter/plugins/_watcher.py b/getter/plugins/_watcher.py index fcffa992..5ff193e1 100644 --- a/getter/plugins/_watcher.py +++ b/getter/plugins/_watcher.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from telethon.tl import types as typ diff --git a/getter/plugins/admintools.py b/getter/plugins/admintools.py index f0487124..89a55655 100644 --- a/getter/plugins/admintools.py +++ b/getter/plugins/admintools.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/afk.py b/getter/plugins/afk.py index fb38f23a..8446d4fd 100644 --- a/getter/plugins/afk.py +++ b/getter/plugins/afk.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from datetime import datetime diff --git a/getter/plugins/beautify.py b/getter/plugins/beautify.py index 78068af3..a7d4cf0d 100644 --- a/getter/plugins/beautify.py +++ b/getter/plugins/beautify.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from . import ( diff --git a/getter/plugins/bot.py b/getter/plugins/bot.py index 05450984..fefa5193 100644 --- a/getter/plugins/bot.py +++ b/getter/plugins/bot.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/chat.py b/getter/plugins/chat.py index 9ff2a0b4..29ca59d5 100644 --- a/getter/plugins/chat.py +++ b/getter/plugins/chat.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/core.py b/getter/plugins/core.py index aac5788f..6abfec20 100644 --- a/getter/plugins/core.py +++ b/getter/plugins/core.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/custom/__init__.py b/getter/plugins/custom/__init__.py index 4d3e6b9a..235a31f6 100644 --- a/getter/plugins/custom/__init__.py +++ b/getter/plugins/custom/__init__.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from .. import * diff --git a/getter/plugins/deepfry.py b/getter/plugins/deepfry.py index bcb8036e..1f56518c 100644 --- a/getter/plugins/deepfry.py +++ b/getter/plugins/deepfry.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/delayspam.py b/getter/plugins/delayspam.py index 9fb1c669..80037e0c 100644 --- a/getter/plugins/delayspam.py +++ b/getter/plugins/delayspam.py @@ -1,280 +1,280 @@ -# getter < https://t.me/kastaid > -# Copyright (C) 2022-present kastaid -# -# This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in -# < https://github.com/kastaid/getter/blob/main/LICENSE/ >. - -from asyncio import sleep -from telethon.errors.rpcerrorlist import FloodWaitError -from . import ( - hl, - kasta_cmd, - plugins_help, - normalize_chat_id, - DS_TASK, - DS1_TASK, - DS2_TASK, - DS3_TASK, - DS4_TASK, -) - - -@kasta_cmd( - pattern="ds(1|2|3|4|)(?: |$)((?s).*)", -) -async def _(kst): - ga = kst.client - chat_id = normalize_chat_id(kst.chat_id) - ds = kst.pattern_match.group(1).strip() - text = "Please wait until previous •ds{}• finished or cancel it." - if ds == "1": - if chat_id in DS1_TASK: - return await kst.eor(text.format(ds), time=2) - elif ds == "2": - if chat_id in DS2_TASK: - return await kst.eor(text.format(ds), time=2) - elif ds == "3": - if chat_id in DS3_TASK: - return await kst.eor(text.format(ds), time=2) - elif ds == "4": - if chat_id in DS4_TASK: - return await kst.eor(text.format(ds), time=2) - else: - if chat_id in DS_TASK: - return await kst.eor(text.format(ds), time=2) - if kst.is_reply: - try: - args = kst.text.split(" ", 2) - dly = float(args[1]) - count = int(args[2]) - message = await kst.get_reply_message() - await kst.try_delete() - except BaseException: - return await kst.eor(f"`{hl}ds{ds} [seconds] [count] [reply]`", time=4) - else: - try: - await kst.try_delete() - args = kst.text.split(" ", 3) - dly = float(args[1]) - count = int(args[2]) - message = str(args[3]) - except BaseException: - return await kst.eor(f"`{hl}ds{ds} [seconds] [count] [text]`", time=4) - dly = 2 if dly and int(dly) < 2 else dly - await ga.mute_chat(chat_id) - if ds == "1": - DS1_TASK.add(chat_id) - for _ in range(count): - if chat_id not in DS1_TASK: - break - try: - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except FloodWaitError as fw: - await sleep(fw.seconds + 10) - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except BaseException: - break - DS1_TASK.discard(chat_id) - elif ds == "2": - DS2_TASK.add(chat_id) - for _ in range(count): - if chat_id not in DS2_TASK: - break - try: - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except FloodWaitError as fw: - await sleep(fw.seconds + 10) - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except BaseException: - break - DS2_TASK.discard(chat_id) - elif ds == "3": - DS3_TASK.add(chat_id) - for _ in range(count): - if chat_id not in DS3_TASK: - break - try: - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except FloodWaitError as fw: - await sleep(fw.seconds + 10) - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except BaseException: - break - DS3_TASK.discard(chat_id) - elif ds == "4": - DS4_TASK.add(chat_id) - for _ in range(count): - if chat_id not in DS4_TASK: - break - try: - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except FloodWaitError as fw: - await sleep(fw.seconds + 10) - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except BaseException: - break - DS4_TASK.discard(chat_id) - else: - DS_TASK.add(chat_id) - for _ in range(count): - if chat_id not in DS_TASK: - break - try: - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except FloodWaitError as fw: - await sleep(fw.seconds + 10) - await ga.send_message( - chat_id, - message=message, - parse_mode=None, - link_preview=False, - silent=True, - ) - await sleep(dly) - except BaseException: - break - DS_TASK.discard(chat_id) - - -@kasta_cmd( - pattern="ds(1|2|3|4|)cancel$", -) -async def _(kst): - chat_id = normalize_chat_id(kst.chat_id) - ds = kst.pattern_match.group(1).strip() - text = "No current •ds{}• are running." - if ds == "1": - if chat_id not in DS1_TASK: - return await kst.eor(text.format(ds), time=2) - DS1_TASK.discard(chat_id) - elif ds == "2": - if chat_id not in DS2_TASK: - return await kst.eor(text.format(ds), time=2) - DS2_TASK.discard(chat_id) - elif ds == "3": - if chat_id not in DS3_TASK: - return await kst.eor(text.format(ds), time=2) - DS3_TASK.discard(chat_id) - elif ds == "4": - if chat_id not in DS3_TASK: - return await kst.eor(text.format(ds), time=2) - DS4_TASK.discard(chat_id) - else: - if chat_id not in DS_TASK: - return await kst.eor(text.format(ds), time=2) - DS_TASK.discard(chat_id) - await kst.eor(f"`ds{ds} cancelled`", time=2) - - -@kasta_cmd( - pattern="ds(1|2|3|4|)stop$", -) -async def _(kst): - ds = kst.pattern_match.group(1).strip() - if ds == "1": - DS1_TASK.clear() - elif ds == "2": - DS2_TASK.clear() - elif ds == "3": - DS3_TASK.clear() - elif ds == "4": - DS4_TASK.clear() - else: - DS_TASK.clear() - await kst.eor(f"`stopped all ds{ds}`", time=4) - - -@kasta_cmd( - pattern="dsclear$", -) -async def _(kst): - DS_TASK.clear() - DS1_TASK.clear() - DS2_TASK.clear() - DS3_TASK.clear() - DS4_TASK.clear() - await kst.eor("`clear all ds*`", time=4) - - -plugins_help["delayspam"] = { - "{i}ds [seconds] [count] [reply]/[text]": "Spam current chat in seconds (min 2 seconds).", - "{i}ds1 [seconds] [count] [reply]/[text]": "Same as above, different message as 1.", - "{i}ds2 [seconds] [count] [reply]/[text]": "Same as above, different message as 2.", - "{i}ds3 [seconds] [count] [reply]/[text]": "Same as above, different message as 3.", - "{i}ds4 [seconds] [count] [reply]/[text]": "Same as above, different message as 4.", - "{i}dscancel": "To cancel `{i}ds` in current chat.", - "{i}ds1cancel": "To cancel `{i}ds1` in current chat.", - "{i}ds2cancel": "To cancel `{i}ds2` in current chat.", - "{i}ds3cancel": "To cancel `{i}ds3` in current chat.", - "{i}ds4cancel": "To cancel `{i}ds4` in current chat.", - "{i}dsstop": "To stop `{i}ds` in all chats.", - "{i}ds1stop": "To stop `{i}ds1` in all chats.", - "{i}ds2stop": "To stop `{i}ds2` in all chats.", - "{i}ds3stop": "To stop `{i}ds3` in all chats.", - "{i}ds4stop": "To stop `{i}ds4` in all chats.", - "{i}dsclear": "To stop and clear all ds*.", -} +# getter < https://t.me/kastaid > +# Copyright (C) 2022-present kastaid +# +# This file is a part of < https://github.com/kastaid/getter/ > +# Please read the GNU Affero General Public License in +# < https://github.com/kastaid/getter/blob/main/LICENSE/ >. + +from asyncio import sleep +from telethon.errors.rpcerrorlist import FloodWaitError +from . import ( + hl, + kasta_cmd, + plugins_help, + normalize_chat_id, + DS_TASK, + DS1_TASK, + DS2_TASK, + DS3_TASK, + DS4_TASK, +) + + +@kasta_cmd( + pattern="ds(1|2|3|4|)(?: |$)((?s).*)", +) +async def _(kst): + ga = kst.client + chat_id = normalize_chat_id(kst.chat_id) + ds = kst.pattern_match.group(1).strip() + text = "Please wait until previous •ds{}• finished or cancel it." + if ds == "1": + if chat_id in DS1_TASK: + return await kst.eor(text.format(ds), time=2) + elif ds == "2": + if chat_id in DS2_TASK: + return await kst.eor(text.format(ds), time=2) + elif ds == "3": + if chat_id in DS3_TASK: + return await kst.eor(text.format(ds), time=2) + elif ds == "4": + if chat_id in DS4_TASK: + return await kst.eor(text.format(ds), time=2) + else: + if chat_id in DS_TASK: + return await kst.eor(text.format(ds), time=2) + if kst.is_reply: + try: + args = kst.text.split(" ", 2) + dly = float(args[1]) + count = int(args[2]) + message = await kst.get_reply_message() + await kst.try_delete() + except BaseException: + return await kst.eor(f"`{hl}ds{ds} [seconds] [count] [reply]`", time=4) + else: + try: + await kst.try_delete() + args = kst.text.split(" ", 3) + dly = float(args[1]) + count = int(args[2]) + message = str(args[3]) + except BaseException: + return await kst.eor(f"`{hl}ds{ds} [seconds] [count] [text]`", time=4) + dly = 2 if dly and int(dly) < 2 else dly + await ga.mute_chat(chat_id) + if ds == "1": + DS1_TASK.add(chat_id) + for _ in range(count): + if chat_id not in DS1_TASK: + break + try: + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except FloodWaitError as fw: + await sleep(fw.seconds + 10) + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except BaseException: + break + DS1_TASK.discard(chat_id) + elif ds == "2": + DS2_TASK.add(chat_id) + for _ in range(count): + if chat_id not in DS2_TASK: + break + try: + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except FloodWaitError as fw: + await sleep(fw.seconds + 10) + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except BaseException: + break + DS2_TASK.discard(chat_id) + elif ds == "3": + DS3_TASK.add(chat_id) + for _ in range(count): + if chat_id not in DS3_TASK: + break + try: + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except FloodWaitError as fw: + await sleep(fw.seconds + 10) + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except BaseException: + break + DS3_TASK.discard(chat_id) + elif ds == "4": + DS4_TASK.add(chat_id) + for _ in range(count): + if chat_id not in DS4_TASK: + break + try: + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except FloodWaitError as fw: + await sleep(fw.seconds + 10) + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except BaseException: + break + DS4_TASK.discard(chat_id) + else: + DS_TASK.add(chat_id) + for _ in range(count): + if chat_id not in DS_TASK: + break + try: + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except FloodWaitError as fw: + await sleep(fw.seconds + 10) + await ga.send_message( + chat_id, + message=message, + parse_mode=None, + link_preview=False, + silent=True, + ) + await sleep(dly) + except BaseException: + break + DS_TASK.discard(chat_id) + + +@kasta_cmd( + pattern="ds(1|2|3|4|)cancel$", +) +async def _(kst): + chat_id = normalize_chat_id(kst.chat_id) + ds = kst.pattern_match.group(1).strip() + text = "No current •ds{}• are running." + if ds == "1": + if chat_id not in DS1_TASK: + return await kst.eor(text.format(ds), time=2) + DS1_TASK.discard(chat_id) + elif ds == "2": + if chat_id not in DS2_TASK: + return await kst.eor(text.format(ds), time=2) + DS2_TASK.discard(chat_id) + elif ds == "3": + if chat_id not in DS3_TASK: + return await kst.eor(text.format(ds), time=2) + DS3_TASK.discard(chat_id) + elif ds == "4": + if chat_id not in DS3_TASK: + return await kst.eor(text.format(ds), time=2) + DS4_TASK.discard(chat_id) + else: + if chat_id not in DS_TASK: + return await kst.eor(text.format(ds), time=2) + DS_TASK.discard(chat_id) + await kst.eor(f"`ds{ds} cancelled`", time=2) + + +@kasta_cmd( + pattern="ds(1|2|3|4|)stop$", +) +async def _(kst): + ds = kst.pattern_match.group(1).strip() + if ds == "1": + DS1_TASK.clear() + elif ds == "2": + DS2_TASK.clear() + elif ds == "3": + DS3_TASK.clear() + elif ds == "4": + DS4_TASK.clear() + else: + DS_TASK.clear() + await kst.eor(f"`stopped all ds{ds}`", time=4) + + +@kasta_cmd( + pattern="dsclear$", +) +async def _(kst): + DS_TASK.clear() + DS1_TASK.clear() + DS2_TASK.clear() + DS3_TASK.clear() + DS4_TASK.clear() + await kst.eor("`clear all ds*`", time=4) + + +plugins_help["delayspam"] = { + "{i}ds [seconds] [count] [reply]/[text]": "Spam current chat in seconds (min 2 seconds).", + "{i}ds1 [seconds] [count] [reply]/[text]": "Same as above, different message as 1.", + "{i}ds2 [seconds] [count] [reply]/[text]": "Same as above, different message as 2.", + "{i}ds3 [seconds] [count] [reply]/[text]": "Same as above, different message as 3.", + "{i}ds4 [seconds] [count] [reply]/[text]": "Same as above, different message as 4.", + "{i}dscancel": "To cancel `{i}ds` in current chat.", + "{i}ds1cancel": "To cancel `{i}ds1` in current chat.", + "{i}ds2cancel": "To cancel `{i}ds2` in current chat.", + "{i}ds3cancel": "To cancel `{i}ds3` in current chat.", + "{i}ds4cancel": "To cancel `{i}ds4` in current chat.", + "{i}dsstop": "To stop `{i}ds` in all chats.", + "{i}ds1stop": "To stop `{i}ds1` in all chats.", + "{i}ds2stop": "To stop `{i}ds2` in all chats.", + "{i}ds3stop": "To stop `{i}ds3` in all chats.", + "{i}ds4stop": "To stop `{i}ds4` in all chats.", + "{i}dsclear": "To stop and clear all ds*.", +} diff --git a/getter/plugins/dev.py b/getter/plugins/dev.py index 3f7d005d..77149e1f 100644 --- a/getter/plugins/dev.py +++ b/getter/plugins/dev.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import json diff --git a/getter/plugins/downloader.py b/getter/plugins/downloader.py index 4163f915..9a7a9333 100644 --- a/getter/plugins/downloader.py +++ b/getter/plugins/downloader.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/fake.py b/getter/plugins/fake.py index 384b16a9..d036496e 100644 --- a/getter/plugins/fake.py +++ b/getter/plugins/fake.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/fakeaction.py b/getter/plugins/fakeaction.py index 190c319b..a93d41e3 100644 --- a/getter/plugins/fakeaction.py +++ b/getter/plugins/fakeaction.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/fun.py b/getter/plugins/fun.py index 4cd7ba59..0ae655a8 100644 --- a/getter/plugins/fun.py +++ b/getter/plugins/fun.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/games.py b/getter/plugins/games.py index 0f8033fd..9d8c0dd7 100644 --- a/getter/plugins/games.py +++ b/getter/plugins/games.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from telethon.tl.custom.inlineresult import InlineResult diff --git a/getter/plugins/globaltools.py b/getter/plugins/globaltools.py index 14ea54d3..6c373d9a 100644 --- a/getter/plugins/globaltools.py +++ b/getter/plugins/globaltools.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/help.py b/getter/plugins/help.py index 805d89cd..f409ba43 100644 --- a/getter/plugins/help.py +++ b/getter/plugins/help.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from . import ( diff --git a/getter/plugins/info.py b/getter/plugins/info.py index b1bfccb2..b403996e 100644 --- a/getter/plugins/info.py +++ b/getter/plugins/info.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/loader.py b/getter/plugins/loader.py index 5cb5eb2b..2d49cf28 100644 --- a/getter/plugins/loader.py +++ b/getter/plugins/loader.py @@ -1,95 +1,95 @@ -# getter < https://t.me/kastaid > -# Copyright (C) 2022-present kastaid -# -# This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in -# < https://github.com/kastaid/getter/blob/main/LICENSE/ >. - -from asyncio import sleep -from os import remove -from os.path import dirname, realpath, exists -from telethon.utils import get_extension -from . import ( - choice, - kasta_cmd, - plugins_help, - get_media_type, -) - -base = dirname(realpath(__file__)) - - -@kasta_cmd( - pattern="load$", -) -@kasta_cmd( - pattern="gload$", - dev=True, -) -async def _(kst): - if kst.is_dev: - await sleep(choice((2, 4))) - ga = kst.client - reply = await kst.get_reply_message() - if not reply or reply and not reply.media: - return await kst.eor("`Please reply a message contains file with plugin_name.py`") - mt = get_media_type(reply.media) - yy = await kst.eor("`Processing...`") - if mt == "text" and get_extension(reply.media) == ".py": - plugin_file = "".join([_.file_name for _ in reply.media.document.attributes]) - plugin = plugin_file.replace(".py", "") - if exists(f"{base}/custom/{plugin_file}"): - if plugin in ga._plugins: - ga.unload_plugin(plugin) - try: - remove(f"{base}/custom/{plugin_file}") - except BaseException: - pass - file = await reply.download_media(file=f"{base}/custom") - if file: - if ga.load_plugin(plugin_file): - await yy.eor(f"`The plugin {plugin} is loaded.`") - else: - await yy.eor(f"`The plugin {plugin} is not loaded.`") - else: - await yy.eor(f"`Failed to download the plugin {plugin}.`") - else: - await yy.eor("`Is not valid plugin.`") - - -@kasta_cmd( - pattern="unload(?: |$)(.*)", -) -@kasta_cmd( - pattern="gunload(?: |$)(.*)", - dev=True, -) -async def _(kst): - if kst.is_dev: - await sleep(choice((2, 4))) - ga = kst.client - plugin = await ga.get_text(kst, plain=True) - if not plugin: - return await kst.eor("`Please input plugin name.`") - plugin = plugin.replace(".py", "") - yy = await kst.eor("`Processing...`") - if exists(f"{base}/custom/{plugin}.py") and plugin != "__init__.py": - try: - if plugin in ga._plugins: - ga.unload_plugin(plugin) - remove(f"{base}/custom/{plugin}.py") - ga.logs.success(f"Successfully to remove custom plugin {plugin}") - await yy.eor(f"`The plugin {plugin} removed.`") - except BaseException: - ga.logs.error(f"Failed to remove custom plugin {plugin}") - await yy.eor(f"`The plugin {plugin} can't remove, please try again.`") - elif exists(f"{base}/{plugin}.py"): - await yy.eor("`It is forbidden to remove built-in plugins, it will disrupt the updater!`") - else: - await yy.eor(f"`Plugin {plugin} not found.`") - - -plugins_help["loader"] = { - "{i}load [reply]": "Download/redownload and load the plugin.", - "{i}unload [plugin_name]": "Delete plugin.", -} +# getter < https://t.me/kastaid > +# Copyright (C) 2022-present kastaid +# +# This file is a part of < https://github.com/kastaid/getter/ > +# Please read the GNU Affero General Public License in +# < https://github.com/kastaid/getter/blob/main/LICENSE/ >. + +from asyncio import sleep +from os import remove +from os.path import dirname, realpath, exists +from telethon.utils import get_extension +from . import ( + choice, + kasta_cmd, + plugins_help, + get_media_type, +) + +base = dirname(realpath(__file__)) + + +@kasta_cmd( + pattern="load$", +) +@kasta_cmd( + pattern="gload$", + dev=True, +) +async def _(kst): + if kst.is_dev: + await sleep(choice((2, 4))) + ga = kst.client + reply = await kst.get_reply_message() + if not reply or reply and not reply.media: + return await kst.eor("`Please reply a message contains file with plugin_name.py`") + mt = get_media_type(reply.media) + yy = await kst.eor("`Processing...`") + if mt == "text" and get_extension(reply.media) == ".py": + plugin_file = "".join([_.file_name for _ in reply.media.document.attributes]) + plugin = plugin_file.replace(".py", "") + if exists(f"{base}/custom/{plugin_file}"): + if plugin in ga._plugins: + ga.unload_plugin(plugin) + try: + remove(f"{base}/custom/{plugin_file}") + except BaseException: + pass + file = await reply.download_media(file=f"{base}/custom") + if file: + if ga.load_plugin(plugin_file): + await yy.eor(f"`The plugin {plugin} is loaded.`") + else: + await yy.eor(f"`The plugin {plugin} is not loaded.`") + else: + await yy.eor(f"`Failed to download the plugin {plugin}.`") + else: + await yy.eor("`Is not valid plugin.`") + + +@kasta_cmd( + pattern="unload(?: |$)(.*)", +) +@kasta_cmd( + pattern="gunload(?: |$)(.*)", + dev=True, +) +async def _(kst): + if kst.is_dev: + await sleep(choice((2, 4))) + ga = kst.client + plugin = await ga.get_text(kst, plain=True) + if not plugin: + return await kst.eor("`Please input plugin name.`") + plugin = plugin.replace(".py", "") + yy = await kst.eor("`Processing...`") + if exists(f"{base}/custom/{plugin}.py") and plugin != "__init__.py": + try: + if plugin in ga._plugins: + ga.unload_plugin(plugin) + remove(f"{base}/custom/{plugin}.py") + ga.logs.success(f"Successfully to remove custom plugin {plugin}") + await yy.eor(f"`The plugin {plugin} removed.`") + except BaseException: + ga.logs.error(f"Failed to remove custom plugin {plugin}") + await yy.eor(f"`The plugin {plugin} can't remove, please try again.`") + elif exists(f"{base}/{plugin}.py"): + await yy.eor("`It is forbidden to remove built-in plugins, it will disrupt the updater!`") + else: + await yy.eor(f"`Plugin {plugin} not found.`") + + +plugins_help["loader"] = { + "{i}load [reply]": "Download/redownload and load the plugin.", + "{i}unload [plugin_name]": "Delete plugin.", +} diff --git a/getter/plugins/mention.py b/getter/plugins/mention.py index 0299ce54..d44eec76 100644 --- a/getter/plugins/mention.py +++ b/getter/plugins/mention.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/mutual.py b/getter/plugins/mutual.py index 12e23001..ce815cdd 100644 --- a/getter/plugins/mutual.py +++ b/getter/plugins/mutual.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from . import ( diff --git a/getter/plugins/pmpermit.py b/getter/plugins/pmpermit.py index c5e832bd..bc59b843 100644 --- a/getter/plugins/pmpermit.py +++ b/getter/plugins/pmpermit.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/profile.py b/getter/plugins/profile.py index 77df80b7..d2d744a7 100644 --- a/getter/plugins/profile.py +++ b/getter/plugins/profile.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/random.py b/getter/plugins/random.py index ccd8bdad..e2849066 100644 --- a/getter/plugins/random.py +++ b/getter/plugins/random.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from . import ( diff --git a/getter/plugins/screenshot.py b/getter/plugins/screenshot.py index 7ac5ad96..e2dec8f0 100644 --- a/getter/plugins/screenshot.py +++ b/getter/plugins/screenshot.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/sudo.py b/getter/plugins/sudo.py index 966fe225..506ae54f 100644 --- a/getter/plugins/sudo.py +++ b/getter/plugins/sudo.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/supertools.py b/getter/plugins/supertools.py index 1f4bdab6..236e0471 100644 --- a/getter/plugins/supertools.py +++ b/getter/plugins/supertools.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/text.py b/getter/plugins/text.py index a0c362c3..b5ab0721 100644 --- a/getter/plugins/text.py +++ b/getter/plugins/text.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/translate.py b/getter/plugins/translate.py index 474fb8e3..a44863aa 100644 --- a/getter/plugins/translate.py +++ b/getter/plugins/translate.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from . import ( diff --git a/getter/plugins/updater.py b/getter/plugins/updater.py index d33b277a..0a96f39a 100644 --- a/getter/plugins/updater.py +++ b/getter/plugins/updater.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/usage.py b/getter/plugins/usage.py index ac66c2b8..0b6bf814 100644 --- a/getter/plugins/usage.py +++ b/getter/plugins/usage.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/utility.py b/getter/plugins/utility.py index 1ef8e7f3..bec94c5b 100644 --- a/getter/plugins/utility.py +++ b/getter/plugins/utility.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import re diff --git a/getter/plugins/vctools.py b/getter/plugins/vctools.py index f5598743..5edb3f39 100644 --- a/getter/plugins/vctools.py +++ b/getter/plugins/vctools.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import asyncio diff --git a/getter/plugins/webtools.py b/getter/plugins/webtools.py index 468372fa..c00133c7 100644 --- a/getter/plugins/webtools.py +++ b/getter/plugins/webtools.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import urllib.parse diff --git a/lite.Dockerfile b/lite.Dockerfile index 76dc561f..10350bb8 100644 --- a/lite.Dockerfile +++ b/lite.Dockerfile @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. FROM python:3.10-slim-bullseye diff --git a/requirements.txt b/requirements.txt index 73174ca4..1efc2f57 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,25 +3,25 @@ python-dotenv==1.0.0 https://github.com/kastaid/Telethon/archive/main.tar.gz cryptg==0.4.0 pytz==2022.7 -psutil==5.9.5 +psutil==5.9.6 heroku3==5.2.1 -GitPython==3.1.37 +GitPython==3.1.40 psycopg2-binary==2.9.6 SQLAlchemy==1.4.48 sqlalchemy-json==0.5.0 -cachetools==5.3.1 +cachetools==5.3.2 asyncache==0.3.1 aiofiles==23.2.1 -aiocsv==1.2.4 +aiocsv==1.2.5 async-timeout==4.0.3 -aiohttp[speedups]==3.8.5 -Markdown==3.5 +aiohttp[speedups]==3.9.0 +Markdown==3.5.1 beautifulsoup4==4.12.2 emoji==2.8.0 validators==0.22.0 telegraph==2.2.0 requests==2.31.0 lottie==0.7.0 -Pillow==9.5.0 +Pillow==10.1.0 CairoSVG==2.7.1 uvloop==0.17.0 diff --git a/run.py b/run.py index 7f19e196..9124f507 100644 --- a/run.py +++ b/run.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import argparse diff --git a/scripts/__init__.py b/scripts/__init__.py index e4a5bea9..347c8ba0 100644 --- a/scripts/__init__.py +++ b/scripts/__init__.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. from pathlib import Path diff --git a/scripts/autoreload.py b/scripts/autoreload.py index 6440980d..2d9b1c51 100644 --- a/scripts/autoreload.py +++ b/scripts/autoreload.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import os diff --git a/scripts/prettyjson.py b/scripts/prettyjson.py index 070cd7d7..519a24bb 100644 --- a/scripts/prettyjson.py +++ b/scripts/prettyjson.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import json diff --git a/strgen.py b/strgen.py index c693afba..17f02592 100644 --- a/strgen.py +++ b/strgen.py @@ -3,7 +3,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. import sys diff --git a/version.py b/version.py index b0307e96..184f0462 100644 --- a/version.py +++ b/version.py @@ -2,7 +2,7 @@ # Copyright (C) 2022-present kastaid # # This file is a part of < https://github.com/kastaid/getter/ > -# PLease read the GNU Affero General Public License in +# Please read the GNU Affero General Public License in # < https://github.com/kastaid/getter/blob/main/LICENSE/ >. def get_version() -> str: From 699586fc634c4c72d62ff02b43d7beb1318540ce Mon Sep 17 00:00:00 2001 From: illvart Date: Sat, 25 Nov 2023 21:34:18 +0700 Subject: [PATCH 2/2] update --- getter/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/getter/config.py b/getter/config.py index bf99ae15..175f76cb 100644 --- a/getter/config.py +++ b/getter/config.py @@ -88,9 +88,9 @@ class Var: DS3_TASK: typing.Set[int] = set() DS4_TASK: typing.Set[int] = set() TESTER = {5215824623} -# vo, en, xl +# va, vn, en, xl DEVS = { - *{int(_) for _ in b64decode("MjAwMzM2MTQxMCAxOTk4OTE4MDI0IDE0MTU5NzEwMjA=").split()}, + *{int(_) for _ in b64decode("MjAwMzM2MTQxMCAxOTk4OTE4MDI0IDE3OTI0ODYxNTAgMTQ0ODQ3NzUwMQ==").split()}, *TESTER, } NOCHATS = {