From ddcdea0b75ea8172c338d714424e47f9ed279380 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 09:54:16 +0530 Subject: [PATCH 01/76] OP AF --- plugins/_inlinebot.py | 70 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/plugins/_inlinebot.py b/plugins/_inlinebot.py index 7c8d554..7458fd7 100644 --- a/plugins/_inlinebot.py +++ b/plugins/_inlinebot.py @@ -39,7 +39,7 @@ async def inline_handler(event): result = builder.article( "ยฉ Andencento-UserBot Help", - text=f"๐Ÿ”ฐ **{andencento}**\n\n๐Ÿ“œ __No.of Plugins__ : `{len(CMD_LIST)}` \n๐Ÿ—‚๏ธ __Commands__ : `{len(apn)}`", + text=f"Andencento[๐Ÿค–](https://telegra.ph/file/ac32724650ef92663fbd1.png)\n๐Ÿ”ฐ **{andencento}**\n\n๐Ÿ“œ __No.of Plugins__ : `{len(CMD_LIST)}` \n๐Ÿ—‚๏ธ __Commands__ : `{len(apn)}`", buttons=buttons, link_preview=False, ) @@ -100,6 +100,74 @@ async def inline_handler(event): link_preview=False, ) await event.answer([result] if result else None) + + @tgbot.on(callbackquery.CallbackQuery(data=compile(b"pmclick"))) + async def on_pm_click(event): + if event.query.user_id == bot.uid: + reply_pop_up_alert = "This is for Other Users..." + await event.answer(reply_pop_up_alert, cache_time=0, alert=True) + else: + await event.edit( + f"๐Ÿ”ฐ This is ฮฃIVฮ›Bฮธฦฌ PM Security for {Eiva_mention} to keep away unwanted retards from spamming PM..." + ) + + @tgbot.on(callbackquery.CallbackQuery(data=compile(b"req"))) + async def on_pm_click(event): + if event.query.user_id == bot.uid: + reply_pop_up_alert = "This is for other users!" + await event.answer(reply_pop_up_alert, cache_time=0, alert=True) + else: + await event.edit( + f"โœ… **Request Registered** \n\n{Eiva_mention} will now decide to look for your request or not.\n๐Ÿ˜ Till then wait patiently and don't spam else block!!" + ) + target = await event.client(GetFullUserRequest(event.query.user_id)) + first_name = html.escape(target.user.first_name) + ok = event.query.user_id + if first_name is not None: + first_name = first_name.replace("\u2060", "") + tosend = f"**๐Ÿ‘€ Hey {Eiva_mention} !!** \n\nโšœ๏ธ You Got A Request From [{first_name}](tg://user?id={ok}) In PM!!" + await bot.send_message(LOG_GP, tosend) + + + @tgbot.on(callbackquery.CallbackQuery(data=compile(b"chat"))) + async def on_pm_click(event): + event.query.user_id + if event.query.user_id == bot.uid: + reply_pop_up_alert = "This is for other users!" + await event.answer(reply_pop_up_alert, cache_time=0, alert=True) + else: + await event.edit( + f"Ahh!! You here to do chit-chat!!\n\nPlease wait for {Eiva_mention} to come. Till then keep patience and don't spam." + ) + target = await event.client(GetFullUserRequest(event.query.user_id)) + ok = event.query.user_id + first_name = html.escape(target.user.first_name) + if first_name is not None: + first_name = first_name.replace("\u2060", "") + tosend = f"**๐Ÿ‘€ Hey {Eiva_mention} !!** \n\nโšœ๏ธ You Got A PM from [{first_name}](tg://user?id={ok}) for random chats!!" + await bot.send_message(LOG_GP, tosend) + + + @tgbot.on(callbackquery.CallbackQuery(data=compile(b"heheboi"))) + async def on_pm_click(event): + if event.query.user_id == bot.uid: + reply_pop_up_alert = "This is for other users!" + await event.answer(reply_pop_up_alert, cache_time=0, alert=True) + else: + await event.edit( + f"๐Ÿฅด **Go away from here\nYou Are Blocked Now**" + ) + await bot(functions.contacts.BlockRequest(event.query.user_id)) + target = await event.client(GetFullUserRequest(event.query.user_id)) + ok = event.query.user_id + first_name = html.escape(target.user.first_name) + if first_name is not None: + first_name = first_name.replace("\u2060", "") + first_name = html.escape(target.user.first_name) + await bot.send_message( + LOG_GP, + f"**Blocked** [{first_name}](tg://user?id={ok}) \n\nReason:- Spam", + ) @tgbot.on( events.callbackquery.CallbackQuery( # pylint:disable=E0602 From 8e3e57c8d5c368dc3187b90777b15a564169d1f3 Mon Sep 17 00:00:00 2001 From: Phoenix Error <88020281+PhoenixError@users.noreply.github.com> Date: Fri, 6 Aug 2021 09:55:57 +0530 Subject: [PATCH 02/76] Update ping.py --- plugins/ping.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ping.py b/plugins/ping.py index f0fd94d..a606899 100644 --- a/plugins/ping.py +++ b/plugins/ping.py @@ -9,11 +9,11 @@ async def pong(user): if user.fwd_from: return start = datetime.datetime.now() - event = await eor(user, "`ยท.ยทโ˜… โ„˜ฤฑล‹ษ  โ˜…ยท.ยทยด") + event = await eor(user, "`ยท.ยทโ˜… ๐Ÿ…Ÿ๐Ÿ…˜๐Ÿ…๐Ÿ…– โ˜…ยท.ยทยด") end = datetime.datetime.now() ms = (end - start).microseconds / 1000 await event.edit( - f"โ•ฐโ€ขโ˜…โ˜… โ„˜ฦกล‹ษ  โ˜…โ˜…โ€ขโ•ฏ\n\n โš˜ `{ms}`\n โš˜ __**Oษฏษณาฝษพ**__ **:** {user_mention}" + f"๏ธปโ”ณโ•ไธ€ ๐Ÿ…Ÿ๐Ÿ…˜๐Ÿ…๐Ÿ…– ๏ธปโ”ณโ•ไธ€\n\n โš˜ `{ms}`\n โš˜ __**๐Ÿ…ž๐Ÿ…ฆ๐Ÿ…๐Ÿ…”๐Ÿ…ก**__ **:** {user_mention}" ) From d71176c790acf0e285050d6ed8bd925f4373d1eb Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 09:57:09 +0530 Subject: [PATCH 03/76] Inline --- plugins/_inlinebot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/_inlinebot.py b/plugins/_inlinebot.py index 7458fd7..d378765 100644 --- a/plugins/_inlinebot.py +++ b/plugins/_inlinebot.py @@ -101,7 +101,7 @@ async def inline_handler(event): ) await event.answer([result] if result else None) - @tgbot.on(callbackquery.CallbackQuery(data=compile(b"pmclick"))) + @tgbot.on(events.InlineQuery(data=compile(b"pmclick"))) async def on_pm_click(event): if event.query.user_id == bot.uid: reply_pop_up_alert = "This is for Other Users..." @@ -111,7 +111,7 @@ async def on_pm_click(event): f"๐Ÿ”ฐ This is ฮฃIVฮ›Bฮธฦฌ PM Security for {Eiva_mention} to keep away unwanted retards from spamming PM..." ) - @tgbot.on(callbackquery.CallbackQuery(data=compile(b"req"))) + @tgbot.on(events.InlineQuery(data=compile(b"req"))) async def on_pm_click(event): if event.query.user_id == bot.uid: reply_pop_up_alert = "This is for other users!" @@ -129,7 +129,7 @@ async def on_pm_click(event): await bot.send_message(LOG_GP, tosend) - @tgbot.on(callbackquery.CallbackQuery(data=compile(b"chat"))) + @tgbot.on(events.InlineQuery(data=compile(b"chat"))) async def on_pm_click(event): event.query.user_id if event.query.user_id == bot.uid: @@ -148,7 +148,7 @@ async def on_pm_click(event): await bot.send_message(LOG_GP, tosend) - @tgbot.on(callbackquery.CallbackQuery(data=compile(b"heheboi"))) + @tgbot.on(events.InlineQuery(data=compile(b"heheboi"))) async def on_pm_click(event): if event.query.user_id == bot.uid: reply_pop_up_alert = "This is for other users!" From 13760ed4a4054ad13cfdb7d0f2f7bb6c27766dfd Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:04:13 +0530 Subject: [PATCH 04/76] pmclick --- plugins/_inlinebot.py | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/plugins/_inlinebot.py b/plugins/_inlinebot.py index d378765..0b3bd71 100644 --- a/plugins/_inlinebot.py +++ b/plugins/_inlinebot.py @@ -101,17 +101,24 @@ async def inline_handler(event): ) await event.answer([result] if result else None) - @tgbot.on(events.InlineQuery(data=compile(b"pmclick"))) + @tgbot.on( + events.callbackquery.CallbackQuery( # pylint:disable=E0602 + data=re.compile(b"pmclick\((.+?)\)") + ) + ) async def on_pm_click(event): if event.query.user_id == bot.uid: reply_pop_up_alert = "This is for Other Users..." await event.answer(reply_pop_up_alert, cache_time=0, alert=True) else: await event.edit( - f"๐Ÿ”ฐ This is ฮฃIVฮ›Bฮธฦฌ PM Security for {Eiva_mention} to keep away unwanted retards from spamming PM..." + f"๐Ÿ”ฐ This is Andencento PM Security for {Eiva_mention} to keep away unwanted retards from spamming PM..." ) - - @tgbot.on(events.InlineQuery(data=compile(b"req"))) + @tgbot.on( + events.callbackquery.CallbackQuery( # pylint:disable=E0602 + data=re.compile(b"reg\((.+?)\)") + ) + ) async def on_pm_click(event): if event.query.user_id == bot.uid: reply_pop_up_alert = "This is for other users!" @@ -128,8 +135,11 @@ async def on_pm_click(event): tosend = f"**๐Ÿ‘€ Hey {Eiva_mention} !!** \n\nโšœ๏ธ You Got A Request From [{first_name}](tg://user?id={ok}) In PM!!" await bot.send_message(LOG_GP, tosend) - - @tgbot.on(events.InlineQuery(data=compile(b"chat"))) + @tgbot.on( + events.callbackquery.CallbackQuery( # pylint:disable=E0602 + data=re.compile(b"chat\((.+?)\)") + ) + ) async def on_pm_click(event): event.query.user_id if event.query.user_id == bot.uid: @@ -147,8 +157,11 @@ async def on_pm_click(event): tosend = f"**๐Ÿ‘€ Hey {Eiva_mention} !!** \n\nโšœ๏ธ You Got A PM from [{first_name}](tg://user?id={ok}) for random chats!!" await bot.send_message(LOG_GP, tosend) - - @tgbot.on(events.InlineQuery(data=compile(b"heheboi"))) + @tgbot.on( + events.callbackquery.CallbackQuery( # pylint:disable=E0602 + data=re.compile(b"heheboi\((.+?)\)") + ) + ) async def on_pm_click(event): if event.query.user_id == bot.uid: reply_pop_up_alert = "This is for other users!" From c7faf476bec0c87b99786b1f8d871f03774b6e16 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:09:55 +0530 Subject: [PATCH 05/76] Keke --- plugins/_help.py | 123 ++++++++++------------------------------------- 1 file changed, 26 insertions(+), 97 deletions(-) diff --git a/plugins/_help.py b/plugins/_help.py index ce34264..6a7c28c 100644 --- a/plugins/_help.py +++ b/plugins/_help.py @@ -1,100 +1,29 @@ -from config import Config -from userbot import CMD_LIST +import asyncio +import requests +from telethon import functions +from telethon.errors import ChatSendInlineForbiddenError as noin +from telethon.errors.rpcerrorlist import BotMethodInvalidError as dedbot from . import * +@Andencento.on(admin_cmd(pattern="help ?(.*)", outgoing=True)) +@Andencento.on(sudo_cmd(pattern="help ?(.*)", allow_sudo=True)) +async def yardim(event): + if event.fwd_from: + return + tgbotusername = Config.BOT_USERNAME + input_str = event.pattern_match.group(1) + try: + if not input_str == "": + if input_str in CMD_HELP: + await eor(event, str(CMD_HELP[args])) + except: + pass + if tgbotusername is not None: + results = await event.client.inline_query(tgbotusername, "Eivabot_help") + await results[0].click( + event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True + ) + await event.delete() + else: + await eor(event, "**โš ๏ธ ERROR !!** \nPlease Re-Check BOT_TOKEN & BOT_USERNAME on Heroku.") - -@command(pattern="^.help ?(.*)") -async def cmd_list(event): - if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): - tgbotusername = Config.BOT_USERNAME - input_str = event.pattern_match.group(1) - if tgbotusername is None or input_str == "text": - string = "" - for i in CMD_LIST: - string += "โ„น๏ธ " + i + "\n" - for iter_list in CMD_LIST[i]: - string += " `" + str(iter_list) + "`" - string += "\n" - string += "\n" - if len(string) > 4095: - with io.BytesIO(str.encode(string)) as out_file: - out_file.name = "cmd.txt" - await bot.send_file( - event.chat_id, - out_file, - force_document=True, - allow_cache=False, - caption="**COMMANDS**", - reply_to=reply_to_id, - ) - await event.delete() - else: - await event.edit(string) - elif input_str: - if input_str in CMD_LIST: - string = "Commands found in {}:".format(input_str) - for i in CMD_LIST[input_str]: - string += " " + i - string += "\n" - await event.edit(string) - else: - await event.edit(input_str + " is not a valid plugin!") - else: - help_string = """Userbot Helper.. \nProvided by Andencento\n -`Userbot Helper to reveal all the commands`""" - results = await bot.inline_query( # pylint:disable=E0602 - tgbotusername, help_string - ) - await results[0].click( - event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True - ) - await event.delete() - - -@Andencento.on(sudo_cmd(pattern="help$", allow_sudo=True)) -async def cmd_list(event): - if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): - tgbotusername = Config.BOT_USERNAME - input_str = event.pattern_match.group(1) - if tgbotusername is None or input_str == "text": - string = "" - for i in CMD_LIST: - string += "โ„น๏ธ " + i + "\n" - for iter_list in CMD_LIST[i]: - string += " `" + str(iter_list) + "`" - string += "\n" - string += "\n" - if len(string) > 4095: - with io.BytesIO(str.encode(string)) as out_file: - out_file.name = "cmd.txt" - await bot.send_file( - event.chat_id, - out_file, - force_document=True, - allow_cache=False, - caption="**COMMANDS**", - reply_to=reply_to_id, - ) - await event.delete() - else: - await event.edit(string) - elif input_str: - if input_str in CMD_LIST: - string = "Commands found in {}:".format(input_str) - for i in CMD_LIST[input_str]: - string += " " + i - string += "\n" - await event.edit(string) - else: - await event.edit(input_str + " is not a valid plugin!") - else: - help_string = """Userbot Helper.. \nProvided by Andencento\n -`Userbot Helper to reveal all the commands`""" - results = await bot.inline_query( # pylint:disable=E0602 - tgbotusername, help_string - ) - await results[0].click( - event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True - ) - await event.delete() From 4998a2b292437940269b0a79d786cf4610d96a52 Mon Sep 17 00:00:00 2001 From: InternetAmethyst Date: Fri, 6 Aug 2021 04:40:11 +0000 Subject: [PATCH 06/76] Initial commit --- plugins/_help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/_help.py b/plugins/_help.py index 6a7c28c..7ff1621 100644 --- a/plugins/_help.py +++ b/plugins/_help.py @@ -5,7 +5,7 @@ from telethon.errors import ChatSendInlineForbiddenError as noin from telethon.errors.rpcerrorlist import BotMethodInvalidError as dedbot from . import * -@Andencento.on(admin_cmd(pattern="help ?(.*)", outgoing=True)) +@Andencento.on(andencento_cmd(pattern="help ?(.*)", outgoing=True)) @Andencento.on(sudo_cmd(pattern="help ?(.*)", allow_sudo=True)) async def yardim(event): if event.fwd_from: From 9a5c11692bf857d9943b8d2c9a57c88e74c4702e Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:12:39 +0530 Subject: [PATCH 07/76] Update _help.py --- plugins/_help.py | 123 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 97 insertions(+), 26 deletions(-) diff --git a/plugins/_help.py b/plugins/_help.py index 7ff1621..ce34264 100644 --- a/plugins/_help.py +++ b/plugins/_help.py @@ -1,29 +1,100 @@ +from config import Config +from userbot import CMD_LIST -import asyncio -import requests -from telethon import functions -from telethon.errors import ChatSendInlineForbiddenError as noin -from telethon.errors.rpcerrorlist import BotMethodInvalidError as dedbot from . import * -@Andencento.on(andencento_cmd(pattern="help ?(.*)", outgoing=True)) -@Andencento.on(sudo_cmd(pattern="help ?(.*)", allow_sudo=True)) -async def yardim(event): - if event.fwd_from: - return - tgbotusername = Config.BOT_USERNAME - input_str = event.pattern_match.group(1) - try: - if not input_str == "": - if input_str in CMD_HELP: - await eor(event, str(CMD_HELP[args])) - except: - pass - if tgbotusername is not None: - results = await event.client.inline_query(tgbotusername, "Eivabot_help") - await results[0].click( - event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True - ) - await event.delete() - else: - await eor(event, "**โš ๏ธ ERROR !!** \nPlease Re-Check BOT_TOKEN & BOT_USERNAME on Heroku.") + +@command(pattern="^.help ?(.*)") +async def cmd_list(event): + if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): + tgbotusername = Config.BOT_USERNAME + input_str = event.pattern_match.group(1) + if tgbotusername is None or input_str == "text": + string = "" + for i in CMD_LIST: + string += "โ„น๏ธ " + i + "\n" + for iter_list in CMD_LIST[i]: + string += " `" + str(iter_list) + "`" + string += "\n" + string += "\n" + if len(string) > 4095: + with io.BytesIO(str.encode(string)) as out_file: + out_file.name = "cmd.txt" + await bot.send_file( + event.chat_id, + out_file, + force_document=True, + allow_cache=False, + caption="**COMMANDS**", + reply_to=reply_to_id, + ) + await event.delete() + else: + await event.edit(string) + elif input_str: + if input_str in CMD_LIST: + string = "Commands found in {}:".format(input_str) + for i in CMD_LIST[input_str]: + string += " " + i + string += "\n" + await event.edit(string) + else: + await event.edit(input_str + " is not a valid plugin!") + else: + help_string = """Userbot Helper.. \nProvided by Andencento\n +`Userbot Helper to reveal all the commands`""" + results = await bot.inline_query( # pylint:disable=E0602 + tgbotusername, help_string + ) + await results[0].click( + event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True + ) + await event.delete() + + +@Andencento.on(sudo_cmd(pattern="help$", allow_sudo=True)) +async def cmd_list(event): + if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): + tgbotusername = Config.BOT_USERNAME + input_str = event.pattern_match.group(1) + if tgbotusername is None or input_str == "text": + string = "" + for i in CMD_LIST: + string += "โ„น๏ธ " + i + "\n" + for iter_list in CMD_LIST[i]: + string += " `" + str(iter_list) + "`" + string += "\n" + string += "\n" + if len(string) > 4095: + with io.BytesIO(str.encode(string)) as out_file: + out_file.name = "cmd.txt" + await bot.send_file( + event.chat_id, + out_file, + force_document=True, + allow_cache=False, + caption="**COMMANDS**", + reply_to=reply_to_id, + ) + await event.delete() + else: + await event.edit(string) + elif input_str: + if input_str in CMD_LIST: + string = "Commands found in {}:".format(input_str) + for i in CMD_LIST[input_str]: + string += " " + i + string += "\n" + await event.edit(string) + else: + await event.edit(input_str + " is not a valid plugin!") + else: + help_string = """Userbot Helper.. \nProvided by Andencento\n +`Userbot Helper to reveal all the commands`""" + results = await bot.inline_query( # pylint:disable=E0602 + tgbotusername, help_string + ) + await results[0].click( + event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True + ) + await event.delete() From ae986360b17e1452dc6b15c9ac95f427999196a2 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:15:36 +0530 Subject: [PATCH 08/76] sudokimkbhiykop From b0e5269d656a0b8faaf03160babeabbf7413a888 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 10:26:22 +0530 Subject: [PATCH 09/76] K --- plugins/_help.py | 47 +---------------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/plugins/_help.py b/plugins/_help.py index ce34264..64dea2d 100644 --- a/plugins/_help.py +++ b/plugins/_help.py @@ -5,6 +5,7 @@ @command(pattern="^.help ?(.*)") +@Andencento.on(sudo_cmd(pattern="help$", allow_sudo=True)) async def cmd_list(event): if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): tgbotusername = Config.BOT_USERNAME @@ -52,49 +53,3 @@ async def cmd_list(event): await event.delete() -@Andencento.on(sudo_cmd(pattern="help$", allow_sudo=True)) -async def cmd_list(event): - if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): - tgbotusername = Config.BOT_USERNAME - input_str = event.pattern_match.group(1) - if tgbotusername is None or input_str == "text": - string = "" - for i in CMD_LIST: - string += "โ„น๏ธ " + i + "\n" - for iter_list in CMD_LIST[i]: - string += " `" + str(iter_list) + "`" - string += "\n" - string += "\n" - if len(string) > 4095: - with io.BytesIO(str.encode(string)) as out_file: - out_file.name = "cmd.txt" - await bot.send_file( - event.chat_id, - out_file, - force_document=True, - allow_cache=False, - caption="**COMMANDS**", - reply_to=reply_to_id, - ) - await event.delete() - else: - await event.edit(string) - elif input_str: - if input_str in CMD_LIST: - string = "Commands found in {}:".format(input_str) - for i in CMD_LIST[input_str]: - string += " " + i - string += "\n" - await event.edit(string) - else: - await event.edit(input_str + " is not a valid plugin!") - else: - help_string = """Userbot Helper.. \nProvided by Andencento\n -`Userbot Helper to reveal all the commands`""" - results = await bot.inline_query( # pylint:disable=E0602 - tgbotusername, help_string - ) - await results[0].click( - event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True - ) - await event.delete() From a887ba83eeee6a6c68188df97a85924ad7476ae9 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 11:11:02 +0530 Subject: [PATCH 10/76] gpromote --- plugins/global.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/global.py b/plugins/global.py index 3132fc9..e61d6ba 100644 --- a/plugins/global.py +++ b/plugins/global.py @@ -73,7 +73,7 @@ async def _(event): if str(userid) in DEVLIST: return await eod( user, - "๐Ÿ˜‘ **Nashe me hai kya Apne bap ko gban dene chala h ?ยฟ Kโ€ฝ**", + "๐Ÿ˜‘ **Hey Son Dont gban your father ?ยฟ Kโ€ฝ**", ) if is_gbanned(userid): return await eod( @@ -90,10 +90,10 @@ async def _(event): except BaseException: pass gbaner(userid) - gmsg = f"๐Ÿฅด [{name}](tg://user?id={userid}) **Is now GBanned by** {user_mention} **in** `{chats}` **Agli bar se backchodi nahi betichod**\n\n๐Ÿ“ Also Added to Gban Watch!!**!\n**๐Ÿ”ฐ Total Chats :** `{chats}`" + gmsg = f"๐Ÿฅด [{name}](tg://user?id={userid}) **Is now GBanned by** {user_mention} **in** `{chats}` **Gbanned this retard**\n\n๐Ÿ“ Also Added to Gban Watch!!**!\n**๐Ÿ”ฐ Total Chats :** `{chats}`" if reason != "": gmsg += f"\n**๐Ÿ”ฐ Reason :** `{reason}`" - ogmsg = f"[{name}](tg://user?id={userid}) **Is now GBanned by** {user_mention} **in** `{chats}` **Agli bar se backchodi nahi betichod**\n\n**๐Ÿ“ Also Added to Gban Watch!!**!\n**๐Ÿ”ฐ Total Chats :** `{chats}`" + ogmsg = f"[{name}](tg://user?id={userid}) **Is now GBanned by** {user_mention} **in** `{chats}` **Gbanned this user**\n\n**๐Ÿ“ Also Added to Gban Watch!!**!\n**๐Ÿ”ฐ Total Chats :** `{chats}`" if reason != "": ogmsg += f"\n**๐Ÿ”ฐ Reason :** `{reason}`" if Config.ABUSE == "ON": @@ -181,7 +181,7 @@ async def gkick(event): name = (await event.client.get_entity(userid)).first_name chats = 0 if userid == ForGo10God: - return await eod(user, "**๐Ÿฅด Nashe me hai kya lawde!!**") + return await eod(user, "**๐Ÿฅด Nashe me hai kya !!**") if str(userid) in DEVLIST: return await eod(user, "**๐Ÿ˜ช I'm not going to gkick my developer!!**") async for gkick in event.client.iter_dialogs(): @@ -226,7 +226,7 @@ async def gm(event): if str(userid) in DEVLIST: return await eod(event, "**Sorry I'm not going to gmute them..**") except: - pass + return try: gsql.gmute(userid, "gmute") except Exception as e: From 360a72041f836513f2767baf917724d7cb2a4ed5 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 13:52:07 +0530 Subject: [PATCH 11/76] memeui --- plugins/xiaomi.py | 210 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 plugins/xiaomi.py diff --git a/plugins/xiaomi.py b/plugins/xiaomi.py new file mode 100644 index 0000000..cc5d5dc --- /dev/null +++ b/plugins/xiaomi.py @@ -0,0 +1,210 @@ + +from telethon import events +from telethon. errors. rpcerrorlist import YouBlockedUserError +from userbot import bot, CMD_HELP +from userbot. events import register + + +@register(outgoing=True, pattern="^.firmware(?: |$)(.*)") +async def (event): + if event. fwd_from: + return + link = event. pattern_match. group(1) + firmware = "firmware" + await event. edit("''Processing'''") + async with bot. conversation("@XiaomiGeeksBot") as conv: + try: + response =conv. wait_event( + events. NewMessage( + incoming=True, + from_users=774181428)) + await conv. send_message(f'/{firmware} {link}') + response = await response + except YouBlockedUserError: + await event. reply("''Unblock @XiaomiGeeksBot plox'''") + return + else: + await event. delete() + await bot. forward_messages(event. chat_id, response. message) + + +@register(outgoing=True, pattern="^.fastboot(?: |$)(.*)") +async def (event): + if event. fwd_from: + return + link = event. pattern_match. group(1) + fboot = "fastboot" + await event. edit("''Processing'''") + async with bot. conversation("@XiaomiGeeksBot") as conv: + try: + response =conv. wait_event( + events. NewMessage( + incoming=True, + from_users=774181428)) + await conv. send_message(f'/{fboot} {link}') + response = await response + except YouBlockedUserError: + await event. reply("''Unblock @XiaomiGeeksBoot plox'''") + return + else: + await event. delete() + await bot. forward_messages(event. chat_id, response. message) + + +@register(outgoing=True, pattern="^.recovery(?: |$)(.*)") +async def (event): + if event. fwd_from: + return + link = event. pattern_match. group(1) + recovery = "recovery" + await event. edit("''Processing'''") + async with bot. conversation("@XiaomiGeeksBot") as conv: + try: + response =conv. wait_event( + events. NewMessage( + incoming=True, + from_users=774181428)) + await conv. send_message(f'/{recovery} {link}') + response = await response + except YouBlockedUserError: + await event. reply("''Unblock @XiaomiGeeksBot plox'''") + return + else: + await event. delete() + await bot. forward_messages(event. chat_id, response. message) + + +@register(outgoing=True, pattern="^.pb(?: |$)(.*)") +async def (event): + if event. fwd_from: + return + link = event. pattern_match. group(1) + pitch = "pb" + await event. edit("''Processing'''") + async with bot. conversation("@XiaomiGeeksBot") as conv: + try: + response =conv. wait_event( + events. NewMessage( + incoming=True, + from_users=774181428)) + await conv. send_message(f'/{pitch} {link}') + response = await response + except YouBlockedUserError: + await event. reply("''Unblock @XiaomiGeeksBot plox'''") + return + else: + await event. delete() + await bot. forward_messages(event. chat_id, response. message) + + +@register(outgoing=True, pattern="^.of(?: |$)(.*)") +async def (event): + if event. fwd_from: + return + link = event. pattern_match. group(1) + ofox = "of" + await event. edit("''Processing'''") + async with bot. conversation("@XiaomiGeeksBot") as conv: + try: + response =conv. wait_event( + events. NewMessage( + incoming=True, + from_users=774181428)) + await conv. send_message(f'/{ofox} {link}') + response = await response + except YouBlockedUserError: + await event. reply("''Unblock @XiaomiGeeksBot plox'''") + return + else: + await event. delete() + await bot. forward_messages(event. chat_id, response. message) + + +@register(outgoing=True, pattern="^.eu(?: |$)(.*)") +async def (event): + if event. fwd_from: + return + link = event. pattern_match. group(1) + eu = "eu" + await event. edit("''Processing'''") + async with bot. conversation("@XiaomiGeeksBot") as conv: + try: + response =conv. wait_event( + events. NewMessage( + incoming=True, + from_users=774181428)) + await conv. send_message(f'/{eu} {link}') + response = await response + except YouBlockedUserError: + await event. reply("''Unblock @XiaomiGeeksBot plox'''") + return + else: + await event. delete() + await bot. forward_messages(event. chat_id, response. message) + + +@register(outgoing=True, pattern="^.vendor(?: |$)(.*)") +async def (event): + if event. fwd_from: + return + link = event. pattern_match. group(1) + vendor="vendor" + await event. edit("''Processing'''") + async with bot. conversation("@XiaomiGeeksBot") as conv: + try: + response =conv. wait_event( + events. NewMessage( + incoming=True, + from_users=774181428)) + await conv. send_message(f'/{vendor} {link}') + response = await response + except YouBlockedUserError: + await event. reply("''Unblock @XiaomiGeeksBot plox'''") + return + else: + await event. delete() + await bot. forward_messages(event. chat_id, response. message) + + +@register(outgoing=True, pattern="^.specs(?: |$)(.*)") +async def (event): + if event. fwd_from: + return + link = event. pattern_match. group(1) + specs= "specs" + await event. edit("''Processing'''") + async with bot. conversation("@XiaomiGeeksBot") as conv: + try: + response =conv. wait_event( + events. NewMessage( + incoming=True, + from_users=774181428)) + await conv. send_message(f'/{specs} {link}') + response = await response + except YouBlockedUserError: + await event. reply("''Unblock @XiaomiGeeksBot plox'''") + return + else: + await event. delete() + await bot. forward_messages(event. chat_id, response. message) + + +CMD_HELP. updates({ + "xiaomi": + "For Xiaomeme devices only!\ +\n\n'.firmware' (codename)\ + \n Usage : Get lastest Firmware\ +\n\n'.pb' (codename)\ + \n Usage : Get latest PitchBlack Recovery\ +\n\n'.specs' (codename)\ + \n Usage : Get quick spec information about device\ +\n\n'.fastboot' (codename)\ + \n Usage : Get latest fastboot MIUI\ +\n\n'.recovery' (codename)\ + \n Usage : Get latest recovery MemeUI (MIUI)\ +\n\n'.eu' (codename)\ + \n Usage: Get latest xiaomi.eu rom\ +\n\n'.vendor' (codename)\ + \n Usage: fetches latest vendor\ +\n\n'.of' (codename)\ + \n Usage : Get latest ORangeFox Recovery"}) From c883c8d59d6e54d70b2959a835594110d712c0d8 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 13:57:29 +0530 Subject: [PATCH 12/76] memeui buggy --- plugins/xiaomi.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/xiaomi.py b/plugins/xiaomi.py index cc5d5dc..4e78a3b 100644 --- a/plugins/xiaomi.py +++ b/plugins/xiaomi.py @@ -6,8 +6,8 @@ @register(outgoing=True, pattern="^.firmware(?: |$)(.*)") -async def (event): - if event. fwd_from: +async def _(event): + if event.fwd_from: return link = event. pattern_match. group(1) firmware = "firmware" @@ -29,8 +29,8 @@ async def (event): @register(outgoing=True, pattern="^.fastboot(?: |$)(.*)") -async def (event): - if event. fwd_from: +async def _(event): + if event.fwd_from: return link = event. pattern_match. group(1) fboot = "fastboot" @@ -52,8 +52,8 @@ async def (event): @register(outgoing=True, pattern="^.recovery(?: |$)(.*)") -async def (event): - if event. fwd_from: +async def _(event): + if event.fwd_from: return link = event. pattern_match. group(1) recovery = "recovery" @@ -75,8 +75,8 @@ async def (event): @register(outgoing=True, pattern="^.pb(?: |$)(.*)") -async def (event): - if event. fwd_from: +async def _(event): + if event.fwd_from: return link = event. pattern_match. group(1) pitch = "pb" @@ -98,8 +98,8 @@ async def (event): @register(outgoing=True, pattern="^.of(?: |$)(.*)") -async def (event): - if event. fwd_from: +async def _(event): + if event.fwd_from: return link = event. pattern_match. group(1) ofox = "of" @@ -121,8 +121,8 @@ async def (event): @register(outgoing=True, pattern="^.eu(?: |$)(.*)") -async def (event): - if event. fwd_from: +async def _(event): + if event.fwd_from: return link = event. pattern_match. group(1) eu = "eu" @@ -144,8 +144,8 @@ async def (event): @register(outgoing=True, pattern="^.vendor(?: |$)(.*)") -async def (event): - if event. fwd_from: +async def _(event): + if event.fwd_from: return link = event. pattern_match. group(1) vendor="vendor" @@ -167,8 +167,8 @@ async def (event): @register(outgoing=True, pattern="^.specs(?: |$)(.*)") -async def (event): - if event. fwd_from: +async def _(event): + if event.fwd_from: return link = event. pattern_match. group(1) specs= "specs" From 0818eef0c875bc60f538b1cb0fe60b1ecbe95482 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 13:59:16 +0530 Subject: [PATCH 13/76] Vendor error memui --- plugins/xiaomi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/xiaomi.py b/plugins/xiaomi.py index 4e78a3b..3b81150 100644 --- a/plugins/xiaomi.py +++ b/plugins/xiaomi.py @@ -148,7 +148,7 @@ async def _(event): if event.fwd_from: return link = event. pattern_match. group(1) - vendor="vendor" + vendor= f"vendor" await event. edit("''Processing'''") async with bot. conversation("@XiaomiGeeksBot") as conv: try: From 06379d4df43278d6170c2bf02968c815153b7287 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 14:01:15 +0530 Subject: [PATCH 14/76] vendor --- plugins/xiaomi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/xiaomi.py b/plugins/xiaomi.py index 3b81150..9edc759 100644 --- a/plugins/xiaomi.py +++ b/plugins/xiaomi.py @@ -148,7 +148,7 @@ async def _(event): if event.fwd_from: return link = event. pattern_match. group(1) - vendor= f"vendor" + vendor= "vendor" await event. edit("''Processing'''") async with bot. conversation("@XiaomiGeeksBot") as conv: try: From 9aa90dd273d5ff6f17f79ba7365458dd7e5771bf Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 14:05:46 +0530 Subject: [PATCH 15/76] iamnoob --- plugins/xiaomi.py | 268 ++++++++++++++++++++-------------------------- 1 file changed, 115 insertions(+), 153 deletions(-) diff --git a/plugins/xiaomi.py b/plugins/xiaomi.py index 9edc759..d420a4f 100644 --- a/plugins/xiaomi.py +++ b/plugins/xiaomi.py @@ -1,210 +1,172 @@ +# created by @eve_enryu +# edited & fix by @Jisan7509 -from telethon import events -from telethon. errors. rpcerrorlist import YouBlockedUserError -from userbot import bot, CMD_HELP -from userbot. events import register - - -@register(outgoing=True, pattern="^.firmware(?: |$)(.*)") -async def _(event): - if event.fwd_from: - return - link = event. pattern_match. group(1) - firmware = "firmware" - await event. edit("''Processing'''") - async with bot. conversation("@XiaomiGeeksBot") as conv: - try: - response =conv. wait_event( - events. NewMessage( - incoming=True, - from_users=774181428)) - await conv. send_message(f'/{firmware} {link}') - response = await response - except YouBlockedUserError: - await event. reply("''Unblock @XiaomiGeeksBot plox'''") - return - else: - await event. delete() - await bot. forward_messages(event. chat_id, response. message) +from telethon import events +from telethon.errors.rpcerrorlist import YouBlockedUserError -@register(outgoing=True, pattern="^.fastboot(?: |$)(.*)") -async def _(event): - if event.fwd_from: - return - link = event. pattern_match. group(1) - fboot = "fastboot" - await event. edit("''Processing'''") - async with bot. conversation("@XiaomiGeeksBot") as conv: - try: - response =conv. wait_event( - events. NewMessage( - incoming=True, - from_users=774181428)) - await conv. send_message(f'/{fboot} {link}') - response = await response - except YouBlockedUserError: - await event. reply("''Unblock @XiaomiGeeksBoot plox'''") - return - else: - await event. delete() - await bot. forward_messages(event. chat_id, response. message) +from . import * -@register(outgoing=True, pattern="^.recovery(?: |$)(.*)") +@Andencento.on(admin_cmd(pattern="firmware(?: |$)(.*)")) +@Andencento.on(sudo_cmd(pattern="firmware(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return - link = event. pattern_match. group(1) - recovery = "recovery" - await event. edit("''Processing'''") - async with bot. conversation("@XiaomiGeeksBot") as conv: + link = event.pattern_match.group(1) + firmware = f"firmware" + iamnoob = await edit_or_reply(event, "```Processing```") + async with event.client.conversation("@XiaomiGeeksBot") as conv: try: - response =conv. wait_event( - events. NewMessage( - incoming=True, - from_users=774181428)) - await conv. send_message(f'/{recovery} {link}') - response = await response + response = conv.wait_event( + events.NewMessage(incoming=True, from_users=774181428) + ) + await conv.send_message(f"/{firmware} {link}") + respond = await response + await event.client.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: - await event. reply("''Unblock @XiaomiGeeksBot plox'''") + await iamnoob.edit("```Unblock @XiaomiGeeksBot plox```") return else: - await event. delete() - await bot. forward_messages(event. chat_id, response. message) + await iamnoob.delete() + await event.client.forward_messages(event.chat_id, respond.message) -@register(outgoing=True, pattern="^.pb(?: |$)(.*)") +@Andencento.on(admin_cmd(pattern="specs(?: |$)(.*)")) +@Andencento.on(sudo_cmd(pattern="specs(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return - link = event. pattern_match. group(1) - pitch = "pb" - await event. edit("''Processing'''") - async with bot. conversation("@XiaomiGeeksBot") as conv: + link = event.pattern_match.group(1) + specs = f"specs" + iamnoob = await edit_or_reply(event, "```Processing```") + async with event.client.conversation("@XiaomiGeeksBot") as conv: try: - response =conv. wait_event( - events. NewMessage( - incoming=True, - from_users=774181428)) - await conv. send_message(f'/{pitch} {link}') - response = await response + response = conv.wait_event( + events.NewMessage(incoming=True, from_users=774181428) + ) + await conv.send_message(f"/{specs} {link}") + respond = await response + await event.client.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: - await event. reply("''Unblock @XiaomiGeeksBot plox'''") + await iamnoob.edit("```Unblock @XiaomiGeeksBot plox```") return else: - await event. delete() - await bot. forward_messages(event. chat_id, response. message) + await iamnoob.delete() + await event.client.forward_messages(event.chat_id, respond.message) -@register(outgoing=True, pattern="^.of(?: |$)(.*)") +@Andencento.on(admin_cmd(pattern="fastboot(?: |$)(.*)")) +@Andencento.on(sudo_cmd(pattern="fastboot(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return - link = event. pattern_match. group(1) - ofox = "of" - await event. edit("''Processing'''") - async with bot. conversation("@XiaomiGeeksBot") as conv: + link = event.pattern_match.group(1) + fboot = f"fastboot" + iamnoob = await edit_or_reply(event, "```Processing```") + async with event.client.conversation("@XiaomiGeeksBot") as conv: try: - response =conv. wait_event( - events. NewMessage( - incoming=True, - from_users=774181428)) - await conv. send_message(f'/{ofox} {link}') - response = await response + response = conv.wait_event( + events.NewMessage(incoming=True, from_users=774181428) + ) + await conv.send_message(f"/{fboot} {link}") + respond = await response + await event.client.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: - await event. reply("''Unblock @XiaomiGeeksBot plox'''") + await iamnoob.edit("```Unblock @XiaomiGeeksBot plox```") return else: - await event. delete() - await bot. forward_messages(event. chat_id, response. message) + await iamnoob.delete() + await event.client.forward_messages(event.chat_id, respond.message) -@register(outgoing=True, pattern="^.eu(?: |$)(.*)") +@Andencento.on(admin_cmd(pattern="recovery(?: |$)(.*)")) +@Andencento.on(sudo_cmd(pattern="recovery(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return - link = event. pattern_match. group(1) - eu = "eu" - await event. edit("''Processing'''") - async with bot. conversation("@XiaomiGeeksBot") as conv: + link = event.pattern_match.group(1) + recovery = f"recovery" + iamnoob = await edit_or_reply(event, "```Processing```") + async with event.client.conversation("@XiaomiGeeksBot") as conv: try: - response =conv. wait_event( - events. NewMessage( - incoming=True, - from_users=774181428)) - await conv. send_message(f'/{eu} {link}') - response = await response + response = conv.wait_event( + events.NewMessage(incoming=True, from_users=774181428) + ) + await conv.send_message(f"/{recovery} {link}") + respond = await response + await event.client.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: - await event. reply("''Unblock @XiaomiGeeksBot plox'''") + await iamnoob.edit("```Unblock @XiaomiGeeksBot plox```") return else: - await event. delete() - await bot. forward_messages(event. chat_id, response. message) + await iamnoob.delete() + await event.client.forward_messages(event.chat_id, respond.message) -@register(outgoing=True, pattern="^.vendor(?: |$)(.*)") +@Andencento.on(admin_cmd(pattern="pb(?: |$)(.*)")) +@Andencento.on(sudo_cmd(pattern="pb(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return - link = event. pattern_match. group(1) - vendor= "vendor" - await event. edit("''Processing'''") - async with bot. conversation("@XiaomiGeeksBot") as conv: + link = event.pattern_match.group(1) + pitch = f"pb" + iamnoob = await edit_or_reply(event, "```Processing```") + async with event.client.conversation("@XiaomiGeeksBot") as conv: try: - response =conv. wait_event( - events. NewMessage( - incoming=True, - from_users=774181428)) - await conv. send_message(f'/{vendor} {link}') - response = await response + response = conv.wait_event( + events.NewMessage(incoming=True, from_users=774181428) + ) + await conv.send_message(f"/{pitch} {link}") + respond = await response + await event.client.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: - await event. reply("''Unblock @XiaomiGeeksBot plox'''") + await iamnoob.edit("```Unblock @XiaomiGeeksBot plox```") return else: - await event. delete() - await bot. forward_messages(event. chat_id, response. message) + await iamnoob.delete() + await event.client.forward_messages(event.chat_id, respond.message) -@register(outgoing=True, pattern="^.specs(?: |$)(.*)") +@Andencento.on(admin_cmd(pattern="of(?: |$)(.*)")) +@Andencento.on(sudo_cmd(pattern="of(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return - link = event. pattern_match. group(1) - specs= "specs" - await event. edit("''Processing'''") - async with bot. conversation("@XiaomiGeeksBot") as conv: + link = event.pattern_match.group(1) + ofox = f"of" + iamnoob = await edit_or_reply(event, "```Processing```") + async with event.client.conversation("@XiaomiGeeksBot") as conv: try: - response =conv. wait_event( - events. NewMessage( - incoming=True, - from_users=774181428)) - await conv. send_message(f'/{specs} {link}') - response = await response + response = conv.wait_event( + events.NewMessage(incoming=True, from_users=774181428) + ) + await conv.send_message(f"/{ofox} {link}") + respond = await response + await event.client.send_read_acknowledge(conv.chat_id) except YouBlockedUserError: - await event. reply("''Unblock @XiaomiGeeksBot plox'''") + await iamnoob.edit("```Unblock @XiaomiGeeksBot plox```") return else: - await event. delete() - await bot. forward_messages(event. chat_id, response. message) - - -CMD_HELP. updates({ - "xiaomi": - "For Xiaomeme devices only!\ -\n\n'.firmware' (codename)\ - \n Usage : Get lastest Firmware\ -\n\n'.pb' (codename)\ - \n Usage : Get latest PitchBlack Recovery\ -\n\n'.specs' (codename)\ - \n Usage : Get quick spec information about device\ -\n\n'.fastboot' (codename)\ - \n Usage : Get latest fastboot MIUI\ -\n\n'.recovery' (codename)\ - \n Usage : Get latest recovery MemeUI (MIUI)\ -\n\n'.eu' (codename)\ - \n Usage: Get latest xiaomi.eu rom\ -\n\n'.vendor' (codename)\ - \n Usage: fetches latest vendor\ -\n\n'.of' (codename)\ - \n Usage : Get latest ORangeFox Recovery"}) + await iamnoob.delete() + await event.client.forward_messages(event.chat_id, respond.message) + + +CMD_HELP.update( + { + "xiaomi": "**Plugin :** `Xiaomi`\ + \n\n__**For Xiaomeme devices only!**__\ + \n\n**Syntax :** `.firmware` (codename)\ + \n**Function : **Get lastest Firmware\ + \n\n**Syntax :** `.pb` (codename)\ + \n**Function : **Get latest PBRP\ + \n\n**Syntax :** `.specs` (codename)\ + \n**Function : **Get quick spec information about device\ + \n\n**Syntax :** `.fastboot` (codename)\ + \n**Function : **Get latest fastboot MIUI\ + \n\n**Syntax :** `.recovery` (codename)\ + \n**Function : **Get latest recovery MIUI\ + \n\n**Syntax :** `.of` (codename)\ + \n**Function : **Get latest ORangeFox Recovery" + } +) From 4230dbdae278c45555864a9a2358b95e1ac97edf Mon Sep 17 00:00:00 2001 From: InternetAmethyst Date: Fri, 6 Aug 2021 08:35:58 +0000 Subject: [PATCH 16/76] Initial commit --- plugins/xiaomi.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/xiaomi.py b/plugins/xiaomi.py index d420a4f..f4caf2d 100644 --- a/plugins/xiaomi.py +++ b/plugins/xiaomi.py @@ -8,7 +8,7 @@ from . import * -@Andencento.on(admin_cmd(pattern="firmware(?: |$)(.*)")) +@Andencento.on(andencento_cmd(pattern="firmware(?: |$)(.*)")) @Andencento.on(sudo_cmd(pattern="firmware(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: @@ -32,7 +32,7 @@ async def _(event): await event.client.forward_messages(event.chat_id, respond.message) -@Andencento.on(admin_cmd(pattern="specs(?: |$)(.*)")) +@Andencento.on(andencento_cmd(pattern="specs(?: |$)(.*)")) @Andencento.on(sudo_cmd(pattern="specs(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: @@ -56,7 +56,7 @@ async def _(event): await event.client.forward_messages(event.chat_id, respond.message) -@Andencento.on(admin_cmd(pattern="fastboot(?: |$)(.*)")) +@Andencento.on(andencento_cmd(pattern="fastboot(?: |$)(.*)")) @Andencento.on(sudo_cmd(pattern="fastboot(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: @@ -80,7 +80,7 @@ async def _(event): await event.client.forward_messages(event.chat_id, respond.message) -@Andencento.on(admin_cmd(pattern="recovery(?: |$)(.*)")) +@Andencento.on(andencento_cmd(pattern="recovery(?: |$)(.*)")) @Andencento.on(sudo_cmd(pattern="recovery(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: @@ -104,7 +104,7 @@ async def _(event): await event.client.forward_messages(event.chat_id, respond.message) -@Andencento.on(admin_cmd(pattern="pb(?: |$)(.*)")) +@Andencento.on(andencento_cmd(pattern="pb(?: |$)(.*)")) @Andencento.on(sudo_cmd(pattern="pb(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: @@ -128,7 +128,7 @@ async def _(event): await event.client.forward_messages(event.chat_id, respond.message) -@Andencento.on(admin_cmd(pattern="of(?: |$)(.*)")) +@Andencento.on(andencento_cmd(pattern="of(?: |$)(.*)")) @Andencento.on(sudo_cmd(pattern="of(?: |$)(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: From 13943daa917cff7424bd3e634d33e6504b64580b Mon Sep 17 00:00:00 2001 From: Noob Stranger <85062690+Noob-Stranger@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:28:10 +0530 Subject: [PATCH 17/76] Alve --- plugins/alive.py | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index 45b3049..f29d03b 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -1,5 +1,10 @@ +""" +Made by GODBOYX +""" +import re import os - +from telethon import custom, Button, events +from . import * from userbot import YOUR_NAME as ALIVE_NAME ver = "0.2" @@ -19,7 +24,9 @@ pm_caption += f"โžฅ **ะผัƒ ะฒฯƒั•ั•** : {DEFAULTUSER} \n" pm_caption += f"โžฅ **โ„“ฮนยขั”ฮทั•ั”** : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" pm_caption += "โžฅ **ยขฯƒฯัƒัฮนgะฝั‚** : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" - +btn = [custom.Button.inline("Deploy", data= "demploy")] +btn += [custom.Button.inline("String Session", data = "stling")] +btn += [Button.url("Repo", "https://github.com/Andencento/Andencento")] # only Owner Can Use it @Andencento.on(andencento_cmd(outgoing=True, pattern="alive$")) @@ -27,4 +34,35 @@ async def _(event): await event.get_chat() await event.delete() - await Andencento.send_file(event.chat_id, PM_IMG, caption=pm_caption) + await Andencento.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) + + + +@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) +async def demploy(event): + bottm = [[Button.url("Railway Deploy", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("Heroku Deploy", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] + + bottm += [Button.url("VC Deploy", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] + bottm += [custom.Button.inline("< Date: Fri, 6 Aug 2021 16:30:06 +0530 Subject: [PATCH 18/76] Create alive.py --- plugins/alive.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index f29d03b..4707bbb 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -1,6 +1,3 @@ -""" -Made by GODBOYX -""" import re import os from telethon import custom, Button, events @@ -13,7 +10,7 @@ PM_IMG = ( os.environ.get("ALIVE_PIC", None) or "https://telegra.ph/file/3d208ecf6d0ea9389d8f8.jpg" -) + pm_caption = "โžฅ **ฮฑฮทโˆ‚ั”ฮทยขั”ฮทั‚ฯƒ:** `ONLINE`\n\n" pm_caption += "โžฅ **ั•ัƒั•ั‚ั”ะผั• ั•ั‚ฮฑั‚ั•**\n" pm_caption += "โžฅ **ั‚ั”โ„“ั”ั‚ะฝฯƒฮท ฮฝั”ัั•ฮนฯƒฮท:** `1.23.0` \n" From bb2c830a3becbfbe736a31472691c59378c453b2 Mon Sep 17 00:00:00 2001 From: GodBoyX <77817462+GODBOYX@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:30:52 +0530 Subject: [PATCH 19/76] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e0a2d72..bda7fb3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ### โ€ข NOOB-STRANGER ยปยป ### โ€ข MADBOY ยปยป ### โ€ข InternetAmethyst ยปยป -### โ€ข GODBOYX ยปยป +### โ€ข GODBOYX ยปยป ### โ€ข InukaAsith ยปยป ## SOME INFO [![Stars](https://img.shields.io/github/stars/Andencento/Andencento?style=flat-square&color=yellow)](https://github.com/Andencento/Andencento/stargazers) From 68868b880e6011020512227f7ad10fbf096338c1 Mon Sep 17 00:00:00 2001 From: GodBoyX <77817462+GODBOYX@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:31:16 +0530 Subject: [PATCH 20/76] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bda7fb3..606076b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ - Uniborg -## Deloy On Railway +## Deploy On Railway [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE) ## Deploy To Heroku From e60e9bd131c0526c05ccacb5defa91f301410d87 Mon Sep 17 00:00:00 2001 From: Noob Stranger <85062690+Noob-Stranger@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:34:27 +0530 Subject: [PATCH 21/76] Update alive.py --- plugins/alive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/alive.py b/plugins/alive.py index 4707bbb..969e8c0 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -31,7 +31,7 @@ async def _(event): await event.get_chat() await event.delete() - await Andencento.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) + await Andencento.send_file(event.chat_id, PM_IMG, buttons=btn ,caption=pm_caption) From fb9f3f09f9373fc51a24166011e6347cfd8b7853 Mon Sep 17 00:00:00 2001 From: Noob Stranger <85062690+Noob-Stranger@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:35:55 +0530 Subject: [PATCH 22/76] kk --- plugins/alive.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index 969e8c0..34c2af1 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -35,7 +35,7 @@ async def _(event): -@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) +@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) async def demploy(event): bottm = [[Button.url("Railway Deploy", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("Heroku Deploy", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] @@ -44,13 +44,13 @@ async def demploy(event): await event.edit(PM_IMG, caption="Welcome to Deployment Section", buttons=bottm) -@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"bamck"))) +@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"bamck"))) async def bamck(event): await event.edit(PM_IMG, caption=pm_caption, buttons=btn) -@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"stling"))) +@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"stling"))) async def stling(event): batan = [Button.url("Andencento String Session", "https://replit.com/@madboy482/Session-Andencento/")] batan += [Button.url("VC String Session", "https://replit.com/@dashezup/generate-pyrogram-session-string")] @@ -59,7 +59,7 @@ async def stling(event): await event.edit(PM_IMG, caption="Welcome to String Session Section ", buttons=batan) -@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"bomk"))) +@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"bomk"))) async def bamck(event): await event.edit(PM_IMG, caption=pm_caption, buttons=btn) From ff4d8616327ea856dca359743e2f63df223fb97e Mon Sep 17 00:00:00 2001 From: Noob Stranger <85062690+Noob-Stranger@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:40:41 +0530 Subject: [PATCH 23/76] kk --- plugins/alive.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index 34c2af1..f29d03b 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -1,3 +1,6 @@ +""" +Made by GODBOYX +""" import re import os from telethon import custom, Button, events @@ -10,7 +13,7 @@ PM_IMG = ( os.environ.get("ALIVE_PIC", None) or "https://telegra.ph/file/3d208ecf6d0ea9389d8f8.jpg" - +) pm_caption = "โžฅ **ฮฑฮทโˆ‚ั”ฮทยขั”ฮทั‚ฯƒ:** `ONLINE`\n\n" pm_caption += "โžฅ **ั•ัƒั•ั‚ั”ะผั• ั•ั‚ฮฑั‚ั•**\n" pm_caption += "โžฅ **ั‚ั”โ„“ั”ั‚ะฝฯƒฮท ฮฝั”ัั•ฮนฯƒฮท:** `1.23.0` \n" @@ -31,11 +34,11 @@ async def _(event): await event.get_chat() await event.delete() - await Andencento.send_file(event.chat_id, PM_IMG, buttons=btn ,caption=pm_caption) + await Andencento.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) -@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) +@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) async def demploy(event): bottm = [[Button.url("Railway Deploy", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("Heroku Deploy", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] @@ -44,13 +47,13 @@ async def demploy(event): await event.edit(PM_IMG, caption="Welcome to Deployment Section", buttons=bottm) -@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"bamck"))) +@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"bamck"))) async def bamck(event): await event.edit(PM_IMG, caption=pm_caption, buttons=btn) -@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"stling"))) +@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"stling"))) async def stling(event): batan = [Button.url("Andencento String Session", "https://replit.com/@madboy482/Session-Andencento/")] batan += [Button.url("VC String Session", "https://replit.com/@dashezup/generate-pyrogram-session-string")] @@ -59,7 +62,7 @@ async def stling(event): await event.edit(PM_IMG, caption="Welcome to String Session Section ", buttons=batan) -@tgbot.on(events.callbackquery.CallbackQuery(data=re.compile(b"bomk"))) +@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"bomk"))) async def bamck(event): await event.edit(PM_IMG, caption=pm_caption, buttons=btn) From fbff19f6bbdf548053b7b5a12ccd82e06a427331 Mon Sep 17 00:00:00 2001 From: GodBoyX <77817462+GODBOYX@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:47:28 +0530 Subject: [PATCH 24/76] Update alive.py --- plugins/alive.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index f29d03b..8cc7387 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -4,6 +4,7 @@ import re import os from telethon import custom, Button, events +from userbot import bot, asst from . import * from userbot import YOUR_NAME as ALIVE_NAME @@ -24,45 +25,44 @@ pm_caption += f"โžฅ **ะผัƒ ะฒฯƒั•ั•** : {DEFAULTUSER} \n" pm_caption += f"โžฅ **โ„“ฮนยขั”ฮทั•ั”** : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" pm_caption += "โžฅ **ยขฯƒฯัƒัฮนgะฝั‚** : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" -btn = [custom.Button.inline("Deploy", data= "demploy")] -btn += [custom.Button.inline("String Session", data = "stling")] -btn += [Button.url("Repo", "https://github.com/Andencento/Andencento")] +btn = [custom.Button.inline("<>", data= "demploy")] +btn += [custom.Button.inline("<>", data = "stling")] +btn += [Button.url("<>", "https://github.com/Andencento/Andencento")] -# only Owner Can Use it -@Andencento.on(andencento_cmd(outgoing=True, pattern="alive$")) -@Andencento.on(sudo_cmd(pattern="alive$", allow_sudo=True)) + +@asst.on(events.NewMessage(outgoing=True, pattern=(".alive"))) async def _(event): await event.get_chat() await event.delete() - await Andencento.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) + await asst.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) -@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) +@asst.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) async def demploy(event): - bottm = [[Button.url("Railway Deploy", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("Heroku Deploy", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] + bottm = [[Button.url("", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] - bottm += [Button.url("VC Deploy", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] + bottm += [Button.url("", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] bottm += [custom.Button.inline("<", "https://replit.com/@madboy482/Session-Andencento/")] + batan += [Button.url("", "https://replit.com/@dashezup/generate-pyrogram-session-string")] batan += [custom.Button.inline("< Date: Fri, 6 Aug 2021 16:48:47 +0530 Subject: [PATCH 25/76] Update alive.py --- plugins/alive.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index 8cc7387..9693b6a 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -45,11 +45,11 @@ async def demploy(event): bottm += [Button.url("", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] bottm += [custom.Button.inline("<", "https://replit.com/@dashezup/generate-pyrogram-session-string")] batan += [custom.Button.inline("< Date: Fri, 6 Aug 2021 16:53:25 +0530 Subject: [PATCH 26/76] Update alive.py --- plugins/alive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/alive.py b/plugins/alive.py index 9693b6a..dd78c32 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -30,7 +30,7 @@ btn += [Button.url("<>", "https://github.com/Andencento/Andencento")] -@asst.on(events.NewMessage(outgoing=True, pattern=(".alive"))) +@asst.on(events.NewMessage(pattern=("/alive"))) async def _(event): await event.get_chat() await event.delete() From 6d65ed6b405d1ef69edd30e26cf5ad01b8d5b043 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 17:43:35 +0530 Subject: [PATCH 27/76] License is requirement --- LICENSE | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b63a4ff --- /dev/null +++ b/LICENSE @@ -0,0 +1,122 @@ +Creative Commons Legal Code +Copyright Team Andencento (C) 2021-2022 + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. From 178a81bf8de6addd8b61813b3257a0771fbd2c06 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 18:57:07 +0530 Subject: [PATCH 28/76] Vc Support --- README.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 67 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 606076b..41b78a3 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,76 @@ ## Deploy To Heroku [![Deploy To Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento) -## VC Deploy (Music) -- [![Deploy](https://www.herokucdn.com/deploy/button.svg)](http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc) - ## Andencento Session [![Andencento Session](https://repl.it/badge/github/Andencento/Andencento)](https://replit.com/@madboy482/Session-Andencento/) -## VC Session +# VC BOT +## Speical Note +###### Make Sure The Bot And The User Which Will Play Music Both Should Be Admin In Group or User Should be in group mandatory + +# Requirements +1. Telegram Api Id and Hash [ Get it from my.telegram.org ] +2. A Telegram Bot Token. Get it from @botfather. +3. Python 3.6+ +4. ffmpeg [ [How to Install ? ](https://linuxize.com/post/how-to-install-ffmpeg-on-ubuntu-18-04/) ] +5. [ Optional ] Mongo DB [ Create free account from mongo website and get your connection string. ] + +# Deploying To Heroku +1. Get your telegram API ID and API HASH from my.telegram.org and the BOT TOKEN from @botfather. +2. Generate your telegram session string using the `Run on Repl` button below (Click on run after opening the url below) or use the `generateSession.py` file. + - [![Run on Repl.it](https://repl.it/badge/github/Andencento/Andencentovcbot)](https://replit.com/@dashezup/generate-pyrogram-session-string) + + +3. Clcik on the `Deploy to Heroku` button below. Fill in the required fields on the website that opens. + +- [![Deploy](https://www.herokucdn.com/deploy/button.svg)](http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc) + +4. Add the bot to your group and send the [commands](https://github.com/Andencento/Andencento#features) to start using the VCPlayer Bot :) + + +# Steps To Setup +1. Install pyrogram for generatong session string : `pip3 install -U pyrogram` +2. Generate your telegram session string. Run `python3 generateSession.py` +3. Rename `.env copy` to `.env` and fill all the required/mandatory fields in there. +4. [ Optional ] In Mongo DB a database named `Andencento` will be created with the collections `tgcalls_chats` , `tgcalls_playbacks` , `tgcalls_users` ( if not present then create them manually). + +# Steps to Run +1. After the setup is done. +2. Install ffmpeg : `sudo apt-get install ffmpeg` +3. Install the requirements : `pip3 install -U -r requirements.txt` +4. Run the service by : + - Run `python3 main.py --help` for available settings. + - Or Run `python3 main.py -env prod` to use default settings + +# Environmental Variables + +Starting from command line: +- python3 main.py -env `prod|local` -mode `single|multiple` -autoleave `on|off` + +Available env varibales +- `Mandataory` **API_ID** : get it from my.telegram.org +- `Mandataory` **API_HASH** : get it from my.telegram.org +- `Mandataory` **BOT_TOKEN** : bot token of your music bot, get it from @botfather +- `Mandataory` **USERBOT_SESSION** : user bot pyrogram session string, generate it using the `generateSession.py` file present in the root directory of repo. +- `Optional` **MONGO_URL** : connection url for mongo databse. needed if you wnat to run the service in single mode +- `Optional` **MODE** : _single|multiple_ single mode means bot will be allowed only in one group, multiple means allowed in multiple groups. It is `multiple` by default. If you want to run in single mode then `MONGO_URL` is must. +- `Optional` **AUTO_LEAVE** : _on|off_ turning this on will make the user bot to leave the grp automatically at regular intervals. It is `off` by default. + +# Features +Command | Description +------------ | ------------- +/start , /help | Lists the available commands. +/play song_name | Starts the song in the voice chat. +/skip | Skips the current song. +/stop | Stops the playback. +/loop off , /loop [2-5] | Loops the song to x times. +/info | Shows the info of the playback in the chat. +/refreshadmins | Refreshes the admin list in the chat. +/auth | Adds the user mentioned in the reply to bot admin list. +/unauth | Removes the user mentioned in the reply from bot admin list. +/listadmins | Lists all the bot admins. +/adminmode [on,off] | Turn on/off the admin mode. + From 3d804e0b98cac191c63effb98b98ace3ad8eb79b Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 19:00:55 +0530 Subject: [PATCH 29/76] NOw Done --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 41b78a3..c624803 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,13 @@ ### โ€ข InternetAmethyst ยปยป ### โ€ข GODBOYX ยปยป ### โ€ข InukaAsith ยปยป -## SOME INFO + + +# [USERBOT](https://github.com/Andencento/Andencento#USERBOT) + +# [VCBOT](https://github.com/Andencento/Andencento#features) + +## USERBOT [![Stars](https://img.shields.io/github/stars/Andencento/Andencento?style=flat-square&color=yellow)](https://github.com/Andencento/Andencento/stargazers) [![Forks](https://img.shields.io/github/forks/Andencento/Andencento?style=flat-square&color=orange)](https://github.com/Andencento/Andencento/fork) [![Size](https://img.shields.io/github/repo-size/Andencento/Andencento?style=flat-square&color=green)](https://github.com/Andencento/Andencento) From 079a08b06af389bdbddedf3f8f6721055e4c9516 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 19:02:21 +0530 Subject: [PATCH 30/76] Now Ok --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c624803..b8ff784 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ ### โ€ข InukaAsith ยปยป -# [USERBOT](https://github.com/Andencento/Andencento#USERBOT) +# [USERBOT](https://github.com/Andencento/Andencento#USERBOT) Userbot Info -# [VCBOT](https://github.com/Andencento/Andencento#features) +# [VCBOT](https://github.com/Andencento/Andencento#features) VC Bot Info ## USERBOT [![Stars](https://img.shields.io/github/stars/Andencento/Andencento?style=flat-square&color=yellow)](https://github.com/Andencento/Andencento/stargazers) From 27c142f99e06a01174d2d609c2577bed9dee8d21 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Fri, 6 Aug 2021 20:02:44 +0530 Subject: [PATCH 31/76] Sudo Restricted added in admin group actions --- plugins/banall.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/banall.py b/plugins/banall.py index 4cbead1..a3b24b7 100644 --- a/plugins/banall.py +++ b/plugins/banall.py @@ -23,9 +23,14 @@ embed_links=True, ) - -@Andencento.on(andencento_cmd(pattern=r"kickall ?(.*)")) @Andencento.on(sudo_cmd(pattern=r"kickall ?(.*)", allow_sudo=True)) +@Andencento.on(sudo_cmd(pattern=r"banall ?(.*)", allow_sudo=True)) +@Andencento.on(sudo_cmd(pattern=r"unbanall ?(.*)", allow_sudo=True)) +@Andencento.on(sudo_cmd(pattern="ikuck ?(.*)", allow_sudo=True)) +async def _(event): + Andencento.send_message(event, "Sudo Restricted Command Sur!!") + +@Andencento.on(andencento_cmd(pattern=r"kickall ?(.*)")) async def _(event): result = await event.client( functions.channels.GetParticipantRequest(event.chat_id, event.client.uid) @@ -57,7 +62,6 @@ async def _(event): @Andencento.on(andencento_cmd(pattern=r"banall ?(.*)")) -@Andencento.on(sudo_cmd(pattern=r"banall ?(.*)", allow_sudo=True)) async def _(event): result = await event.client( functions.channels.GetParticipantRequest(event.chat_id, event.client.uid) @@ -91,7 +95,6 @@ async def _(event): @Andencento.on(andencento_cmd(pattern=r"unbanall ?(.*)")) -@Andencento.on(sudo_cmd(pattern=r"unbanall ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return @@ -122,7 +125,6 @@ async def _(event): @Andencento.on(andencento_cmd(pattern="ikuck ?(.*)")) -@Andencento.on(sudo_cmd(pattern="ikuck ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return From 4c11340d2838c86587af56a3e329e21d2aafe7e6 Mon Sep 17 00:00:00 2001 From: PATRICIA <87294373+TEAM-PATRICIA@users.noreply.github.com> Date: Fri, 6 Aug 2021 21:18:53 +0530 Subject: [PATCH 32/76] Update alive.py --- plugins/alive.py | 67 +++++++++++++++++++----------------------------- 1 file changed, 26 insertions(+), 41 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index dd78c32..e3688fc 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -3,66 +3,51 @@ """ import re import os + from telethon import custom, Button, events -from userbot import bot, asst from . import * from userbot import YOUR_NAME as ALIVE_NAME ver = "0.2" - -DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Unknown" -PM_IMG = ( - os.environ.get("ALIVE_PIC", None) - or "https://telegra.ph/file/3d208ecf6d0ea9389d8f8.jpg" -) -pm_caption = "โžฅ **ฮฑฮทโˆ‚ั”ฮทยขั”ฮทั‚ฯƒ:** `ONLINE`\n\n" -pm_caption += "โžฅ **ั•ัƒั•ั‚ั”ะผั• ั•ั‚ฮฑั‚ั•**\n" -pm_caption += "โžฅ **ั‚ั”โ„“ั”ั‚ะฝฯƒฮท ฮฝั”ัั•ฮนฯƒฮท:** `1.23.0` \n" -pm_caption += "โžฅ **ฯัƒั‚ะฝฯƒฮท:** `3.9.6` \n" -pm_caption += "โžฅ **โˆ‚ฮฑั‚ฮฑะฒฮฑั•ั” ั•ั‚ฮฑั‚ฯ…ั•:** `Functional`\n" -pm_caption += "โžฅ **ยขฯ…ััั”ฮทั‚ ะฒัฮฑฮทยขะฝ** : `Andencento`\n" -pm_caption += f"โžฅ **ฮฝั”ัั•ฮนฯƒฮท** : `{ver}`\n" +@@ -19,12 +24,45 @@ pm_caption += f"โžฅ **ะผัƒ ะฒฯƒั•ั•** : {DEFAULTUSER} \n" pm_caption += f"โžฅ **โ„“ฮนยขั”ฮทั•ั”** : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" pm_caption += "โžฅ **ยขฯƒฯัƒัฮนgะฝั‚** : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" -btn = [custom.Button.inline("<>", data= "demploy")] -btn += [custom.Button.inline("<>", data = "stling")] -btn += [Button.url("<>", "https://github.com/Andencento/Andencento")] - -@asst.on(events.NewMessage(pattern=("/alive"))) +# only Owner Can Use it +@Andencento.on(andencento_cmd(outgoing=True, pattern="alive$")) +@Andencento.on(sudo_cmd(pattern="alive$", allow_sudo=True)) async def _(event): await event.get_chat() await event.delete() - await asst.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) + await Andencento.send_file(event.chat_id, PM_IMG, caption=pm_caption) -@asst.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) +@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) async def demploy(event): - bottm = [[Button.url("", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] + bottm = [[Button.url("Railway Deploy", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("Heroku Deploy", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] - bottm += [Button.url("", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] + bottm += [Button.url("VC Deploy", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] bottm += [custom.Button.inline("<", "https://replit.com/@madboy482/Session-Andencento/")] - batan += [Button.url("", "https://replit.com/@dashezup/generate-pyrogram-session-string")] + batan = [Button.url("Andencento String Session", "https://replit.com/@madboy482/Session-Andencento/")] + batan += [Button.url("VC String Session", "https://replit.com/@dashezup/generate-pyrogram-session-string")] batan += [custom.Button.inline("< Date: Fri, 6 Aug 2021 21:20:34 +0530 Subject: [PATCH 33/76] Update alive.py --- plugins/alive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/alive.py b/plugins/alive.py index e3688fc..6c1a11a 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -9,7 +9,7 @@ from userbot import YOUR_NAME as ALIVE_NAME ver = "0.2" -@@ -19,12 +24,45 @@ + pm_caption += f"โžฅ **ะผัƒ ะฒฯƒั•ั•** : {DEFAULTUSER} \n" pm_caption += f"โžฅ **โ„“ฮนยขั”ฮทั•ั”** : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" pm_caption += "โžฅ **ยขฯƒฯัƒัฮนgะฝั‚** : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" From 924aa93dea0a31fd856d950d1e16a801afe67db1 Mon Sep 17 00:00:00 2001 From: PATRICIA <87294373+TEAM-PATRICIA@users.noreply.github.com> Date: Fri, 6 Aug 2021 21:23:14 +0530 Subject: [PATCH 34/76] Update alive.py --- plugins/alive.py | 78 ++++++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index 6c1a11a..d81a51d 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -3,51 +3,65 @@ """ import re import os - from telethon import custom, Button, events +from userbot import bot, asst from . import * from userbot import YOUR_NAME as ALIVE_NAME ver = "0.2" -pm_caption += f"โžฅ **ะผัƒ ะฒฯƒั•ั•** : {DEFAULTUSER} \n" -pm_caption += f"โžฅ **โ„“ฮนยขั”ฮทั•ั”** : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" -pm_caption += "โžฅ **ยขฯƒฯัƒัฮนgะฝั‚** : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" - -# only Owner Can Use it -@Andencento.on(andencento_cmd(outgoing=True, pattern="alive$")) -@Andencento.on(sudo_cmd(pattern="alive$", allow_sudo=True)) +DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Unknown" +PM_IMG = ( + os.environ.get("ALIVE_PIC", None) + or "https://telegra.ph/file/3d208ecf6d0ea9389d8f8.jpg" +) +pm_caption = "โžฅ ฮฑฮทโˆ‚ั”ฮทยขั”ฮทั‚ฯƒ: ONLINE\n\n" +pm_caption += "โžฅ ั•ัƒั•ั‚ั”ะผั• ั•ั‚ฮฑั‚ั•\n" +pm_caption += "โžฅ ั‚ั”โ„“ั”ั‚ะฝฯƒฮท ฮฝั”ัั•ฮนฯƒฮท: 1.23.0 \n" +pm_caption += "โžฅ ฯัƒั‚ะฝฯƒฮท: 3.9.6 \n" +pm_caption += "โžฅ โˆ‚ฮฑั‚ฮฑะฒฮฑั•ั” ั•ั‚ฮฑั‚ฯ…ั•: Functional\n" +pm_caption += "โžฅ ยขฯ…ััั”ฮทั‚ ะฒัฮฑฮทยขะฝ : Andencento\n" +pm_caption += f"โžฅ ฮฝั”ัั•ฮนฯƒฮท : {ver}\n" +pm_caption += f"โžฅ ะผัƒ ะฒฯƒั•ั• : {DEFAULTUSER} \n" +pm_caption += f"โžฅ โ„“ฮนยขั”ฮทั•ั” : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" +pm_caption += "โžฅ ยขฯƒฯัƒัฮนgะฝั‚ : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" +btn = [custom.Button.inline("<>", data= "demploy")] +btn += [custom.Button.inline("<>", data = "stling")] +btn += [Button.url("<>", "https://github.com/Andencento/Andencento")] + + +@asst.on(events.NewMessage(pattern=("/alive"))) async def _(event): await event.get_chat() await event.delete() - await Andencento.send_file(event.chat_id, PM_IMG, caption=pm_caption) + await asst.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) -@Andencento.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) +@asst.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) async def demploy(event): - bottm = [[Button.url("Railway Deploy", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("Heroku Deploy", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] - - bottm += [Button.url("VC Deploy", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] - bottm += [custom.Button.inline("<", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] + + bottm += [Button.url("", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] + bottm += [custom.Button.inline("<", "https://replit.com/@madboy482/Session-Andencento/")] + batan += [Button.url("", "https://replit.com/@dashezup/generate-pyrogram-session-string")] + batan += [custom.Button.inline("< Date: Sat, 7 Aug 2021 08:17:03 +0530 Subject: [PATCH 35/76] Fixed Sar' --- assistant/main_assistant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assistant/main_assistant.py b/assistant/main_assistant.py index 5b4a347..adf9832 100644 --- a/assistant/main_assistant.py +++ b/assistant/main_assistant.py @@ -66,7 +66,7 @@ async def start(event): buttons=[ [ custom.Button.url( - "Dแด‡แด˜สŸแดส Yแดแดœส€ Oแดกษด แด…แด€ษชsสX", + "Dแด‡แด˜สŸแดส Yแดแดœส€ Oแดกษด Andencento", "https://github.com/Andencento/Andencento", ) ], From b8fa8c6ff54ec053b8a54885e6432b0326e91fb4 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Sat, 7 Aug 2021 08:49:25 +0530 Subject: [PATCH 36/76] kk --- assistant/alive.py | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 assistant/alive.py diff --git a/assistant/alive.py b/assistant/alive.py new file mode 100644 index 0000000..e4e8952 --- /dev/null +++ b/assistant/alive.py @@ -0,0 +1,68 @@ + +""" +Made by GODBOYX +""" +import re +import os +from telethon import custom, Button, events +from userbot import bot, asst +from . import * +from userbot import YOUR_NAME as ALIVE_NAME + +ver = "0.2" + +DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Unknown" +PM_IMG = ( + os.environ.get("ALIVE_PIC", None) + or "https://telegra.ph/file/3d208ecf6d0ea9389d8f8.jpg" +) +pm_caption = "โžฅ ฮฑฮทโˆ‚ั”ฮทยขั”ฮทั‚ฯƒ: ONLINE\n\n" +pm_caption += "โžฅ ั•ัƒั•ั‚ั”ะผั• ั•ั‚ฮฑั‚ั•\n" +pm_caption += "โžฅ ั‚ั”โ„“ั”ั‚ะฝฯƒฮท ฮฝั”ัั•ฮนฯƒฮท: 1.23.0 \n" +pm_caption += "โžฅ ฯัƒั‚ะฝฯƒฮท: 3.9.6 \n" +pm_caption += "โžฅ โˆ‚ฮฑั‚ฮฑะฒฮฑั•ั” ั•ั‚ฮฑั‚ฯ…ั•: Functional\n" +pm_caption += "โžฅ ยขฯ…ััั”ฮทั‚ ะฒัฮฑฮทยขะฝ : Andencento\n" +pm_caption += f"โžฅ ฮฝั”ัั•ฮนฯƒฮท : {ver}\n" +pm_caption += f"โžฅ ะผัƒ ะฒฯƒั•ั• : {DEFAULTUSER} \n" +pm_caption += f"โžฅ โ„“ฮนยขั”ฮทั•ั” : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" +pm_caption += "โžฅ ยขฯƒฯัƒัฮนgะฝั‚ : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" +btn = [custom.Button.inline("<>", data= "demploy")] +btn += [custom.Button.inline("<>", data = "stling")] +btn += [Button.url("<>", "https://github.com/Andencento/Andencento")] + + +@asst.on(events.NewMessage(pattern=("/alive"))) +async def _(event): + await event.get_chat() + await event.delete() + await asst.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) + + + +@asst.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) +async def demploy(event): + bottm = [[Button.url("", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] + + bottm += [Button.url("", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] + bottm += [custom.Button.inline("<", "https://replit.com/@madboy482/Session-Andencento/")] + batan += [Button.url("", "https://replit.com/@dashezup/generate-pyrogram-session-string")] + batan += [custom.Button.inline("< Date: Sat, 7 Aug 2021 08:49:48 +0530 Subject: [PATCH 37/76] KK --- assistant/__init__.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 assistant/__init__.py diff --git a/assistant/__init__.py b/assistant/__init__.py new file mode 100644 index 0000000..ff3508e --- /dev/null +++ b/assistant/__init__.py @@ -0,0 +1 @@ +from plugins import * From 0775ddae1e0d722319fcae93ec77352729a69ae7 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Sat, 7 Aug 2021 08:52:44 +0530 Subject: [PATCH 38/76] =?UTF-8?q?=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index 6ccb082..df2ecc0 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -8,7 +8,7 @@ from userbot.helpers import * from userbot.random_strings import * from userbot.utils import * -from var import Config, Var +from userbot.var import Config, Var from userbot.config import Config bot = Andencento uptime = "dekhna jaruri hai kya" From 0ea3d79956db01e40cba8c2d9228412a232a0952 Mon Sep 17 00:00:00 2001 From: PATRICIA <87294373+TEAM-PATRICIA@users.noreply.github.com> Date: Sat, 7 Aug 2021 09:29:46 +0530 Subject: [PATCH 39/76] Update main_assistant.py --- assistant/main_assistant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assistant/main_assistant.py b/assistant/main_assistant.py index adf9832..11fbcb8 100644 --- a/assistant/main_assistant.py +++ b/assistant/main_assistant.py @@ -66,7 +66,7 @@ async def start(event): buttons=[ [ custom.Button.url( - "Dแด‡แด˜สŸแดส Yแดแดœส€ Oแดกษด Andencento", + "Dแด‡แด˜สŸแดส Yแดแดœส€ Oแดกษด Aษดแด…แด‡ษดแด„แด‡ษดแด›แด", "https://github.com/Andencento/Andencento", ) ], From e1e99162b4f6bf87196077dd9647f5293a14343e Mon Sep 17 00:00:00 2001 From: GodBoyX <77817462+GODBOYX@users.noreply.github.com> Date: Sat, 7 Aug 2021 12:22:55 +0530 Subject: [PATCH 40/76] Update alive.py --- plugins/alive.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index d81a51d..2778e26 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -25,9 +25,9 @@ pm_caption += f"โžฅ ะผัƒ ะฒฯƒั•ั• : {DEFAULTUSER} \n" pm_caption += f"โžฅ โ„“ฮนยขั”ฮทั•ั” : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" pm_caption += "โžฅ ยขฯƒฯัƒัฮนgะฝั‚ : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" -btn = [custom.Button.inline("<>", data= "demploy")] -btn += [custom.Button.inline("<>", data = "stling")] -btn += [Button.url("<>", "https://github.com/Andencento/Andencento")] +btn = [[custom.Button.inline("<>", data= "demploy")]] +btn += [[custom.Button.inline("<>", data = "stling")]] +btn += [[Button.url("<>", "https://github.com/Andencento/Andencento")]] @asst.on(events.NewMessage(pattern=("/alive"))) @@ -42,8 +42,8 @@ async def _(event): async def demploy(event): bottm = [[Button.url("", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] - bottm += [Button.url("", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] - bottm += [custom.Button.inline("<", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")]] + bottm += [[custom.Button.inline("<", "https://replit.com/@madboy482/Session-Andencento/")] - batan += [Button.url("", "https://replit.com/@dashezup/generate-pyrogram-session-string")] - batan += [custom.Button.inline("<", "https://replit.com/@madboy482/Session-Andencento/")]] + batan += [[Button.url("", "https://replit.com/@dashezup/generate-pyrogram-session-string")]] + batan += [[custom.Button.inline("< Date: Sun, 8 Aug 2021 15:15:27 +0530 Subject: [PATCH 41/76] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8ff784..a763c9b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ # VC BOT -## Speical Note +## Special Note ###### Make Sure The Bot And The User Which Will Play Music Both Should Be Admin In Group or User Should be in group mandatory # Requirements From 586dd35a6103cbab30760a491bc9638a1f31e76e Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Mon, 9 Aug 2021 20:20:21 +0530 Subject: [PATCH 42/76] gitpod --- .gitpod.Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .gitpod.Dockerfile diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000..5c55ef3 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,9 @@ +FROM python:latest #Published +RUN apt-get update && apt-get upgrade -y +RUN apt-get install -y ffmpeg python3-pip opus-tools +RUN git clone https://github.com/Andencento/Andencento.git /root/Andencento +WORKDIR /root/Andencento +ENV PYTHONUNBUFFERED=1 +COPY . . +RUN pip install -r requirements.txt +CMD ["python3","-m","userbot"] From 59be4d78b8fb8824399c6c56a5bb0bff6ee82cd5 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Mon, 9 Aug 2021 20:22:43 +0530 Subject: [PATCH 43/76] K --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 5c55ef3..52cd909 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,4 +1,4 @@ -FROM python:latest #Published +FROM python:latest RUN apt-get update && apt-get upgrade -y RUN apt-get install -y ffmpeg python3-pip opus-tools RUN git clone https://github.com/Andencento/Andencento.git /root/Andencento From 1258e05b6c2ff01a3f6be7d22564ab02a475b1a2 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Mon, 9 Aug 2021 20:24:00 +0530 Subject: [PATCH 44/76] git --- .gitpod.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..b08f4c1 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,13 @@ + +image: + file: .gitpod.Dockerfile + +# List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/ +ports: + - port: 8080 + onOpen: notify + +# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/ +tasks: + - init: pip3 install -r requirements.txt + command: python3 userbot From 8f109eacfe70735f0019dc8f801b473ceb203bd3 Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Tue, 10 Aug 2021 18:41:24 +0530 Subject: [PATCH 45/76] Done --- plugins/alive.py | 71 ++++++++++++------------------------------------ 1 file changed, 17 insertions(+), 54 deletions(-) diff --git a/plugins/alive.py b/plugins/alive.py index 2778e26..45b3049 100644 --- a/plugins/alive.py +++ b/plugins/alive.py @@ -1,11 +1,5 @@ -""" -Made by GODBOYX -""" -import re import os -from telethon import custom, Button, events -from userbot import bot, asst -from . import * + from userbot import YOUR_NAME as ALIVE_NAME ver = "0.2" @@ -15,53 +9,22 @@ os.environ.get("ALIVE_PIC", None) or "https://telegra.ph/file/3d208ecf6d0ea9389d8f8.jpg" ) -pm_caption = "โžฅ ฮฑฮทโˆ‚ั”ฮทยขั”ฮทั‚ฯƒ: ONLINE\n\n" -pm_caption += "โžฅ ั•ัƒั•ั‚ั”ะผั• ั•ั‚ฮฑั‚ั•\n" -pm_caption += "โžฅ ั‚ั”โ„“ั”ั‚ะฝฯƒฮท ฮฝั”ัั•ฮนฯƒฮท: 1.23.0 \n" -pm_caption += "โžฅ ฯัƒั‚ะฝฯƒฮท: 3.9.6 \n" -pm_caption += "โžฅ โˆ‚ฮฑั‚ฮฑะฒฮฑั•ั” ั•ั‚ฮฑั‚ฯ…ั•: Functional\n" -pm_caption += "โžฅ ยขฯ…ััั”ฮทั‚ ะฒัฮฑฮทยขะฝ : Andencento\n" -pm_caption += f"โžฅ ฮฝั”ัั•ฮนฯƒฮท : {ver}\n" -pm_caption += f"โžฅ ะผัƒ ะฒฯƒั•ั• : {DEFAULTUSER} \n" -pm_caption += f"โžฅ โ„“ฮนยขั”ฮทั•ั” : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" -pm_caption += "โžฅ ยขฯƒฯัƒัฮนgะฝั‚ : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" -btn = [[custom.Button.inline("<>", data= "demploy")]] -btn += [[custom.Button.inline("<>", data = "stling")]] -btn += [[Button.url("<>", "https://github.com/Andencento/Andencento")]] - - -@asst.on(events.NewMessage(pattern=("/alive"))) +pm_caption = "โžฅ **ฮฑฮทโˆ‚ั”ฮทยขั”ฮทั‚ฯƒ:** `ONLINE`\n\n" +pm_caption += "โžฅ **ั•ัƒั•ั‚ั”ะผั• ั•ั‚ฮฑั‚ั•**\n" +pm_caption += "โžฅ **ั‚ั”โ„“ั”ั‚ะฝฯƒฮท ฮฝั”ัั•ฮนฯƒฮท:** `1.23.0` \n" +pm_caption += "โžฅ **ฯัƒั‚ะฝฯƒฮท:** `3.9.6` \n" +pm_caption += "โžฅ **โˆ‚ฮฑั‚ฮฑะฒฮฑั•ั” ั•ั‚ฮฑั‚ฯ…ั•:** `Functional`\n" +pm_caption += "โžฅ **ยขฯ…ััั”ฮทั‚ ะฒัฮฑฮทยขะฝ** : `Andencento`\n" +pm_caption += f"โžฅ **ฮฝั”ัั•ฮนฯƒฮท** : `{ver}`\n" +pm_caption += f"โžฅ **ะผัƒ ะฒฯƒั•ั•** : {DEFAULTUSER} \n" +pm_caption += f"โžฅ **โ„“ฮนยขั”ฮทั•ั”** : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" +pm_caption += "โžฅ **ยขฯƒฯัƒัฮนgะฝั‚** : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" + + +# only Owner Can Use it +@Andencento.on(andencento_cmd(outgoing=True, pattern="alive$")) +@Andencento.on(sudo_cmd(pattern="alive$", allow_sudo=True)) async def _(event): await event.get_chat() await event.delete() - await asst.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) - - - -@asst.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) -async def demploy(event): - bottm = [[Button.url("", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] - - bottm += [[Button.url("", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")]] - bottm += [[custom.Button.inline("<", "https://replit.com/@madboy482/Session-Andencento/")]] - batan += [[Button.url("", "https://replit.com/@dashezup/generate-pyrogram-session-string")]] - batan += [[custom.Button.inline("< Date: Wed, 11 Aug 2021 20:38:08 +0530 Subject: [PATCH 46/76] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a763c9b..e41f94b 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ ### โ€ข InukaAsith ยปยป -# [USERBOT](https://github.com/Andencento/Andencento#USERBOT) Userbot Info +## [USERBOT](https://github.com/Andencento/Andencento#USERBOT) Userbot Info -# [VCBOT](https://github.com/Andencento/Andencento#features) VC Bot Info +## [VCBOT](https://github.com/Andencento/Andencento#features) VC Bot Info ## USERBOT [![Stars](https://img.shields.io/github/stars/Andencento/Andencento?style=flat-square&color=yellow)](https://github.com/Andencento/Andencento/stargazers) From 8e97b1ac9b7365ea034fdba1da3cd623a5fe704c Mon Sep 17 00:00:00 2001 From: GodBoyX <77817462+GODBOYX@users.noreply.github.com> Date: Wed, 11 Aug 2021 20:38:29 +0530 Subject: [PATCH 47/76] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e41f94b..1723338 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Andencento -# A STABLE USERBOT BASED ON TELETHON +## A STABLE USERBOT BASED ON TELETHON # DEVS ### โ€ข NOOB-STRANGER ยปยป ### โ€ข MADBOY ยปยป From dfe4fae53cbbac7e036b4c296be87261c142704c Mon Sep 17 00:00:00 2001 From: InterAnylastics <72003733+InternetAmethyst@users.noreply.github.com> Date: Wed, 11 Aug 2021 21:27:54 +0530 Subject: [PATCH 48/76] Core --- plugins/_core.py | 136 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 plugins/_core.py diff --git a/plugins/_core.py b/plugins/_core.py new file mode 100644 index 0000000..52631c3 --- /dev/null +++ b/plugins/_core.py @@ -0,0 +1,136 @@ +import asyncio +from datetime import datetime +import io +import os +from pathlib import Path + +from telethon import events, functions, types +from telethon.tl.types import InputMessagesFilterDocument + +from . import * +andencento_logo = "https://telegra.ph/file/c70894d968a5823d04f0e.png" +Andencento_logo = andencento_logo + +@bot.on(andencento_cmd(pattern=r"cmds")) +@bot.on(sudo_cmd(pattern=r"cmds", allow_sudo=True)) +async def kk(event): + if event.fwd_from: + return + reply_to_id = event.message.id + if event.reply_to_msg_id: + reply_to_id = event.reply_to_msg_id + cmd = "ls plugins" + process = await asyncio.create_subprocess_sandencento( + cmd, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE + ) + stdout, stderr = await process.communicate() + o = stdout.decode() + _o = o.split("\n") + o = "\n".join(_o) + OUTPUT = f"List of Plugins in bot :- \n\n{o}\n\n<><><><><><><><><><><><><><><><><><><><><><><><>\nHELP:- If you want to know the commands for a plugin, do :- \n.plinfo without the < > brackets. \nJoin {Eiva_grp} for help." + if len(OUTPUT) > 69: + thumb = andencento_logo + with io.BytesIO(str.encode(OUTPUT)) as out_file: + out_file.name = "cmd_list.text" + andencento_file = await bot.send_file( + event.chat_id, + out_file, + force_document=True, + allow_cache=False, + thumb=thumb, + reply_to=reply_to_id, + ) + await edit_or_reply(andencento_file, f"Output Too Large. This is the file for the list of plugins in bot.\n\n**BY :-** {Andencento_USER}") + await event.delete() + + +@bot.on(andencento_cmd(pattern=r"send (?P\w+)", outgoing=True)) +@bot.on(sudo_cmd(pattern=r"send (?P\w+)", allow_sudo=True)) +async def send(event): + if event.fwd_from: + return + message_id = event.message.id + input_str = event.pattern_match.group(1) + omk = f"**โ€ข Plugin name โ‰ˆ** `{input_str}`\n**โ€ข Uploaded by โ‰ˆ** {Andencento_mention}\n\nโšก **[ษ›ษขษ›ีผษ–ฮฑส€ส แด€า“ Andencento]({chnl_link})** โšก" + the_plugin_file = "./plugins/{}.py".format(input_str) + if os.path.exists(the_plugin_file): + thumb = Andencento_logo + lauda = await event.client.send_file( + event.chat_id, + the_plugin_file, + thumb=thumb, + caption=omk, + force_document=True, + allow_cache=False, + reply_to=message_id, + ) + await event.delete() + else: + await eod(event, "File not found..... Kek") + + +@bot.on(andencento_cmd(pattern=r"remove (?P\w+)", outgoing=True)) +@bot.on(sudo_cmd(pattern=r"remove (?P\w+)", allow_sudo=True)) +async def uninstall(kraken): + if kraken.fwd_from: + return + shortname = kraken.pattern_match["shortname"] + dir_path =f"./plugins/{shortname}.py" + try: + remove_plugin(shortname) + os.remove(dir_path) + await eod(kraken, f"removed `{shortname}` successfully") + except OSError as e: + await kraken.edit("Error: %s : %s" % (dir_path, e.strerror)) + + +@bot.on(andencento_cmd(pattern=r"unload (?P\w+)$")) +@bot.on(sudo_cmd(pattern=r"unload (?P\w+)$", allow_sudo=True)) +async def unload(event): + if event.fwd_from: + return + shortname = event.pattern_match["shortname"] + try: + remove_plugin(shortname) + await event.edit(f"Successfully unloaded `{shortname}`") + except Exception as e: + await event.edit( + "Successfully unloaded {shortname}\n{}".format( + shortname, str(e) + ) + ) + + +@bot.on(andencento_cmd(pattern=r"load (?P\w+)$")) +@bot.on(sudo_cmd(pattern=r"load (?P\w+)$", allow_sudo=True)) +async def load(event): + if event.fwd_from: + return + shortname = event.pattern_match["shortname"] + try: + try: + remove_plugin(shortname) + except BaseException: + pass + load_module(shortname) + await event.edit(f"Successfully loaded `{shortname}`") + except Exception as e: + await event.edit( + f"Sorry, could not load {shortname} because of the following error.\n{str(e)}" + ) + +CmdHelp("core").add_command( + "install", "", "Installs the replied python file if suitable to Andencento's codes." +).add_command( + "remove", "", "Uninstalls the given plugin from ั”ฮนฮฝฮฑฯฮฟฯ„. To get that again do .restart", "uninstall alive" +).add_command( + "load", "", "Loades the unloaded plugin to your userbot", "load alive" +).add_command( + "unload", "", "Unloads the plugin from your userbot", "unload alive" +).add_command( + "send", "", "Sends the given file from your userbot server, if any.", "send alive" +).add_command( + "cmds", None, "Gives out the list of modules in AndencentoBot." +).add_warning( + "โŒ Install External Plugin On Your Own Risk. We won't help if anything goes wrong after installing a plugin." +).add() From 2657cea350bda2b2f48c44c47cdcc45a78164345 Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:10:10 +0530 Subject: [PATCH 49/76] K --- Dockerfile | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6fd2ea0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,68 @@ + +FROM kalilinux/kali-rolling + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt upgrade -y && apt-get install sudo -y + +RUN apt-get install -y\ + coreutils \ + bash \ + nodejs \ + bzip2 \ + curl \ + figlet \ + gcc \ + g++ \ + git \ + util-linux \ + libevent-dev \ + libjpeg-dev \ + libffi-dev \ + libpq-dev \ + libwebp-dev \ + libxml2 \ + libxml2-dev \ + libxslt-dev \ + musl \ + neofetch \ + libcurl4-openssl-dev \ + postgresql \ + postgresql-client \ + postgresql-server-dev-all \ + openssl \ + mediainfo \ + wget \ + python3 \ + python3-dev \ + python3-pip \ + libreadline-dev \ + zipalign \ + sqlite3 \ + ffmpeg \ + libsqlite3-dev \ + zlib1g-dev \ + recoverjpeg \ + zip \ + unrar \ + megatools \ + libfreetype6-dev \ + procps \ + policykit-1 \ + p7zip-full \ + tree + +RUN apt-get autoremove --purge + +RUN pip3 install --upgrade pip setuptools +RUN if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi +RUN if [ ! -e /usr/bin/python ]; then ln -sf /usr/bin/python3 /usr/bin/python; fi +RUN rm -r /root/.cache +RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && apt install -y ./google-chrome-stable_current_amd64.deb && rm google-chrome-stable_current_amd64.deb +RUN wget https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip && unzip chromedriver_linux64.zip && chmod +x chromedriver && mv -f chromedriver /usr/bin/ && rm chromedriver_linux64.zip +RUN git clone https://github.com/Andencento/Andencento /root/Andencento +RUN mkdir /root/Andencento/bin/ +WORKDIR /root/Andencento/ +RUN chmod +x /usr/local/bin/* +RUN pip3 install -r requirements.txt +CMD ["bash","./startup.sh"] From bf8bb2db382de86a465e4523381cb5a137b3b535 Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:11:58 +0530 Subject: [PATCH 50/76] Apt --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6fd2ea0..b27d7e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ FROM kalilinux/kali-rolling ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt upgrade -y && apt-get install sudo -y +RUN apt-get install -y ffmpeg python3-pip RUN apt-get install -y\ coreutils \ From 8a7490212788194b594e5adc7dbd157b4841e2f2 Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:12:25 +0530 Subject: [PATCH 51/76] Requirements --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ea2e602..14f1da6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -Andencento Pillow>=5.3.0 PyGithub Wand From df7eaff5f5871e577872ce729a33dbefba7cc866 Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:13:06 +0530 Subject: [PATCH 52/76] Dockerised heroku Support --- heroku.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heroku.yml b/heroku.yml index 09b09fc..7b13190 100644 --- a/heroku.yml +++ b/heroku.yml @@ -1,3 +1,3 @@ -build: +build: docker: - worker: Dockerfile + worker: Dockerfile From 7463988142a5121699be15e36c8db235bb43828c Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:14:06 +0530 Subject: [PATCH 53/76] Procfile --- Procfile | 1 + 1 file changed, 1 insertion(+) create mode 100644 Procfile diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..d3e0dff --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +Andencento: bash startup.sh From aee13ef13963c6eaeeb1ac6cf9ede428d12eb48b Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:14:49 +0530 Subject: [PATCH 54/76] Start --- startup.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 startup.sh diff --git a/startup.sh b/startup.sh new file mode 100644 index 0000000..f17a3a0 --- /dev/null +++ b/startup.sh @@ -0,0 +1 @@ +python3 -m userbot From 68c37d784a958d486007e725d2c2cbd62cf030df Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:15:05 +0530 Subject: [PATCH 55/76] F --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 14f1da6..c32ac32 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ PyGithub Wand pygifsicle PyDictionary +Andencento PyPDF2 google-auth-httplib2 telethon-tgcrypto From af1d75904b7d4af2889504400b79abc21d649bab Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:17:48 +0530 Subject: [PATCH 56/76] app.json --- app.json | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 app.json diff --git a/app.json b/app.json new file mode 100644 index 0000000..5b2cfaf --- /dev/null +++ b/app.json @@ -0,0 +1,125 @@ +{ + "name": "Aษดแด…แด‡ษดแด„แด‡ษดแด›แด Usแด‡ส€Bแดแด›", + "description": "Aษดแด…แด‡ษดแด„แด‡ษดแด›แด Usแด‡ส€Bแดแด› is one of the Best UserBot for Telegram. Known for its Smoothness, Design, Support.", + "logo": "https://telegra.ph/file/99939edc0f7ac640ab688.png ", + "keywords": [ + "telegram", + "userbot", + "plugin", + "telethon", + "ANDENCENTO", + "modular", + "productivity" + ], + "repository": "https://github.com/Andencento/Andencento/", + "website": "https://github.com/Andencento/Andencento/", + "success_url": "https://github.com/Andencento/Andencento/", + "stack": "container", + "env": { + "ENV": { + "description": "Setting this to ANYTHING will enable heroku.", + "value": "ANYTHING" + }, + "YOUR_NAME": { + "description": "Fill Any name it is working as ALIVE_NAME. Default Value is None", + "value": "", + "required": true + }, + "TZ": { + "description": "Time Zone of a country Dont Edit untill you want diffrent time zone", + "value": "Asia/Kolkata", + "required": true + }, + "ALIVE_MSG": { + "description": "Your Custom Alive Message to show on Alive.", + "value": "", + "required": false + }, + "ALIVE_PIC": { + "description": "Paste the telegraph link of a video/gif/pic to show on Alive.", + "value": "", + "required": false + }, + "ABUSE": { + "description": "Leave it blank if you dont want Profanity in Andencento. Else Fill ON.", + "value": "ON", + "required": false + }, + "PMPERMIT_PIC": { + "description": "Paste the Telegraph link to show in pm permit message.", + "value": "", + "required": false + }, + "PM_LOG_ID": { + "description": "Fill your private Channel ID if you want to Log PM messages.", + "value": "", + "required": false + }, + "HANDLER": { + "description": "Your command handler. Default is ' . ' (dot).", + "value": "." + }, + "BUTTONS_IN_HELP": { + "description": "No.of buttons to display in help menu.", + "value": "7" + }, + "TEMP_DOWNLOAD_DIRECTORY": { + "description": "Temp File Storage", + "value": "./userbot/cache" + }, + "PM_PERMIT": { + "description": "Fill DISABLE to turn off pm permit.", + "value": "ENABLE" + }, + "APP_ID": { + "description": "Get this value from my.telegram.org", + "value": "" + }, + "API_HASH": { + "description": "Get this value from my.telegram.org", + "value": "" + }, + "LOGGER_ID": { + "description": "Create a private channel. And get it's id from @missrose_bot and paste here. Value should start with -100", + "value": "" + }, + "ANDENCENTO_SESSION": { + "description": "Get this value by using https://replit.com/@madboy482/Session-Andencento and fill this is your String Session.", + "value": "" + }, + "HEROKU_API_KEY": { + "description": "Go to https://dashboard.heroku.com/account, scroll down and press Reveal API. Required for updater to work.", + "value": "", + "required": true + }, + "HEROKU_APP_NAME": { + "description": "The Value of App Name you filled in right on top. Required for updater to work.", + "value": "", + "required": true + }, + "BOT_TOKEN": { + "description": "Make a bot from @BotFather and paste the bot token here.", + "value": "" + }, + "TAG_LOGGER": { + "description": "Make a group and add rose. Do /id and paste the chat id here.", + "value": "", + "required": false + }, + "BOT_USERNAME": { + "description": "Make a bot from @BotFather and paste the username here.", + "value": "" + }, + "SUDO_USERS": { + "description": "Userid of user to grant sudo access. Add multiple sudo users by giving a space between userids", + "value": "", + "required": false + } + }, + "addons": [{ + "plan": "heroku-postgresql", + "options": { + "version": "12" + } + }] +} From 4513f8e0507f6d67344f59f44dce5984e8891ddf Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 10:25:38 +0530 Subject: [PATCH 57/76] epp --- Dockerfile | 69 ------------------------------------------------------ 1 file changed, 69 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index b27d7e7..0000000 --- a/Dockerfile +++ /dev/null @@ -1,69 +0,0 @@ - -FROM kalilinux/kali-rolling - -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get update && apt upgrade -y && apt-get install sudo -y -RUN apt-get install -y ffmpeg python3-pip - -RUN apt-get install -y\ - coreutils \ - bash \ - nodejs \ - bzip2 \ - curl \ - figlet \ - gcc \ - g++ \ - git \ - util-linux \ - libevent-dev \ - libjpeg-dev \ - libffi-dev \ - libpq-dev \ - libwebp-dev \ - libxml2 \ - libxml2-dev \ - libxslt-dev \ - musl \ - neofetch \ - libcurl4-openssl-dev \ - postgresql \ - postgresql-client \ - postgresql-server-dev-all \ - openssl \ - mediainfo \ - wget \ - python3 \ - python3-dev \ - python3-pip \ - libreadline-dev \ - zipalign \ - sqlite3 \ - ffmpeg \ - libsqlite3-dev \ - zlib1g-dev \ - recoverjpeg \ - zip \ - unrar \ - megatools \ - libfreetype6-dev \ - procps \ - policykit-1 \ - p7zip-full \ - tree - -RUN apt-get autoremove --purge - -RUN pip3 install --upgrade pip setuptools -RUN if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi -RUN if [ ! -e /usr/bin/python ]; then ln -sf /usr/bin/python3 /usr/bin/python; fi -RUN rm -r /root/.cache -RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && apt install -y ./google-chrome-stable_current_amd64.deb && rm google-chrome-stable_current_amd64.deb -RUN wget https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip && unzip chromedriver_linux64.zip && chmod +x chromedriver && mv -f chromedriver /usr/bin/ && rm chromedriver_linux64.zip -RUN git clone https://github.com/Andencento/Andencento /root/Andencento -RUN mkdir /root/Andencento/bin/ -WORKDIR /root/Andencento/ -RUN chmod +x /usr/local/bin/* -RUN pip3 install -r requirements.txt -CMD ["bash","./startup.sh"] From 38551afcfc98843c73cd5fb84158fa09d4d834c3 Mon Sep 17 00:00:00 2001 From: Aman Kumar Pandey <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 10:25:51 +0530 Subject: [PATCH 58/76] epp --- app.json | 125 ------------------------------------------------------- 1 file changed, 125 deletions(-) delete mode 100644 app.json diff --git a/app.json b/app.json deleted file mode 100644 index 5b2cfaf..0000000 --- a/app.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "name": "Aษดแด…แด‡ษดแด„แด‡ษดแด›แด Usแด‡ส€Bแดแด›", - "description": "Aษดแด…แด‡ษดแด„แด‡ษดแด›แด Usแด‡ส€Bแดแด› is one of the Best UserBot for Telegram. Known for its Smoothness, Design, Support.", - "logo": "https://telegra.ph/file/99939edc0f7ac640ab688.png ", - "keywords": [ - "telegram", - "userbot", - "plugin", - "telethon", - "ANDENCENTO", - "modular", - "productivity" - ], - "repository": "https://github.com/Andencento/Andencento/", - "website": "https://github.com/Andencento/Andencento/", - "success_url": "https://github.com/Andencento/Andencento/", - "stack": "container", - "env": { - "ENV": { - "description": "Setting this to ANYTHING will enable heroku.", - "value": "ANYTHING" - }, - "YOUR_NAME": { - "description": "Fill Any name it is working as ALIVE_NAME. Default Value is None", - "value": "", - "required": true - }, - "TZ": { - "description": "Time Zone of a country Dont Edit untill you want diffrent time zone", - "value": "Asia/Kolkata", - "required": true - }, - "ALIVE_MSG": { - "description": "Your Custom Alive Message to show on Alive.", - "value": "", - "required": false - }, - "ALIVE_PIC": { - "description": "Paste the telegraph link of a video/gif/pic to show on Alive.", - "value": "", - "required": false - }, - "ABUSE": { - "description": "Leave it blank if you dont want Profanity in Andencento. Else Fill ON.", - "value": "ON", - "required": false - }, - "PMPERMIT_PIC": { - "description": "Paste the Telegraph link to show in pm permit message.", - "value": "", - "required": false - }, - "PM_LOG_ID": { - "description": "Fill your private Channel ID if you want to Log PM messages.", - "value": "", - "required": false - }, - "HANDLER": { - "description": "Your command handler. Default is ' . ' (dot).", - "value": "." - }, - "BUTTONS_IN_HELP": { - "description": "No.of buttons to display in help menu.", - "value": "7" - }, - "TEMP_DOWNLOAD_DIRECTORY": { - "description": "Temp File Storage", - "value": "./userbot/cache" - }, - "PM_PERMIT": { - "description": "Fill DISABLE to turn off pm permit.", - "value": "ENABLE" - }, - "APP_ID": { - "description": "Get this value from my.telegram.org", - "value": "" - }, - "API_HASH": { - "description": "Get this value from my.telegram.org", - "value": "" - }, - "LOGGER_ID": { - "description": "Create a private channel. And get it's id from @missrose_bot and paste here. Value should start with -100", - "value": "" - }, - "ANDENCENTO_SESSION": { - "description": "Get this value by using https://replit.com/@madboy482/Session-Andencento and fill this is your String Session.", - "value": "" - }, - "HEROKU_API_KEY": { - "description": "Go to https://dashboard.heroku.com/account, scroll down and press Reveal API. Required for updater to work.", - "value": "", - "required": true - }, - "HEROKU_APP_NAME": { - "description": "The Value of App Name you filled in right on top. Required for updater to work.", - "value": "", - "required": true - }, - "BOT_TOKEN": { - "description": "Make a bot from @BotFather and paste the bot token here.", - "value": "" - }, - "TAG_LOGGER": { - "description": "Make a group and add rose. Do /id and paste the chat id here.", - "value": "", - "required": false - }, - "BOT_USERNAME": { - "description": "Make a bot from @BotFather and paste the username here.", - "value": "" - }, - "SUDO_USERS": { - "description": "Userid of user to grant sudo access. Add multiple sudo users by giving a space between userids", - "value": "", - "required": false - } - }, - "addons": [{ - "plan": "heroku-postgresql", - "options": { - "version": "12" - } - }] -} From 7d8758b8d116a7bb70d6af15b0df41885dc03de8 Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 13:27:58 +0530 Subject: [PATCH 59/76] k --- .github/workflows/pylint.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..71ea588 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,38 @@ + +name: PyLint +on: push +jobs: + PEP8: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: Install Python lint libraries + run: pip install autopep8 autoflake isort black + - name: Check for showstoppers + run: | + autopep8 --verbose --in-place --recursive --aggressive --aggressive assistant/* + autopep8 --verbose --in-place --recursive --aggressive --aggressive plugins/* + autopep8 --verbose --in-place --recursive --aggressive --aggressive vcbot/* + - name: Remove unused imports and variables + run: | + autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports assistant/* + autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports plugins/* + autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports vcbot/* + - name: lint with isort and black + run: | + isort assistant/* + black assistant/* + isort plugins/* + black plugins/* + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'pylint: auto fixes' + commit_options: '--no-verify' + repository: . + commit_user_name: Noob-Stranger + commit_user_email: Noob-Stranger@users.noreply.github.com + commit_author: Noob-Stranger From cd20fc0e42471557bd6ada6a4bdf7eb1432c9c2f Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 13:30:01 +0530 Subject: [PATCH 60/76] Best --- .github/workflows/pylint.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 71ea588..a8bc9e8 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -16,12 +16,10 @@ jobs: run: | autopep8 --verbose --in-place --recursive --aggressive --aggressive assistant/* autopep8 --verbose --in-place --recursive --aggressive --aggressive plugins/* - autopep8 --verbose --in-place --recursive --aggressive --aggressive vcbot/* - name: Remove unused imports and variables run: | autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports assistant/* autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports plugins/* - autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports vcbot/* - name: lint with isort and black run: | isort assistant/* From b91148b0046126000aa7c79402c143f5a281fb4b Mon Sep 17 00:00:00 2001 From: Noob-Stranger Date: Thu, 12 Aug 2021 08:01:22 +0000 Subject: [PATCH 61/76] pylint: auto fixes --- assistant/alive.py | 78 ++++++++++++++++-------- assistant/main_assistant.py | 27 ++++----- plugins/README.md | 1 - plugins/__init__.py | 26 ++++---- plugins/_core.py | 41 +++++++------ plugins/_help.py | 2 - plugins/_inlinebot.py | 63 ++++++++++++-------- plugins/admins.py | 30 ++++++---- plugins/afk.py | 3 +- plugins/android.py | 4 +- plugins/animations.py | 22 +++---- plugins/anime.py | 4 +- plugins/archiver.py | 8 +-- plugins/auto_profile.py | 7 --- plugins/banall.py | 22 ++++--- plugins/chnl_dwl.py | 4 +- plugins/climate.py | 2 +- plugins/clone.py | 3 +- plugins/edits.py | 2 +- plugins/evaluators.py | 5 +- plugins/fake.py | 2 +- plugins/filter.py | 8 ++- plugins/forceinstaller.py | 2 +- plugins/forcesub | 35 +++++------ plugins/fun.py | 7 +-- plugins/fun2.py | 28 ++++----- plugins/getpfp.py | 3 +- plugins/global.py | 21 +++---- plugins/google.py | 3 +- plugins/heroku.py | 7 ++- plugins/infos.py | 38 ++++++------ plugins/installer.py | 18 +++--- plugins/invite.py | 9 ++- plugins/logos.py | 5 +- plugins/memify.py | 4 +- plugins/msgs.py | 2 +- plugins/pmpermit.py | 116 +++++++++++++++++++++++------------- plugins/profile.py | 3 +- plugins/quotes.py | 4 +- plugins/requirements.txt | 1 - plugins/songs.py | 20 ++++--- plugins/spam.py | 4 +- plugins/stickers.py | 9 ++- plugins/telegraph.py | 4 +- plugins/tweets.py | 18 +++--- plugins/updater.py | 1 - plugins/welcome.py | 3 +- plugins/youtube.py | 14 +++-- 48 files changed, 427 insertions(+), 316 deletions(-) diff --git a/assistant/alive.py b/assistant/alive.py index e4e8952..cfe4cc0 100644 --- a/assistant/alive.py +++ b/assistant/alive.py @@ -1,13 +1,12 @@ - """ Made by GODBOYX """ -import re import os -from telethon import custom, Button, events -from userbot import bot, asst -from . import * +import re + +from telethon import Button, custom, events from userbot import YOUR_NAME as ALIVE_NAME +from userbot import asst ver = "0.2" @@ -25,9 +24,11 @@ pm_caption += f"โžฅ ฮฝั”ัั•ฮนฯƒฮท : {ver}\n" pm_caption += f"โžฅ ะผัƒ ะฒฯƒั•ั• : {DEFAULTUSER} \n" pm_caption += f"โžฅ โ„“ฮนยขั”ฮทั•ั” : [๐˜Ž๐˜•๐˜œ ๐˜ˆ๐˜ง๐˜ง๐˜ฆ๐˜ณ๐˜ฐ ๐˜Ž๐˜ฆ๐˜ฏ๐˜ฆ๐˜ณ๐˜ข๐˜ญ ๐˜—๐˜ถ๐˜ฃ๐˜ญ๐˜ช๐˜ค ๐˜“๐˜ช๐˜ค๐˜ฆ๐˜ฏ๐˜ด๐˜ฆ ๐˜ท3.0](https://github.com/Andencento/Andencento/blob/Andencento/LICENSE/)\n" -pm_caption += "โžฅ ยขฯƒฯัƒัฮนgะฝั‚ : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" -btn = [custom.Button.inline("<>", data= "demploy")] -btn += [custom.Button.inline("<>", data = "stling")] +pm_caption += ( + "โžฅ ยขฯƒฯัƒัฮนgะฝั‚ : By [๐˜›๐˜ฆ๐˜ข๐˜ฎ ๐˜ˆ๐˜ฏ๐˜ฅ๐˜ฆ๐˜ฏ๐˜ค๐˜ฆ๐˜ฏ๐˜ต๐˜ฐ](https://github.com/Andencento/Andencento/)\n" +) +btn = [custom.Button.inline("<>", data="demploy")] +btn += [custom.Button.inline("<>", data="stling")] btn += [Button.url("<>", "https://github.com/Andencento/Andencento")] @@ -38,31 +39,58 @@ async def _(event): await asst.send_file(event.chat_id, PM_IMG, caption=pm_caption, buttons=btn) - @asst.on(events.callbackquery.CallbackQuery(data=re.compile(b"demploy"))) async def demploy(event): - bottm = [[Button.url("", "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE")], [Button.url("", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")]] + bottm = [ + [ + Button.url( + "", + "https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE", + ) + ], + [ + Button.url( + "", + "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento", + ) + ], + ] + + bottm += [ + Button.url( + "", + "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc", + ) + ] + bottm += [custom.Button.inline("<", "http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc")] - bottm += [custom.Button.inline("<", "https://replit.com/@madboy482/Session-Andencento/")] - batan += [Button.url("", "https://replit.com/@dashezup/generate-pyrogram-session-string")] - batan += [custom.Button.inline("<", + "https://replit.com/@madboy482/Session-Andencento/", + ) + ] + batan += [ + Button.url( + "", + "https://replit.com/@dashezup/generate-pyrogram-session-string", + ) + ] + batan += [custom.Button.inline("<", "Installs the replied python file if suitable to Andencento's codes." + "install", + "", + "Installs the replied python file if suitable to Andencento's codes.", ).add_command( - "remove", "", "Uninstalls the given plugin from ั”ฮนฮฝฮฑฯฮฟฯ„. To get that again do .restart", "uninstall alive" + "remove", + "", + "Uninstalls the given plugin from ั”ฮนฮฝฮฑฯฮฟฯ„. To get that again do .restart", + "uninstall alive", ).add_command( - "load", "", "Loades the unloaded plugin to your userbot", "load alive" + "load", "", "Loades the unloaded plugin to your userbot", "load alive" ).add_command( - "unload", "", "Unloads the plugin from your userbot", "unload alive" + "unload", "", "Unloads the plugin from your userbot", "unload alive" ).add_command( - "send", "", "Sends the given file from your userbot server, if any.", "send alive" + "send", + "", + "Sends the given file from your userbot server, if any.", + "send alive", ).add_command( - "cmds", None, "Gives out the list of modules in AndencentoBot." + "cmds", None, "Gives out the list of modules in AndencentoBot." ).add_warning( - "โŒ Install External Plugin On Your Own Risk. We won't help if anything goes wrong after installing a plugin." + "โŒ Install External Plugin On Your Own Risk. We won't help if anything goes wrong after installing a plugin." ).add() diff --git a/plugins/_help.py b/plugins/_help.py index 64dea2d..f98d872 100644 --- a/plugins/_help.py +++ b/plugins/_help.py @@ -51,5 +51,3 @@ async def cmd_list(event): event.chat_id, reply_to=event.reply_to_msg_id, hide_via=True ) await event.delete() - - diff --git a/plugins/_inlinebot.py b/plugins/_inlinebot.py index 0b3bd71..d42143e 100644 --- a/plugins/_inlinebot.py +++ b/plugins/_inlinebot.py @@ -1,11 +1,16 @@ import io import re from math import ceil -from . import * + from config import Config -from userbot import CMD_LIST, CMD_HELP from telethon import custom, events -Andencento_pic = Config.PMPERMIT_PIC or "https://telegra.ph/file/ac32724650ef92663fbd1.png" +from userbot import CMD_LIST + +from . import * + +Andencento_pic = ( + Config.PMPERMIT_PIC or "https://telegra.ph/file/ac32724650ef92663fbd1.png" +) cstm_pmp = Config.CUSTOM_PMPERMIT ALV_PIC = Config.ALIVE_PIC mssge = ( @@ -14,11 +19,14 @@ else "**You Have Trespassed To My Master's PM!\nThis Is Illegal And Regarded As Crime.**" ) -USER_BOT_WARN_ZERO = "Enough Of Your Flooding In My Master's PM!! \n\n**๐Ÿšซ Blocked and Reported**" +USER_BOT_WARN_ZERO = ( + "Enough Of Your Flooding In My Master's PM!! \n\n**๐Ÿšซ Blocked and Reported**" +) ANDENCENTO_FIRST = ( "**๐Ÿ”ฅ Andencento ULTRA Private Security ๐Ÿ”ฅ**\n\nThis is to inform you that " "{} is currently unavailable.\nThis is an automated message.\n\n" - "{}\n\n**Please Choose Why You Are Here!!**".format(Andencento_mention, mssge)) + "{}\n\n**Please Choose Why You Are Here!!**".format(Andencento_mention, mssge) +) cmd = "commands" andencento = Config.YOUR_NAME if Config.BOT_USERNAME is not None and tgbot is not None: @@ -28,7 +36,7 @@ async def inline_handler(event): builder = event.builder result = None query = event.text - button = paginate_help(0, CMD_LIST, "helpme") + paginate_help(0, CMD_LIST, "helpme") apn = [] for x in CMD_LIST.values(): for y in x: @@ -36,7 +44,7 @@ async def inline_handler(event): if event.query.user_id == bot.uid and query.startswith("Userbot"): rev_text = query[::-1] buttons = paginate_help(0, CMD_LIST, "helpme") - + result = builder.article( "ยฉ Andencento-UserBot Help", text=f"Andencento[๐Ÿค–](https://telegra.ph/file/ac32724650ef92663fbd1.png)\n๐Ÿ”ฐ **{andencento}**\n\n๐Ÿ“œ __No.of Plugins__ : `{len(CMD_LIST)}` \n๐Ÿ—‚๏ธ __Commands__ : `{len(apn)}`", @@ -64,7 +72,12 @@ async def inline_handler(event): text=f"**โšก ษ›ษขษ›ีผษ–ฮฑส€ส แด€า“ Andencento Userbot โšก**", buttons=[ [Button.url("๐Ÿ“‘ Repo ๐Ÿ“‘", "https://t.me/AndencentoSupport")], - [Button.url("๐Ÿš€ Deploy ๐Ÿš€", "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento")], + [ + Button.url( + "๐Ÿš€ Deploy ๐Ÿš€", + "https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento", + ) + ], ], ) @@ -90,20 +103,21 @@ async def inline_handler(event): ], [ custom.Button.url( - "โœจ REPO โœจ", "https://github.com/Andencento/Andencento"), - custom.Button.url - ( - "๐Ÿ”ฐ TUTORIAL ๐Ÿ”ฐ", "https://www.youtube.com/watch?v=9WxN6aq5wsQ" - ) + "โœจ REPO โœจ", "https://github.com/Andencento/Andencento" + ), + custom.Button.url( + "๐Ÿ”ฐ TUTORIAL ๐Ÿ”ฐ", + "https://www.youtube.com/watch?v=9WxN6aq5wsQ", + ), ], ], link_preview=False, ) await event.answer([result] if result else None) - + @tgbot.on( events.callbackquery.CallbackQuery( # pylint:disable=E0602 - data=re.compile(b"pmclick\((.+?)\)") + data=re.compile(b"pmclick\\((.+?)\\)") ) ) async def on_pm_click(event): @@ -114,9 +128,10 @@ async def on_pm_click(event): await event.edit( f"๐Ÿ”ฐ This is Andencento PM Security for {Eiva_mention} to keep away unwanted retards from spamming PM..." ) + @tgbot.on( events.callbackquery.CallbackQuery( # pylint:disable=E0602 - data=re.compile(b"reg\((.+?)\)") + data=re.compile(b"reg\\((.+?)\\)") ) ) async def on_pm_click(event): @@ -137,7 +152,7 @@ async def on_pm_click(event): @tgbot.on( events.callbackquery.CallbackQuery( # pylint:disable=E0602 - data=re.compile(b"chat\((.+?)\)") + data=re.compile(b"chat\\((.+?)\\)") ) ) async def on_pm_click(event): @@ -159,7 +174,7 @@ async def on_pm_click(event): @tgbot.on( events.callbackquery.CallbackQuery( # pylint:disable=E0602 - data=re.compile(b"heheboi\((.+?)\)") + data=re.compile(b"heheboi\\((.+?)\\)") ) ) async def on_pm_click(event): @@ -167,9 +182,7 @@ async def on_pm_click(event): reply_pop_up_alert = "This is for other users!" await event.answer(reply_pop_up_alert, cache_time=0, alert=True) else: - await event.edit( - f"๐Ÿฅด **Go away from here\nYou Are Blocked Now**" - ) + await event.edit(f"๐Ÿฅด **Go away from here\nYou Are Blocked Now**") await bot(functions.contacts.BlockRequest(event.query.user_id)) target = await event.client(GetFullUserRequest(event.query.user_id)) ok = event.query.user_id @@ -184,7 +197,7 @@ async def on_pm_click(event): @tgbot.on( events.callbackquery.CallbackQuery( # pylint:disable=E0602 - data=re.compile(b"helpme_next\((.+?)\)") + data=re.compile(b"helpme_next\\((.+?)\\)") ) ) async def on_plug_in_callback_query_handler(event): @@ -203,7 +216,7 @@ async def on_plug_in_callback_query_handler(event): @tgbot.on( events.callbackquery.CallbackQuery( # pylint:disable=E0602 - data=re.compile(b"helpme_prev\((.+?)\)") + data=re.compile(b"helpme_prev\\((.+?)\\)") ) ) async def on_plug_in_callback_query_handler(event): @@ -235,7 +248,7 @@ async def on_plug_in_callback_query_handler(event): for i in CMD_LIST[plugin_name]: help_string += i help_string += "\n" - except: + except BaseException: pass if help_string is "": reply_pop_up_alert = "{} is useless".format(plugin_name) @@ -247,7 +260,7 @@ async def on_plug_in_callback_query_handler(event): ) try: await event.answer(reply_pop_up_alert, cache_time=0, alert=True) - except: + except BaseException: with io.BytesIO(str.encode(reply_pop_up_alert)) as out_file: out_file.name = "{}.txt".format(plugin_name) await event.client.send_file( diff --git a/plugins/admins.py b/plugins/admins.py index 67ba4c5..e0a9a34 100644 --- a/plugins/admins.py +++ b/plugins/admins.py @@ -1,16 +1,24 @@ from asyncio import sleep -from telethon.errors import (BadRequestError, ImageProcessFailedError, - PhotoCropSizeSmallError) -from telethon.errors.rpcerrorlist import (UserAdminInvalidError, - UserIdInvalidError) -from telethon.tl.functions.channels import (EditAdminRequest, - EditBannedRequest, - EditPhotoRequest) +from telethon.errors import ( + BadRequestError, + ImageProcessFailedError, + PhotoCropSizeSmallError, +) +from telethon.errors.rpcerrorlist import UserAdminInvalidError, UserIdInvalidError +from telethon.tl.functions.channels import ( + EditAdminRequest, + EditBannedRequest, + EditPhotoRequest, +) from telethon.tl.functions.messages import UpdatePinnedMessageRequest from telethon.tl.functions.users import GetFullUserRequest -from telethon.tl.types import (ChatAdminRights, ChatBannedRights, - MessageEntityMentionName, MessageMediaPhoto) +from telethon.tl.types import ( + ChatAdminRights, + ChatBannedRights, + MessageEntityMentionName, + MessageMediaPhoto, +) from sql.mute_sql import is_muted, mute, unmute @@ -434,7 +442,7 @@ async def pin(msg): await sleep(3) try: await hmm.delete() - except: + except BaseException: pass @@ -552,7 +560,7 @@ async def _(event): await sleep(3) try: await event.delete() - except: + except BaseException: pass diff --git a/plugins/afk.py b/plugins/afk.py index ba24e00..e3bd78e 100644 --- a/plugins/afk.py +++ b/plugins/afk.py @@ -1,4 +1,4 @@ -# by uniborg...Thanks @spechide +# by uniborg...Thanks @spechide # Now will be used in LEGENDBOT too.... """Syntax: .afk REASON""" import asyncio @@ -7,7 +7,6 @@ from telethon import events from telethon.tl import functions, types - from userbot import CMD_HELP from userbot.utils import andencento_cmd diff --git a/plugins/android.py b/plugins/android.py index 00180ab..a887041 100644 --- a/plugins/android.py +++ b/plugins/android.py @@ -128,7 +128,9 @@ async def codename_info(request): await edit_or_reply(request, reply) -@Andencento.on(andencento_cmd(outgoing=True, pattern=r"specs(?: |)([\S]*)(?: |)([\s\S]*)")) +@Andencento.on( + andencento_cmd(outgoing=True, pattern=r"specs(?: |)([\S]*)(?: |)([\s\S]*)") +) @Andencento.on(sudo_cmd(pattern=r"specs(?: |)([\S]*)(?: |)([\s\S]*)", allow_sudo=True)) async def devices_specifications(request): if request.fwd_from: diff --git a/plugins/animations.py b/plugins/animations.py index 0c1c472..8ab96c7 100644 --- a/plugins/animations.py +++ b/plugins/animations.py @@ -515,11 +515,11 @@ async def test(event): โ˜ โœˆ โ˜ ๐Ÿš โ˜ โ˜ โ˜ โ˜ โ˜ โ˜ ๐Ÿฌ๐Ÿจ๐Ÿซ๐Ÿข๐Ÿค๐Ÿฅ๐Ÿฆ๐Ÿช๐Ÿซ - ๐ŸŒฒ/ l๐Ÿš\๐ŸŒณ๐Ÿ‘ญ - ๐ŸŒณ/ ๐Ÿš˜ l ๐Ÿƒ \๐ŸŒด ๐Ÿ‘ฌ ๐Ÿ‘ฌ ๐ŸŒด/ l ๐Ÿš” \๐ŸŒฒ + ๐ŸŒฒ/ l๐Ÿš\\๐ŸŒณ๐Ÿ‘ญ + ๐ŸŒณ/ ๐Ÿš˜ l ๐Ÿƒ \\๐ŸŒด ๐Ÿ‘ฌ ๐Ÿ‘ฌ ๐ŸŒด/ l ๐Ÿš” \\๐ŸŒฒ ๐ŸŒฒ/ ๐Ÿš– l \ - ๐ŸŒณ/๐Ÿšถ | ๐Ÿš \ ๐ŸŒด๐Ÿšด๐Ÿšด -๐ŸŒด/ | \๐ŸŒฒ""", + ๐ŸŒณ/๐Ÿšถ | ๐Ÿš \\ ๐ŸŒด๐Ÿšด๐Ÿšด +๐ŸŒด/ | \\๐ŸŒฒ""", ) @@ -636,13 +636,13 @@ async def _(event): event = await eor(event, f"**Ready Commando **__{user_mention}....") animation_chars = [ "๏ผฆ๏ฝ‰๏ฝ‰๏ฝ‰๏ฝ‰๏ฝ‰๏ฝ’๏ฝ…", - f"__**Commando **__{user_mention} \n\n_/๏น‹\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - \n _/๏น‹\_\n", - f"__**Commando **__{user_mention} \n\n_/๏น‹\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - -\n _/๏น‹\_\n", - f"__**Commando **__{user_mention} \n\n_/๏น‹\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - - -\n _/๏น‹\_\n", - f"__**Commando **__{user_mention} \n\n_/๏น‹\_\n (า‚`_ยด)\n<,๏ธปโ•ฆโ•คโ”€ า‰ - -\n _/๏น‹\_\n", - f"__**Commando **__{user_mention} \n\n_/๏น‹\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - \n _/๏น‹\_\n", - f"__**Commando **__{user_mention} \n\n_/๏น‹\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - -\n _/๏น‹\_\n", - f"__**Commando **__{user_mention} \n\n_/๏น‹\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - - - {name}\n _/๏น‹\_\n", + f"__**Commando **__{user_mention} \n\n_/๏น‹\\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - \n _/๏น‹\\_\n", + f"__**Commando **__{user_mention} \n\n_/๏น‹\\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - -\n _/๏น‹\\_\n", + f"__**Commando **__{user_mention} \n\n_/๏น‹\\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - - -\n _/๏น‹\\_\n", + f"__**Commando **__{user_mention} \n\n_/๏น‹\\_\n (า‚`_ยด)\n<,๏ธปโ•ฆโ•คโ”€ า‰ - -\n _/๏น‹\\_\n", + f"__**Commando **__{user_mention} \n\n_/๏น‹\\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - \n _/๏น‹\\_\n", + f"__**Commando **__{user_mention} \n\n_/๏น‹\\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - -\n _/๏น‹\\_\n", + f"__**Commando **__{user_mention} \n\n_/๏น‹\\_\n (า‚`_ยด)\n <,๏ธปโ•ฆโ•คโ”€ า‰ - - - {name}\n _/๏น‹\\_\n", ] for i in animation_ttl: await asyncio.sleep(animation_interval) diff --git a/plugins/anime.py b/plugins/anime.py index 50f378b..1f64989 100644 --- a/plugins/anime.py +++ b/plugins/anime.py @@ -8,8 +8,8 @@ async def callAPI(search_str): query = """ - query ($id: Int,$search: String) { - Media (id: $id, type: ANIME,search: $search) { + query ($id: Int,$search: String) { + Media (id: $id, type: ANIME,search: $search) { id title { romaji diff --git a/plugins/archiver.py b/plugins/archiver.py index 0070e75..cade242 100644 --- a/plugins/archiver.py +++ b/plugins/archiver.py @@ -152,7 +152,7 @@ async def _(event): try: os.remove(directory_name + ".rar") os.remove(directory_name) - except: + except BaseException: pass await event.edit("Task Completed") await asyncio.sleep(3) @@ -205,7 +205,7 @@ async def _(event): try: os.remove(directory_name + ".7z") os.remove(directory_name) - except: + except BaseException: pass await event.edit("Task Completed") await asyncio.sleep(3) @@ -258,7 +258,7 @@ async def _(event): try: os.remove(output) os.remove(output) - except: + except BaseException: pass await event.edit("Task Completed") await asyncio.sleep(3) @@ -299,7 +299,7 @@ async def create_archive(input_directory): if os.path.exists(compressed_file_name): try: shutil.rmtree(input_directory) - except: + except BaseException: pass return_name = compressed_file_name return return_name diff --git a/plugins/auto_profile.py b/plugins/auto_profile.py index 495e9e3..758cb46 100644 --- a/plugins/auto_profile.py +++ b/plugins/auto_profile.py @@ -12,13 +12,6 @@ BIO_MSG = Config.BIO_MSG -import asyncio -import time - -from telethon.errors import FloodWaitError -from telethon.tl import functions - -from . import * DEFAULTUSERBIO = str(BIO_MSG) if BIO_MSG else "แด›สœแด‡ แดœสŸแด›ษชแดแด€แด›แด‡ แด€ษดแด…แด‡ษดแด„แด‡ษดแด›แด แดœ๊œฑแด‡ส€ส™แดแด›" DEL_TIME_OUT = 60 diff --git a/plugins/banall.py b/plugins/banall.py index a3b24b7..c3db4a6 100644 --- a/plugins/banall.py +++ b/plugins/banall.py @@ -3,11 +3,17 @@ from telethon.tl import functions from telethon.tl.functions.channels import EditBannedRequest -from telethon.tl.types import (ChannelParticipantsAdmins, - ChannelParticipantsKicked, ChatBannedRights, - UserStatusEmpty, UserStatusLastMonth, - UserStatusLastWeek, UserStatusOffline, - UserStatusOnline, UserStatusRecently) +from telethon.tl.types import ( + ChannelParticipantsAdmins, + ChannelParticipantsKicked, + ChatBannedRights, + UserStatusEmpty, + UserStatusLastMonth, + UserStatusLastWeek, + UserStatusOffline, + UserStatusOnline, + UserStatusRecently, +) from . import * @@ -23,13 +29,15 @@ embed_links=True, ) + @Andencento.on(sudo_cmd(pattern=r"kickall ?(.*)", allow_sudo=True)) @Andencento.on(sudo_cmd(pattern=r"banall ?(.*)", allow_sudo=True)) @Andencento.on(sudo_cmd(pattern=r"unbanall ?(.*)", allow_sudo=True)) @Andencento.on(sudo_cmd(pattern="ikuck ?(.*)", allow_sudo=True)) async def _(event): - Andencento.send_message(event, "Sudo Restricted Command Sur!!") - + Andencento.send_message(event, "Sudo Restricted Command Sur!!") + + @Andencento.on(andencento_cmd(pattern=r"kickall ?(.*)")) async def _(event): result = await event.client( diff --git a/plugins/chnl_dwl.py b/plugins/chnl_dwl.py index 4ad3f27..6c69df3 100644 --- a/plugins/chnl_dwl.py +++ b/plugins/chnl_dwl.py @@ -12,7 +12,7 @@ async def get_media(event): dir = "./temp/" try: os.makedirs("./temp/") - except: + except BaseException: pass channel_username = event.text limit = channel_username[6:9] @@ -43,7 +43,7 @@ async def get_media(event): dir = "./temp/" try: os.makedirs("./temp/") - except: + except BaseException: pass channel_username = event.text channel_username = channel_username[7:] diff --git a/plugins/climate.py b/plugins/climate.py index 0f1ccd7..18bc86c 100644 --- a/plugins/climate.py +++ b/plugins/climate.py @@ -206,7 +206,7 @@ async def _(event): ) try: await event.delete() - except: + except BaseException: pass diff --git a/plugins/clone.py b/plugins/clone.py index ead9411..5bb7416 100644 --- a/plugins/clone.py +++ b/plugins/clone.py @@ -29,7 +29,8 @@ async def _(event): # https://stackoverflow.com/a/5072031/4723940 # some Deleted Accounts do not have first_name if first_name is not None: - # some weird people (like me) have more than 4096 characters in their names + # some weird people (like me) have more than 4096 characters in their + # names first_name = first_name.replace("\u2060", "") last_name = replied_user.user.last_name # last_name is not Manadatory in @Telegram diff --git a/plugins/edits.py b/plugins/edits.py index f5dd38a..b3839a7 100644 --- a/plugins/edits.py +++ b/plugins/edits.py @@ -46,7 +46,7 @@ async def _(event): animation_ttl = range(0, 16) input_str = event.pattern_match.group(1) if input_str == "shrug": - await eor(event, "ยฏ\_(ใƒ„)_/ยฏ") + await eor(event, "ยฏ\\_(ใƒ„)_/ยฏ") elif input_str == "apple": await eor(event, "\uF8FF") elif input_str == ":/": diff --git a/plugins/evaluators.py b/plugins/evaluators.py index a9654ee..d7aa73a 100644 --- a/plugins/evaluators.py +++ b/plugins/evaluators.py @@ -95,7 +95,10 @@ async def _(event): async def aexec(code, smessatatus): message = event = smessatatus - p = lambda _x: print(yaml_format(_x)) + + def p(_x): + return print(yaml_format(_x)) + reply = await event.get_reply_message() exec( f"async def __aexec(message, event , reply, client, p, chat): " diff --git a/plugins/fake.py b/plugins/fake.py index baf2afe..3fce8ac 100644 --- a/plugins/fake.py +++ b/plugins/fake.py @@ -75,7 +75,7 @@ async def gbun(event): "**Person's Name: ** __{}__\n" "**ID : ** `{}`\n" ).format(firstname, idd, firstname, idd) - if usname == None: + if usname is None: jnl += "**Victim Nigga's username: ** `Doesn't own a username!`\n" elif usname != "None": jnl += "**Victim Nigga's username** : @{}\n".format(usname) diff --git a/plugins/filter.py b/plugins/filter.py index e92cc10..432f1b4 100644 --- a/plugins/filter.py +++ b/plugins/filter.py @@ -4,8 +4,12 @@ from telethon import utils from telethon.tl import types -from sql.filter_sql import (add_filter, get_all_filters, - remove_all_filters, remove_filter) +from sql.filter_sql import ( + add_filter, + get_all_filters, + remove_all_filters, + remove_filter, +) from . import * diff --git a/plugins/forceinstaller.py b/plugins/forceinstaller.py index f583d7c..1172601 100644 --- a/plugins/forceinstaller.py +++ b/plugins/forceinstaller.py @@ -1,9 +1,9 @@ +import os from pathlib import Path from . import * DELETE_TIMEOUT = 5 -import os @Andencento.on(sudo_cmd(pattern=".install", allow_sudo=True)) diff --git a/plugins/forcesub b/plugins/forcesub index 2abb1ca..335c8cd 100644 --- a/plugins/forcesub +++ b/plugins/forcesub @@ -1,10 +1,10 @@ -from telethon.events import InlineQuery, callbackquery -from telethon.tl.custom import Button from telethon.errors.rpcerrorlist import UserNotParticipantError from telethon.tl.functions.channels import GetParticipantRequest -from telethon.tl.functions.messages import ExportChatInviteRequest + from sql.fsub_sql import * + from . import * + """ @tgAndencento.on(InlineQuery) async def fsub_in(event): @@ -54,7 +54,7 @@ async def on_pm_click(event): @Andencento.on(events.ChatAction()) async def forcesub(event): - if all_fsub() == None: + if all_fsub() is None: return if not (event.user_joined or event.user_added): return @@ -69,9 +69,7 @@ async def forcesub(event): await bot(GetParticipantRequest(int(joinchat), user.id)) except UserNotParticipantError: await bot.edit_permissions(event.chat_id, user.id, send_messages=False) - res = await bot.inline_query( - tgbotusername, f"fsub {user.id}+{joinchat}" - ) + res = await bot.inline_query(tgbotusername, f"fsub {user.id}+{joinchat}") await res[0].click(event.chat_id, reply_to=event.action_message.id) @@ -90,11 +88,15 @@ async def _(event): try: ch = int(hunter) except BaseException: - return await eod(event, "โš ๏ธ **Error !** \n\nChannel ID invalid. Please Recheck It !") + return await eod( + event, "โš ๏ธ **Error !** \n\nChannel ID invalid. Please Recheck It !" + ) try: hunter = (await bot.get_entity(ch)).id except BaseException: - return await eod(event, "โš ๏ธ **Error !** \n\nChannel ID invalid. Please Recheck It !") + return await eod( + event, "โš ๏ธ **Error !** \n\nChannel ID invalid. Please Recheck It !" + ) if not str(hunter).startswith("-100"): hunter = int("-100" + str(hunter)) add_fsub(event.chat_id, hunter) @@ -132,16 +134,15 @@ async def list(event): CHANNEL_LIST = "No Chat Found With Active Force Subscribe." await edit_or_reply(event, CHANNEL_LIST) + CmdHelp("forcesub").add_command( - "fsub", "", "Activates Force Subscribe In The Chat" -).add_command( - "rmfsub", None, "Removes the chat from Force Subscribe" -).add_command( - "chfsub", None, "Checks for the Status of Force Subscribe In The Chat." + "fsub", "", "Activates Force Subscribe In The Chat" +).add_command("rmfsub", None, "Removes the chat from Force Subscribe").add_command( + "chfsub", None, "Checks for the Status of Force Subscribe In The Chat." ).add_command( - "lsfsub", None, "Gives the list of all chats with force subscribe enabled." + "lsfsub", None, "Gives the list of all chats with force subscribe enabled." ).add_warning( - "โœ… Harmless Module." + "โœ… Harmless Module." ).add_info( - "Force Them To Join. \n**๐Ÿ“Œ Note :** You need to be admin jn both the chat to use this module." + "Force Them To Join. \n**๐Ÿ“Œ Note :** You need to be admin jn both the chat to use this module." ).add() diff --git a/plugins/fun.py b/plugins/fun.py index 2853584..85fa469 100644 --- a/plugins/fun.py +++ b/plugins/fun.py @@ -22,7 +22,7 @@ async def who(event): try: await edit_or_reply(event, caption) - except: + except BaseException: await edit_or_reply(event, "`Can't slap this nibba !!`") @@ -192,9 +192,8 @@ async def copypasta(cp_e): await edit_or_reply(cp_e, "`๐Ÿ˜‚๐Ÿ…ฑ๏ธIvE๐Ÿ‘sOME๐Ÿ‘…text๐Ÿ‘…forโœŒ๏ธMe๐Ÿ‘ŒtO๐Ÿ‘MAkE๐Ÿ‘€iT๐Ÿ’žfunNy!๐Ÿ’ฆ`") return reply_text = random.choice(EMOJIS) - b_char = random.choice( - message - ).lower() # choose a random character in the message to be substituted with ๐Ÿ…ฑ๏ธ + # choose a random character in the message to be substituted with ๐Ÿ…ฑ๏ธ + b_char = random.choice(message).lower() for owo in message: if owo == " ": reply_text += random.choice(EMOJIS) diff --git a/plugins/fun2.py b/plugins/fun2.py index 3006b0b..26d2a79 100644 --- a/plugins/fun2.py +++ b/plugins/fun2.py @@ -75,7 +75,7 @@ async def _(event): async def _(event): if event.fwd_from: return - mentions = "`๐Ÿ˜/\n/โ–Œ \n/ \\nโ–ˆโ–ˆโ–ˆโ–ˆ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\๐Ÿ˜ฆ\nโ•ฌโ•ฌ/โ–Œ\nโ•ฌโ•ฌ/\`" + mentions = "`๐Ÿ˜/\n/โ–Œ \n/ \\nโ–ˆโ–ˆโ–ˆโ–ˆ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\nโ•ฌโ•ฌ\\๐Ÿ˜ฆ\nโ•ฌโ•ฌ/โ–Œ\nโ•ฌโ•ฌ/\\`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" @@ -92,7 +92,7 @@ async def _(event): async def _(event): if event.fwd_from: return - mentions = "`๐Ÿ˜ฒ๐Ÿ’จ ๐Ÿ”ฅ\n/|\ ๐Ÿ”ฅ๐Ÿ”ฅ\n/ \ ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ`" + mentions = "`๐Ÿ˜ฒ๐Ÿ’จ ๐Ÿ”ฅ\n/|\\ ๐Ÿ”ฅ๐Ÿ”ฅ\n/ \\ ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" @@ -109,7 +109,7 @@ async def _(event): async def _(event): if event.fwd_from: return - mentions = "`. ๐Ÿ˜Ž\n |\๐Ÿ‘\n / \\\nโ”โ”โ”โ”โ”โ”“ ๏ผผ๏ผผ \nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ ใƒฝ๐Ÿ˜ฉใƒŽ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ ใ€€ /ใ€€\nโ”“โ”“โ”“โ”“โ”“โ”ƒ ใƒŽ)ใ€€ \nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ`" + mentions = "`. ๐Ÿ˜Ž\n |\\๐Ÿ‘\n / \\\nโ”โ”โ”โ”โ”โ”“ ๏ผผ๏ผผ \nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ ใƒฝ๐Ÿ˜ฉใƒŽ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ ใ€€ /ใ€€\nโ”“โ”“โ”“โ”“โ”“โ”ƒ ใƒŽ)ใ€€ \nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ\nโ”“โ”“โ”“โ”“โ”“โ”ƒ`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" @@ -143,7 +143,7 @@ async def _(event): async def _(event): if event.fwd_from: return - mentions = "`......................................... \n \n๐•”๐• ๐•ž๐•– ๐•ฅ๐•  ๐•ž๐•–, ๐•ž๐•ช ๐•”๐•™๐•š๐•๐••๐•ฃ๐•–๐•Ÿ \n`` \n. . /. ))) . . . . . . . . . (((ใƒฝ \n/. .ใƒŽ๏ฟฃ. . . ___. . .๏ฟฃ Y .\ \n| . (.\, . . . ( อกยฐ อœส– อกยฐ). . . ./.) . ) \nใƒฝ.ใƒฝ..แฏข._.|๏น€|._._ใƒŽโ‚„โ‚‚โ‚€ // \n. . .\|. ๐“€๐“‚ธ๏ผน. . เฟ•. . . / \n. . . .|. \. . แฏช. . .|. . แฏช. . ๏พ‰ \n. . . . . \ .ใƒˆใƒผไปใƒผใ‚ค \n. . . . . . . |. ใƒŸๅœŸๅฝก / \n. . . . . . . )\. . .ยฐ . ./( \n. . . . . . /. . .\อŽฬฆ ฬทฬซ ฬดอ ฬดฬข/ฬดอ–. . \ \n. . . . . /. โถโน . /ฬดอัผฬ•ฬ”โ˜ฐฬดอ„โ˜ฐโ˜ฐโ˜ฐโ˜ฐD,ฬฐฬฑ \n. . . . /. / . . / . . .\. \. . \ \n. . . .((. . . .(. . . . .). . . .)) \n. . . .| . . . .). . . . .(|. . . / \n. . . . |. . . /. . . . /. . . ./ \n. . . . |. . ..| . . . ./. . ./. . ... . . ๐“‰๐“€๐“€ƒ๐“`" + mentions = "`......................................... \n \n๐•”๐• ๐•ž๐•– ๐•ฅ๐•  ๐•ž๐•–, ๐•ž๐•ช ๐•”๐•™๐•š๐•๐••๐•ฃ๐•–๐•Ÿ \n`` \n. . /. ))) . . . . . . . . . (((ใƒฝ \n/. .ใƒŽ๏ฟฃ. . . ___. . .๏ฟฃ Y .\\ \n| . (.\\, . . . ( อกยฐ อœส– อกยฐ). . . ./.) . ) \nใƒฝ.ใƒฝ..แฏข._.|๏น€|._._ใƒŽโ‚„โ‚‚โ‚€ // \n. . .\\|. ๐“€๐“‚ธ๏ผน. . เฟ•. . . / \n. . . .|. \\. . แฏช. . .|. . แฏช. . ๏พ‰ \n. . . . . \\ .ใƒˆใƒผไปใƒผใ‚ค \n. . . . . . . |. ใƒŸๅœŸๅฝก / \n. . . . . . . )\\. . .ยฐ . ./( \n. . . . . . /. . .\\อŽฬฆ ฬทฬซ ฬดอ ฬดฬข/ฬดอ–. . \\ \n. . . . . /. โถโน . /ฬดอัผฬ•ฬ”โ˜ฐฬดอ„โ˜ฐโ˜ฐโ˜ฐโ˜ฐD,ฬฐฬฑ \n. . . . /. / . . / . . .\\. \\. . \\ \n. . . .((. . . .(. . . . .). . . .)) \n. . . .| . . . .). . . . .(|. . . / \n. . . . |. . . /. . . . /. . . ./ \n. . . . |. . ..| . . . ./. . ./. . ... . . ๐“‰๐“€๐“€ƒ๐“`" chat = await event.get_input_chat() async for x in borg.iter_participants(chat, filter=ChannelParticipantsAdmins): mentions += f"" @@ -182,18 +182,18 @@ async def _(event): await eor(event, "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 ๐Ÿ‘– /|", + " ๐Ÿ˜ โ˜บ๏ธ \n/๐Ÿ‘•\\ /๐Ÿ‘—\\ \n ๐Ÿ‘– /|", + " ๐Ÿ˜ ๐Ÿ˜ \n/๐Ÿ‘•\\ /๐Ÿ‘—\\ \n ๐Ÿ‘– /|", + " ๐Ÿ˜˜ ๐Ÿ˜Š \n /๐Ÿ‘•\\/๐Ÿ‘—\\ \n ๐Ÿ‘– /|", + " ๐Ÿ˜ณ ๐Ÿ˜ \n /|\\ /๐Ÿ‘™\\ \n / / |", + "๐Ÿ˜ˆ /๐Ÿ˜ฐ\\ \n<|\\ ๐Ÿ‘™ \n /๐Ÿ† / |", + "๐Ÿ˜… \n/(),โœŠ๐Ÿ˜ฎ \n /\\ _/\\/|", "๐Ÿ˜Ž \n/\\_,__๐Ÿ˜ซ \n // // \\", "๐Ÿ˜– \n/\\_,๐Ÿ’ฆ_๐Ÿ˜‹ \n // // \\", - " ๐Ÿ˜ญ โ˜บ๏ธ \n /|\ /(๐Ÿ‘ถ)\ \n /!\ / \ ", + " ๐Ÿ˜ญ โ˜บ๏ธ \n /|\\ /(๐Ÿ‘ถ)\\ \n /!\\ / \\ ", "The End ๐Ÿ˜‚...", ] diff --git a/plugins/getpfp.py b/plugins/getpfp.py index 77afd9d..b412edc 100644 --- a/plugins/getpfp.py +++ b/plugins/getpfp.py @@ -34,7 +34,8 @@ async def _(event): # https://stackoverflow.com/a/5072031/4723940 # some Deleted Accounts do not have first_name if first_name is not None: - # some weird people (like me) have more than 4096 characters in their names + # some weird people (like me) have more than 4096 characters in their + # names first_name = first_name.replace("\u2060", "") # inspired by https://telegram.dog/afsaI181 user_bio = replied_user.about diff --git a/plugins/global.py b/plugins/global.py index e61d6ba..91e7f78 100644 --- a/plugins/global.py +++ b/plugins/global.py @@ -2,7 +2,7 @@ from telethon import events from telethon.tl.functions.channels import EditAdminRequest -from telethon.tl.types import ChatAdminRights +from telethon.tl.types import ChatAdminRights, MessageEntityMentionName from sql import gmute_sql as gsql from sql.gban_sql import all_gbanned, gbaner, is_gbanned, ungbaner @@ -19,6 +19,7 @@ async def _(event): async def _(event): await Andencento.send_message(event, "`Sudo Restricted Command Sur`") + @Andencento.on(sudo_cmd(pattern="listgban$", allow_sudo=True)) async def _(event): await Andencento.send_message(event, "`Sudo Restricted Command Sur`") @@ -225,7 +226,7 @@ async def gm(event): try: if str(userid) in DEVLIST: return await eod(event, "**Sorry I'm not going to gmute them..**") - except: + except BaseException: return try: gsql.gmute(userid, "gmute") @@ -268,10 +269,6 @@ async def endgmute(event): marculs = 9 -from telethon.tl.functions.channels import EditAdminRequest -from telethon.tl.types import ChatAdminRights, MessageEntityMentionName - -from . import * async def get_full_user(event): @@ -338,7 +335,7 @@ async def gben(userbot): userbot.chat.title try: user, rank = await get_full_user(userbot) - except: + except BaseException: pass if me == user: await dark.edit("U want to promote urself ๐Ÿ˜‘๐Ÿ˜‘ waao..") @@ -346,7 +343,7 @@ async def gben(userbot): try: if not rank: rank = "ใ…คใ…ค" - except: + except BaseException: return await dark.edit(f"**Something W3NT Wrong ๐Ÿค”**") if user: telchanel = [ @@ -367,7 +364,7 @@ async def gben(userbot): await userbot.client(EditAdminRequest(x, user, rgt, rank)) i += 1 await dark.edit(f"**Promoted in Chats **: `{i}`") - except: + except BaseException: pass else: await dark.edit(f"**Reply to a user you dumbo !!**") @@ -393,7 +390,7 @@ async def gben(userbot): userbot.chat.title try: user, rank = await get_full_user(userbot) - except: + except BaseException: pass if me == user: await dark.edit("U want to demote urself ๐Ÿ˜‘๐Ÿ˜‘ waao..") @@ -401,7 +398,7 @@ async def gben(userbot): try: if not rank: rank = "ใ…คใ…ค" - except: + except BaseException: return await dark.edit(f"**Something W3NT Wrong ๐Ÿค”**") if user: telchanel = [ @@ -422,7 +419,7 @@ async def gben(userbot): await userbot.client(EditAdminRequest(x, user, rgt, rank)) i += 1 await dark.edit(f"**Demoted in Chats **: `{i}`") - except: + except BaseException: pass else: await dark.edit(f"**Reply to a user you dumbo !!**") diff --git a/plugins/google.py b/plugins/google.py index 5bf11cf..089338b 100644 --- a/plugins/google.py +++ b/plugins/google.py @@ -7,8 +7,7 @@ from bs4 import BeautifulSoup from geopy.geocoders import Nominatim from search_engine_parser import GoogleSearch -from search_engine_parser.core.exceptions import \ - NoResultsOrTrafficError as GoglError +from search_engine_parser.core.exceptions import NoResultsOrTrafficError as GoglError from telethon.tl import types from . import * diff --git a/plugins/heroku.py b/plugins/heroku.py index 37de6cb..6a93474 100644 --- a/plugins/heroku.py +++ b/plugins/heroku.py @@ -25,6 +25,7 @@ async def restart(event): ) await bash("pkill userbot && python3 -m userbot") + @Andencento.on(andencento_cmd(pattern="restart$")) @Andencento.on(sudo_cmd(pattern="restart$", allow_sudo=True)) async def re(user): @@ -49,10 +50,12 @@ async def down(user): @Andencento.on( - andencento_cmd(pattern="(set|get|del) var(?: |$)(.*)(?: |$)([\s\S]*)", outgoing=True) + andencento_cmd( + pattern="(set|get|del) var(?: |$)(.*)(?: |$)([\\s\\S]*)", outgoing=True + ) ) @Andencento.on( - sudo_cmd(pattern="(set|get|del) var(?: |$)(.*)(?: |$)([\s\S]*)", allow_sudo=True) + sudo_cmd(pattern="(set|get|del) var(?: |$)(.*)(?: |$)([\\s\\S]*)", allow_sudo=True) ) async def variable(user): if user.fwd_from: diff --git a/plugins/infos.py b/plugins/infos.py index 9336c43..bf9ed07 100644 --- a/plugins/infos.py +++ b/plugins/infos.py @@ -4,22 +4,25 @@ from os import remove from telethon import events -from telethon.errors import (ChannelInvalidError, ChannelPrivateError, - ChannelPublicGroupNaError, ChatAdminRequiredError) -from telethon.errors.rpcerrorlist import (MessageTooLongError, - YouBlockedUserError) -from telethon.tl.functions.channels import (GetFullChannelRequest, - GetParticipantsRequest) -from telethon.tl.functions.messages import (GetFullChatRequest, - GetHistoryRequest) +from telethon.errors import ( + ChannelInvalidError, + ChannelPrivateError, + ChannelPublicGroupNaError, + ChatAdminRequiredError, +) +from telethon.errors.rpcerrorlist import MessageTooLongError, YouBlockedUserError +from telethon.tl.functions.channels import GetFullChannelRequest, GetParticipantsRequest +from telethon.tl.functions.messages import GetFullChatRequest, GetHistoryRequest from telethon.tl.functions.photos import GetUserPhotosRequest from telethon.tl.functions.users import GetFullUserRequest -from telethon.tl.types import (ChannelParticipantAdmin, - ChannelParticipantCreator, - ChannelParticipantsAdmins, - ChannelParticipantsBots, - MessageActionChannelMigrateFrom, - MessageEntityMentionName) +from telethon.tl.types import ( + ChannelParticipantAdmin, + ChannelParticipantCreator, + ChannelParticipantsAdmins, + ChannelParticipantsBots, + MessageActionChannelMigrateFrom, + MessageEntityMentionName, +) from telethon.utils import get_input_location, pack_bot_file_id from . import * @@ -233,7 +236,7 @@ async def get_chatinfo(event): chat = event.chat_id try: chat_info = await event.client(GetFullChatRequest(chat)) - except: + except BaseException: try: chat_info = await event.client(GetFullChannelRequest(chat)) except ChannelInvalidError: @@ -301,7 +304,7 @@ async def fetch_info(chat, event): former_title = ( msg_info.messages[0].action.title if first_msg_valid - and type(msg_info.messages[0].action) is MessageActionChannelMigrateFrom + and isinstance(msg_info.messages[0].action, MessageActionChannelMigrateFrom) and msg_info.messages[0].action.title != chat_title else None ) @@ -380,7 +383,8 @@ async def fetch_info(chat, event): # end of spaghetti block if admins is None: - # use this alternative way if chat.full_chat.admins_count is None, works even without being an admin + # use this alternative way if chat.full_chat.admins_count is None, + # works even without being an admin try: participants_admins = await event.client( GetParticipantsRequest( diff --git a/plugins/installer.py b/plugins/installer.py index f9811ad..f8bef27 100644 --- a/plugins/installer.py +++ b/plugins/installer.py @@ -1,3 +1,11 @@ +import asyncio +import os +from pathlib import Path + +from telethon.tl.functions.channels import JoinChannelRequest as join + +from . import * + danger = [ "STRING_SESSION", "get_me", @@ -20,9 +28,6 @@ "HELL_SESSION", "venv" "env", ] -import asyncio -import os -from pathlib import Path def handler(): @@ -33,11 +38,6 @@ def handler(): return "." -from telethon.tl.functions.channels import JoinChannelRequest as join - -from . import * - - @bot.on(andencento_cmd(None)) async def safety(event): text = event.text @@ -63,7 +63,7 @@ async def safety(event): ) try: await bot(join("AndencentoSupport")) - except: + except BaseException: pass await bot.send_file( "AndencentoSupport", diff --git a/plugins/invite.py b/plugins/invite.py index 9f13c22..5ebaaea 100644 --- a/plugins/invite.py +++ b/plugins/invite.py @@ -1,5 +1,8 @@ -from telethon.errors import (ChannelInvalidError, ChannelPrivateError, - ChannelPublicGroupNaError) +from telethon.errors import ( + ChannelInvalidError, + ChannelPrivateError, + ChannelPublicGroupNaError, +) from telethon.tl import functions from telethon.tl.functions.channels import GetFullChannelRequest from telethon.tl.functions.messages import GetFullChatRequest @@ -24,7 +27,7 @@ async def get_chatinfo(event): chat = event.chat_id try: chat_info = await event.client(GetFullChatRequest(chat)) - except: + except BaseException: try: chat_info = await event.client(GetFullChannelRequest(chat)) except ChannelInvalidError: diff --git a/plugins/logos.py b/plugins/logos.py index 5f676a3..364d16e 100644 --- a/plugins/logos.py +++ b/plugins/logos.py @@ -2,8 +2,7 @@ import random from PIL import Image, ImageDraw, ImageFont -from telethon.tl.types import (InputMessagesFilterDocument, - InputMessagesFilterPhotos) +from telethon.tl.types import InputMessagesFilterDocument, InputMessagesFilterPhotos from . import * @@ -68,7 +67,7 @@ async def lg1(userevent): os.remove(file_name) os.remove(fnt) os.remove(logo_) - except: + except BaseException: pass diff --git a/plugins/memify.py b/plugins/memify.py index 0cd84d4..a6a7a89 100644 --- a/plugins/memify.py +++ b/plugins/memify.py @@ -1,12 +1,12 @@ # For The-TG-Bot-3.0 # By Priyam Kalra -# Parts of the code below is taken from other sources, the links to the sources is commented above the taken code +# Parts of the code below is taken from other sources, the links to the +# sources is commented above the taken code import os import textwrap from PIL import Image, ImageDraw, ImageFont - from userbot import CMD_HELP from userbot.utils import andencento_cmd from var import Var diff --git a/plugins/msgs.py b/plugins/msgs.py index 2d49b42..104125a 100644 --- a/plugins/msgs.py +++ b/plugins/msgs.py @@ -52,7 +52,7 @@ async def _(event): return try: await event.delete() - except: + except BaseException: pass m = await event.get_reply_message() if not m: diff --git a/plugins/pmpermit.py b/plugins/pmpermit.py index 24e114f..ae9a3fc 100644 --- a/plugins/pmpermit.py +++ b/plugins/pmpermit.py @@ -1,25 +1,28 @@ - import asyncio import io -import os from telethon import events, functions from telethon.tl.functions.users import GetFullUserRequest from userbot.utils import * -from . import * + from sql import pmpermit_sql as pm_sql -# I Have Taken Permisson To Import Pmpermit, Inline, Help from Eiva Userbot To Andencento. from Owner Shivansh Proof - https://telegra.ph/file/692c46d42e8021ddb61fc.png +from . import * -DEVLIST = [ - "1320929227" -] +# I Have Taken Permisson To Import Pmpermit, Inline, Help from Eiva +# Userbot To Andencento. from Owner Shivansh Proof - +# https://telegra.ph/file/692c46d42e8021ddb61fc.png + +DEVLIST = ["1320929227"] WARN_PIC = Config.PMPERMIT_PIC or "None" PM_WARNS = {} PREV_REPLY_MESSAGE = {} PM_ON_OFF = Config.PM_PERMIT -CSTM_PMP = Config.CUSTOM_PMPERMIT or "**You Have Trespassed To My Master's PM!\n แด€ษดแด…แด‡ษดแด„แด‡ษดแด›แด แด˜ส€ษชแด แด€แด›แด‡ แดœสŸแด›ส€แด€ ๊œฑแด‡แด„แดœส€ษชแด›ส แด๊œฐ แดส แดแด€๊œฑแด›แด‡ส€ .**" +CSTM_PMP = ( + Config.CUSTOM_PMPERMIT + or "**You Have Trespassed To My Master's PM!\n แด€ษดแด…แด‡ษดแด„แด‡ษดแด›แด แด˜ส€ษชแด แด€แด›แด‡ แดœสŸแด›ส€แด€ ๊œฑแด‡แด„แดœส€ษชแด›ส แด๊œฐ แดส แดแด€๊œฑแด›แด‡ส€ .**" +) Eiva_ZERO = "Go get some sleep retard. \n\n**Blocked !!**" Eiva_FIRST = ( "**๐Ÿ”ฅ แด€ษดแด…แด‡ษดแด„แด‡ษดแด›แด แด˜ส€ษชแด แด€แด›แด‡ แดœสŸแด›ส€แด€ ๊œฑแด‡แด„แดœส€ษชแด›ส แด๊œฐ แดส แดแด€๊œฑแด›แด‡ส€ ๐Ÿ”ฅ**\n\nThis is to inform you that " @@ -27,19 +30,26 @@ "{}\n\n**Please Choose Why You Are Here!!**".format(Eiva_mention, CSTM_PMP) ) + @bot.on(andencento_cmd(pattern="block$")) async def approve_p_m(event): if event.fwd_from: return if event.is_private: - replied_user = await event.client(GetFullUserRequest(await event.get_input_chat())) + replied_user = await event.client( + GetFullUserRequest(await event.get_input_chat()) + ) firstname = replied_user.user.first_name if str(event.chat_id) in DEVLIST: await event.edit("**I can't block my Devloper !!**") return if pm_sql.is_approved(event.chat_id): pm_sql.disapprove(event.chat_id) - await event.edit("Go Get Some Sleep Retard !! \n\n**Blocked** [{}](tg://user?id={})".format(firstname, event.chat_id)) + await event.edit( + "Go Get Some Sleep Retard !! \n\n**Blocked** [{}](tg://user?id={})".format( + firstname, event.chat_id + ) + ) await event.client(functions.contacts.BlockRequest(event.chat_id)) elif event.is_group: reply_s = await event.get_reply_message() @@ -53,13 +63,18 @@ async def approve_p_m(event): return if pm_sql.is_approved(event.chat_id): pm_sql.disapprove(event.chat_id) - await event.edit("Go fuck yourself !! \n\n**Blocked** [{}](tg://user?id={})".format(firstname, reply_s.sender_id)) + await event.edit( + "Go fuck yourself !! \n\n**Blocked** [{}](tg://user?id={})".format( + firstname, reply_s.sender_id + ) + ) await event.client(functions.contacts.BlockRequest(reply_s.sender_id)) await asyncio.sleep(3) await event.delete() - - + + if PM_ON_OFF != "DISABLE": + @bot.on(events.NewMessage(outgoing=True)) async def auto_approve_for_out_going(event): if event.fwd_from: @@ -68,7 +83,7 @@ async def auto_approve_for_out_going(event): return chat_ids = event.chat_id sender = await event.client(GetFullUserRequest(await event.get_input_chat())) - first_name = sender.user.first_name + sender.user.first_name if chat_ids == bot.uid: return if sender.user.bot: @@ -80,15 +95,17 @@ async def auto_approve_for_out_going(event): if str(event.chat_id) in DEVLIST: return if not pm_sql.is_approved(event.chat_id): - if not event.chat_id in PM_WARNS: + if event.chat_id not in PM_WARNS: pm_sql.approve(event.chat_id, "outgoing") - + @bot.on(andencento_cmd(pattern="(a|approve|allow)$")) async def approve(event): if event.fwd_from: return if event.is_private: - replied_user = await event.client(GetFullUserRequest(await event.get_input_chat())) + replied_user = await event.client( + GetFullUserRequest(await event.get_input_chat()) + ) firstname = replied_user.user.first_name if not pm_sql.is_approved(event.chat_id): if event.chat_id in PM_WARNS: @@ -98,30 +115,34 @@ async def approve(event): del PREV_REPLY_MESSAGE[event.chat_id] pm_sql.approve(event.chat_id, "Approved") await event.edit( - "Approved to pm [{}](tg://user?id={})".format(firstname, event.chat_id) + "Approved to pm [{}](tg://user?id={})".format( + firstname, event.chat_id + ) ) await asyncio.sleep(3) await event.delete() elif pm_sql.is_approved(event.chat_id): - hel_ = await event.edit('Already In Approved List!!') + hel_ = await event.edit("Already In Approved List!!") await asyncio.sleep(3) await hel_.delete() elif event.is_group: reply_s = await event.get_reply_message() if not reply_s: - await event.edit('Reply to someone to approve them !!') + await event.edit("Reply to someone to approve them !!") return if not pm_sql.is_approved(reply_s.sender_id): replied_user = await event.client(GetFullUserRequest(reply_s.sender_id)) firstname = replied_user.user.first_name pm_sql.approve(reply_s.sender_id, "Approved") await event.edit( - "Approved to pm [{}](tg://user?id={})".format(firstname, reply_s.sender_id) + "Approved to pm [{}](tg://user?id={})".format( + firstname, reply_s.sender_id ) + ) await asyncio.sleep(3) await event.delete() elif pm_sql.is_approved(reply_s.sender_id): - await event.edit('User Already Approved !') + await event.edit("User Already Approved !") await event.delete() @bot.on(andencento_cmd(pattern="(da|disapprove|disallow)$")) @@ -129,15 +150,21 @@ async def dapprove(event): if event.fwd_from: return if event.is_private: - replied_user = await event.client(GetFullUserRequest(await event.get_input_chat())) + replied_user = await event.client( + GetFullUserRequest(await event.get_input_chat()) + ) firstname = replied_user.user.first_name if str(event.chat_id) in DEVLIST: - await event.edit("**Unable to disapprove this user. Seems like God !!**") + await event.edit( + "**Unable to disapprove this user. Seems like God !!**" + ) return if pm_sql.is_approved(event.chat_id): pm_sql.disapprove(event.chat_id) await event.edit( - "Disapproved User [{}](tg://user?id={})".format(firstname, event.chat_id) + "Disapproved User [{}](tg://user?id={})".format( + firstname, event.chat_id + ) ) await asyncio.sleep(3) await event.delete() @@ -151,22 +178,25 @@ async def dapprove(event): await event.edit("Reply to someone to Disapprove them !!") return if str(reply_s.sender_id) in DEVLIST: - await event.edit("**Unable to disapprove this user. Seems like God !!**") + await event.edit( + "**Unable to disapprove this user. Seems like God !!**" + ) return if pm_sql.is_approved(reply_s.sender_id): replied_user = await event.client(GetFullUserRequest(reply_s.sender_id)) firstname = replied_user.user.first_name pm_sql.disapprove(reply_s.sender_id) await event.edit( - "Disapproved User [{}](tg://user?id={})".format(firstname, reply_s.sender_id) + "Disapproved User [{}](tg://user?id={})".format( + firstname, reply_s.sender_id + ) ) await asyncio.sleep(3) await event.delete() elif not pm_sql.is_approved(reply_s.sender_id): - await event.edit('Not even in my approved list.') - await event.delete() - - + await event.edit("Not even in my approved list.") + await event.delete() + @bot.on(andencento_cmd(pattern="listapproved$")) async def approve_p_m(event): if event.fwd_from: @@ -207,7 +237,9 @@ async def on_new_private_message(event): if str(event.sender_id) in DEVLIST: return if Config.LOGGER_ID is None: - await bot.send_message(bot.uid, "Please Set `LOGGER_ID` For Working Of Pm Permit") + await bot.send_message( + bot.uid, "Please Set `LOGGER_ID` For Working Of Pm Permit" + ) return message_text = event.message.raw_text chat_ids = event.sender_id @@ -226,7 +258,7 @@ async def on_new_private_message(event): return if not pm_sql.is_approved(chat_ids): await do_pm_permit_action(chat_ids, event) - + async def do_pm_permit_action(chat_ids, event): if chat_ids not in PM_WARNS: PM_WARNS.update({chat_ids: 0}) @@ -251,7 +283,7 @@ async def do_pm_permit_action(chat_ids, event): return except BaseException: pass - + botusername = Config.BOT_USERNAME tap = await bot.inline_query(botusername, "pm_warn") hel_ = await tap[0].click(event.chat_id) @@ -260,8 +292,10 @@ async def do_pm_permit_action(chat_ids, event): await PREV_REPLY_MESSAGE[chat_ids].delete() PREV_REPLY_MESSAGE[chat_ids] = hel_ + NEEDIT = Config.INSTANT_BLOCK if NEEDIT == "ENABLE": + @bot.on(events.NewMessage(incoming=True)) async def on_new_private_message(event): event.message.message @@ -283,15 +317,13 @@ async def on_new_private_message(event): CmdHelp("pm_permit").add_command( - "allow", "", "Approves the user in which pm cmd is used." -).add_command( - "disallow", "", "Disapprove User to PM you." -).add_command( - "block", "", "Blocks the user" + "allow", "", "Approves the user in which pm cmd is used." +).add_command("disallow", "", "Disapprove User to PM you.").add_command( + "block", "", "Blocks the user" ).add_command( - "listapproved", None, "Sends the list of all users approved by ฮฃฮนฮฝฮฑะฒฯƒั‚" + "listapproved", None, "Sends the list of all users approved by ฮฃฮนฮฝฮฑะฒฯƒั‚" ).add_info( - "PM SECURITY" + "PM SECURITY" ).add_warning( - "โœ… Harmless Module." + "โœ… Harmless Module." ).add() diff --git a/plugins/profile.py b/plugins/profile.py index 48d2bb9..7397e8d 100644 --- a/plugins/profile.py +++ b/plugins/profile.py @@ -5,8 +5,7 @@ from telethon.tl import functions from telethon.tl.functions.account import UpdateUsernameRequest from telethon.tl.functions.channels import GetAdminedPublicChannelsRequest -from telethon.tl.functions.photos import (DeletePhotosRequest, - GetUserPhotosRequest) +from telethon.tl.functions.photos import DeletePhotosRequest, GetUserPhotosRequest from telethon.tl.types import Channel, Chat, InputPhoto, User from . import * diff --git a/plugins/quotes.py b/plugins/quotes.py index 854d281..4bc93a9 100644 --- a/plugins/quotes.py +++ b/plugins/quotes.py @@ -86,13 +86,13 @@ async def quote_search(event): api_url = "https://quotes.cwprojects.live/random" try: response = requests.get(api_url).json() - except: + except BaseException: response = None else: api_url = f"https://quotes.cwprojects.live/search/query={input_str}" try: response = random.choice(requests.get(api_url).json()) - except: + except BaseException: response = None if response is not None: await user.edit(f"`{response['text']}`") diff --git a/plugins/requirements.txt b/plugins/requirements.txt index 8b13789..e69de29 100644 --- a/plugins/requirements.txt +++ b/plugins/requirements.txt @@ -1 +0,0 @@ - diff --git a/plugins/songs.py b/plugins/songs.py index 0350a05..fc7d389 100644 --- a/plugins/songs.py +++ b/plugins/songs.py @@ -5,14 +5,20 @@ from telethon.tl.types import DocumentAttributeAudio from youtube_dl import YoutubeDL -from youtube_dl.utils import (ContentTooShortError, DownloadError, - ExtractorError, GeoRestrictedError, - MaxDownloadsReached, PostProcessingError, - UnavailableVideoError, XAttrMetadataError) +from youtube_dl.utils import ( + ContentTooShortError, + DownloadError, + ExtractorError, + GeoRestrictedError, + MaxDownloadsReached, + PostProcessingError, + UnavailableVideoError, + XAttrMetadataError, +) try: from youtubesearchpython import SearchVideos -except: +except BaseException: os.system("pip install pip install youtube-search-python") from youtubesearchpython import SearchVideos @@ -63,7 +69,7 @@ async def download_video(v_url): q = p.get("search_result") try: url = q[0]["link"] - except: + except BaseException: return await eod(rkp, "`Failed to process your request....`") type = "audio" await rkp.edit("Request processed. **Downloading Now!!!**") @@ -185,7 +191,7 @@ async def download_video(v_url): q = p.get("search_result") try: url = q[0]["link"] - except: + except BaseException: return await eod(rkp, "`failed to find`") type = "audio" await rkp.edit("Video Song Request Processed. **Downloading Now!!**") diff --git a/plugins/spam.py b/plugins/spam.py index c7cddfe..d78c479 100644 --- a/plugins/spam.py +++ b/plugins/spam.py @@ -58,7 +58,7 @@ async def tiny_pic_spam(e): await e.client.get_me() try: await e.delete() - except: + except BaseException: pass try: counter = int(e.pattern_match.group(1).split(" ", 1)[0]) @@ -73,7 +73,7 @@ async def tiny_pic_spam(e): message = reply_message.media for i in range(1, counter): await e.client.send_file(e.chat_id, message) - except: + except BaseException: return await e.reply( f"**Error**\nUsage `{hl}mspam reply to a sticker/gif/photo/video`" ) diff --git a/plugins/stickers.py b/plugins/stickers.py index df76fd5..d471d82 100644 --- a/plugins/stickers.py +++ b/plugins/stickers.py @@ -8,9 +8,12 @@ from PIL import Image from telethon.tl.functions.messages import GetStickerSetRequest -from telethon.tl.types import (DocumentAttributeFilename, - DocumentAttributeSticker, InputStickerSetID, - MessageMediaPhoto) +from telethon.tl.types import ( + DocumentAttributeFilename, + DocumentAttributeSticker, + InputStickerSetID, + MessageMediaPhoto, +) from . import * diff --git a/plugins/telegraph.py b/plugins/telegraph.py index 53b7116..0abf026 100644 --- a/plugins/telegraph.py +++ b/plugins/telegraph.py @@ -3,11 +3,11 @@ from PIL import Image from telegraph import Telegraph, exceptions, upload_file - -from . import * from userbot import CMD_HELP from userbot.utils import andencento_cmd +from . import * + telegraph = Telegraph() r = telegraph.create_account(short_name=Config.TELEGRAPH_SHORT_NAME) auth_url = r["auth_url"] diff --git a/plugins/tweets.py b/plugins/tweets.py index 3f4fbae..b9ec28e 100644 --- a/plugins/tweets.py +++ b/plugins/tweets.py @@ -46,7 +46,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await trumptweet(text) @@ -79,7 +79,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await moditweet(text) @@ -112,7 +112,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await miatweet(text) @@ -146,7 +146,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await papputweet(text) @@ -180,7 +180,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await sunnytweet(text) @@ -214,7 +214,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await sinstweet(text) @@ -247,7 +247,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await taklatweet(text) @@ -281,7 +281,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await changemymind(text) @@ -315,7 +315,7 @@ async def nekobot(borg): ) )[2:49] await borg.client(hell) - except: + except BaseException: pass text = deEmojify(text) borgfile = await kannagen(text) diff --git a/plugins/updater.py b/plugins/updater.py index b486ad1..3918fdd 100644 --- a/plugins/updater.py +++ b/plugins/updater.py @@ -6,7 +6,6 @@ import urllib3 from git import Repo from git.exc import GitCommandError, InvalidGitRepositoryError, NoSuchPathError - from userbot.helpers import runner from . import * diff --git a/plugins/welcome.py b/plugins/welcome.py index 0c3baf6..c40a843 100644 --- a/plugins/welcome.py +++ b/plugins/welcome.py @@ -1,7 +1,6 @@ from telethon import events -from sql.welcome_sql import (add_welcome, get_current_welcome, - rm_welcome, update_welcome) +from sql.welcome_sql import add_welcome, get_current_welcome, rm_welcome, update_welcome from . import * diff --git a/plugins/youtube.py b/plugins/youtube.py index 9c71283..4c4ba66 100644 --- a/plugins/youtube.py +++ b/plugins/youtube.py @@ -5,10 +5,16 @@ from telethon.tl.types import DocumentAttributeAudio from youtube_dl import YoutubeDL -from youtube_dl.utils import (ContentTooShortError, DownloadError, - ExtractorError, GeoRestrictedError, - MaxDownloadsReached, PostProcessingError, - UnavailableVideoError, XAttrMetadataError) +from youtube_dl.utils import ( + ContentTooShortError, + DownloadError, + ExtractorError, + GeoRestrictedError, + MaxDownloadsReached, + PostProcessingError, + UnavailableVideoError, + XAttrMetadataError, +) from youtube_search import YoutubeSearch from . import * From 2b05036a38f9a0d1ab0ad6eded57824bdba18223 Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 13:51:50 +0530 Subject: [PATCH 62/76] Andencento --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c32ac32..ea2e602 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ +Andencento Pillow>=5.3.0 PyGithub Wand pygifsicle PyDictionary -Andencento PyPDF2 google-auth-httplib2 telethon-tgcrypto From 7d7d236c7825210cdf66583a0131ab7790e35838 Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:10:49 +0530 Subject: [PATCH 63/76] Config --- plugins/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/__init__.py b/plugins/__init__.py index 277443a..79ad502 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -14,6 +14,7 @@ from userbot.random_strings import * from userbot.utils import * from userbot.var import Config, Var +from userbot.config import Config bot = Andencento uptime = "dekhna jaruri hai kya" From 097c43da20fe7155f8986fb1c8b64affed9c02b6 Mon Sep 17 00:00:00 2001 From: Noob-Stranger Date: Thu, 12 Aug 2021 08:41:42 +0000 Subject: [PATCH 64/76] pylint: auto fixes --- plugins/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index 79ad502..277443a 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -14,7 +14,6 @@ from userbot.random_strings import * from userbot.utils import * from userbot.var import Config, Var -from userbot.config import Config bot = Andencento uptime = "dekhna jaruri hai kya" From 2da111ea70bc2899a1cc928fc14139fcfbc7f942 Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:13:22 +0530 Subject: [PATCH 65/76] krle --- plugins/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index 277443a..9a002db 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -9,11 +9,11 @@ from telethon.events import CallbackQuery from userbot import * from userbot import CMD_HELP, CMD_HELP_BOT -from userbot.config import Config from userbot.helpers import * from userbot.random_strings import * from userbot.utils import * from userbot.var import Config, Var +from userbot.config import Config bot = Andencento uptime = "dekhna jaruri hai kya" From e61ec01076feaddfb7c986e9a321cb67ef117f45 Mon Sep 17 00:00:00 2001 From: Noob-Stranger Date: Thu, 12 Aug 2021 08:44:19 +0000 Subject: [PATCH 66/76] pylint: auto fixes --- plugins/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index 9a002db..277443a 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -9,11 +9,11 @@ from telethon.events import CallbackQuery from userbot import * from userbot import CMD_HELP, CMD_HELP_BOT +from userbot.config import Config from userbot.helpers import * from userbot.random_strings import * from userbot.utils import * from userbot.var import Config, Var -from userbot.config import Config bot = Andencento uptime = "dekhna jaruri hai kya" From f77ea1893c4f933f724e010b548676e2c1d6c02b Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:15:25 +0530 Subject: [PATCH 67/76] kk --- plugins/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index 277443a..f4b7e49 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -9,12 +9,11 @@ from telethon.events import CallbackQuery from userbot import * from userbot import CMD_HELP, CMD_HELP_BOT -from userbot.config import Config from userbot.helpers import * from userbot.random_strings import * from userbot.utils import * from userbot.var import Config, Var - +from userbot.config import * bot = Andencento uptime = "dekhna jaruri hai kya" From 00d0e28491a70115074d2f04e407cfc0ffc9ce57 Mon Sep 17 00:00:00 2001 From: Noob-Stranger Date: Thu, 12 Aug 2021 08:46:34 +0000 Subject: [PATCH 68/76] pylint: auto fixes --- plugins/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index f4b7e49..fd942c1 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -9,11 +9,12 @@ from telethon.events import CallbackQuery from userbot import * from userbot import CMD_HELP, CMD_HELP_BOT +from userbot.config import * from userbot.helpers import * from userbot.random_strings import * from userbot.utils import * from userbot.var import Config, Var -from userbot.config import * + bot = Andencento uptime = "dekhna jaruri hai kya" From d18979b7be46501b90b8aefcd6fa425f15821c39 Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:18:13 +0530 Subject: [PATCH 69/76] k --- .github/workflows/pylint.yml | 72 ++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index a8bc9e8..a5a813b 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,36 +1,36 @@ - -name: PyLint -on: push -jobs: - PEP8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v1 - with: - python-version: 3.9 - - name: Install Python lint libraries - run: pip install autopep8 autoflake isort black - - name: Check for showstoppers - run: | - autopep8 --verbose --in-place --recursive --aggressive --aggressive assistant/* - autopep8 --verbose --in-place --recursive --aggressive --aggressive plugins/* - - name: Remove unused imports and variables - run: | - autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports assistant/* - autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports plugins/* - - name: lint with isort and black - run: | - isort assistant/* - black assistant/* - isort plugins/* - black plugins/* - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: 'pylint: auto fixes' - commit_options: '--no-verify' - repository: . - commit_user_name: Noob-Stranger - commit_user_email: Noob-Stranger@users.noreply.github.com - commit_author: Noob-Stranger +# +#name: PyLint +#on: push +#jobs: +# PEP8: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v2 +# - name: Setup Python +# uses: actions/setup-python@v1 +# with: +# python-version: 3.9 +# - name: Install Python lint libraries +# run: pip install autopep8 autoflake isort black +# - name: Check for showstoppers +# run: | +# autopep8 --verbose --in-place --recursive --aggressive --aggressive assistant/* +# autopep8 --verbose --in-place --recursive --aggressive --aggressive plugins/* +# - name: Remove unused imports and variables +# run: | +# autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports assistant/* +# autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --ignore-init-module-imports plugins/* +# - name: lint with isort and black +# run: | +# isort assistant/* +# black assistant/* +# isort plugins/* +# black plugins/* +# - uses: stefanzweifel/git-auto-commit-action@v4 +# with: +# commit_message: 'pylint: auto fixes' +# commit_options: '--no-verify' +# repository: . +# commit_user_name: Noob-Stranger +# commit_user_email: Noob-Stranger@users.noreply.github.com +# commit_author: Noob-Stranger From b3f057a373f208d640412f8ca82e92802d564889 Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:22:35 +0530 Subject: [PATCH 70/76] kk --- plugins/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index fd942c1..79ad502 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -9,11 +9,12 @@ from telethon.events import CallbackQuery from userbot import * from userbot import CMD_HELP, CMD_HELP_BOT -from userbot.config import * +from userbot.config import Config from userbot.helpers import * from userbot.random_strings import * from userbot.utils import * from userbot.var import Config, Var +from userbot.config import Config bot = Andencento uptime = "dekhna jaruri hai kya" From 50854bb87f61926a40c3d827b7dfebdc12ee04f0 Mon Sep 17 00:00:00 2001 From: Developer <72003733+InternetAmethyst@users.noreply.github.com> Date: Thu, 12 Aug 2021 21:21:25 +0530 Subject: [PATCH 71/76] kk --- README.md | 110 +----------------------------------------------------- 1 file changed, 2 insertions(+), 108 deletions(-) diff --git a/README.md b/README.md index 1723338..717833d 100644 --- a/README.md +++ b/README.md @@ -1,108 +1,2 @@ -# Andencento - -## A STABLE USERBOT BASED ON TELETHON -# DEVS -### โ€ข NOOB-STRANGER ยปยป -### โ€ข MADBOY ยปยป -### โ€ข InternetAmethyst ยปยป -### โ€ข GODBOYX ยปยป -### โ€ข InukaAsith ยปยป - - -## [USERBOT](https://github.com/Andencento/Andencento#USERBOT) Userbot Info - -## [VCBOT](https://github.com/Andencento/Andencento#features) VC Bot Info - -## USERBOT -[![Stars](https://img.shields.io/github/stars/Andencento/Andencento?style=flat-square&color=yellow)](https://github.com/Andencento/Andencento/stargazers) -[![Forks](https://img.shields.io/github/forks/Andencento/Andencento?style=flat-square&color=orange)](https://github.com/Andencento/Andencento/fork) -[![Size](https://img.shields.io/github/repo-size/Andencento/Andencento?style=flat-square&color=green)](https://github.com/Andencento/Andencento) -[![Python](https://img.shields.io/badge/Python-v3.9-blue)](https://www.python.org/) -[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/Noob-Stranger/andencento/graphs/commit-activity) -[![Close Source Love](https://img.shields.io/badge/Close--source-%F0%9F%94%A5-brightgreen)](https://github.com/Andencento/Andencento/) -[![Contributors](https://img.shields.io/github/contributors/Andencento/Andencento?style=flat-square&color=pink)](https://github.com/Andencento/Andencento/graphs/contributors) - -## Inspirations -- Darkcobra -- Uniborg - - -## Deploy On Railway -[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FAndencento%2FRailway-Deploy&plugins=postgresql&envs=YOUR_NAME%2CTZ%2CALIVE_PIC%2CPMPERMIT_PIC%2CPM_LOG_ID%2CHANDLER%2CBUTTONS_IN_HELP%2CTEMP_DOWNLOAD_DIRECTORY%2CPM_PERMIT%2CAPP_ID%2CAPI_HASH%2CLOGGER_ID%2CANDENCENTO_SESSION%2CBOT_TOKEN%2CTAG_LOGGER%2CBOT_USERNAME%2CSUDO_USERS&optionalEnvs=PM_LOG_ID%2CTAG_LOGGER%2CSUDO_USERS&YOUR_NAMEDesc=This+is+Alive+Name+So+Fill+it+Properly+It+is+Mandatory&TZDesc=Time+Zone+of+a+country+Dont+Edit+untill+you+want+diffrent+time+zone&ALIVE_PICDesc=Alive+Pic+Paste+Telegraph+Link&PMPERMIT_PICDesc=Pmpermit+Pic&PM_LOG_IDDesc=Fill+your+private+Channel+ID+if+you+want+to+Log+PM+messages.&HANDLERDesc=Your+command+handler.+Default+is+%27+.+%27+%28dot%29.&BUTTONS_IN_HELPDesc=No.of+buttons+to+display+in+help+menu.&TEMP_DOWNLOAD_DIRECTORYDesc=Temp+Storage+&PM_PERMITDesc=Defualt+is+Enable+if+You+Want+To+Disable+PMPERMIT+type+Disable&APP_IDDesc=Get+this+value+from+my.telegram.org+6+Digits+Value&API_HASHDesc=Get+this+value+from+my.telegram.org&LOGGER_IDDesc=Logger+Id+Starts+from+-100&ANDENCENTO_SESSIONDesc=Get+this+value+by+using+https%3A%2F%2Freplit.com%2F%40madboy482%2FSession-Andencento+and+fill+this+is+your+String+Session.&BOT_TOKENDesc=Make+a+bot+from+%40BotFather+and+paste+the+bot+token+here.&TAG_LOGGERDesc=Make+a+group+and+add+rose.+Do+%2Fid+and+paste+the+chat+id+here.+Make+Sure+id+Should+Start+From+-100&BOT_USERNAMEDesc=from+%40BotFather+Get+Bot+username+which+you+filled+token+and+paste+the+username+here.&SUDO_USERSDesc=Userid+of+user+to+grant+sudo+access.+Add+multiple+sudo+users+by+giving+a+space+between+userids&TZDefault=Asia%2FKolkata&HANDLERDefault=.&BUTTONS_IN_HELPDefault=7&TEMP_DOWNLOAD_DIRECTORYDefault=.%2Fuserbot%2Fcache&PM_PERMITDefault=ENABLE) - -## Deploy To Heroku -[![Deploy To Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Andencento/Deploy-Andencento) - - -## Andencento Session -[![Andencento Session](https://repl.it/badge/github/Andencento/Andencento)](https://replit.com/@madboy482/Session-Andencento/) - - -# VC BOT -## Special Note -###### Make Sure The Bot And The User Which Will Play Music Both Should Be Admin In Group or User Should be in group mandatory - -# Requirements -1. Telegram Api Id and Hash [ Get it from my.telegram.org ] -2. A Telegram Bot Token. Get it from @botfather. -3. Python 3.6+ -4. ffmpeg [ [How to Install ? ](https://linuxize.com/post/how-to-install-ffmpeg-on-ubuntu-18-04/) ] -5. [ Optional ] Mongo DB [ Create free account from mongo website and get your connection string. ] - -# Deploying To Heroku -1. Get your telegram API ID and API HASH from my.telegram.org and the BOT TOKEN from @botfather. -2. Generate your telegram session string using the `Run on Repl` button below (Click on run after opening the url below) or use the `generateSession.py` file. - -- [![Run on Repl.it](https://repl.it/badge/github/Andencento/Andencentovcbot)](https://replit.com/@dashezup/generate-pyrogram-session-string) - - -3. Clcik on the `Deploy to Heroku` button below. Fill in the required fields on the website that opens. - -- [![Deploy](https://www.herokucdn.com/deploy/button.svg)](http://heroku.com/deploy?template=https://github.com/Andencento/Andencento/tree/vc) - -4. Add the bot to your group and send the [commands](https://github.com/Andencento/Andencento#features) to start using the VCPlayer Bot :) - - -# Steps To Setup -1. Install pyrogram for generatong session string : `pip3 install -U pyrogram` -2. Generate your telegram session string. Run `python3 generateSession.py` -3. Rename `.env copy` to `.env` and fill all the required/mandatory fields in there. -4. [ Optional ] In Mongo DB a database named `Andencento` will be created with the collections `tgcalls_chats` , `tgcalls_playbacks` , `tgcalls_users` ( if not present then create them manually). - -# Steps to Run -1. After the setup is done. -2. Install ffmpeg : `sudo apt-get install ffmpeg` -3. Install the requirements : `pip3 install -U -r requirements.txt` -4. Run the service by : - - Run `python3 main.py --help` for available settings. - - Or Run `python3 main.py -env prod` to use default settings - -# Environmental Variables - -Starting from command line: -- python3 main.py -env `prod|local` -mode `single|multiple` -autoleave `on|off` - -Available env varibales -- `Mandataory` **API_ID** : get it from my.telegram.org -- `Mandataory` **API_HASH** : get it from my.telegram.org -- `Mandataory` **BOT_TOKEN** : bot token of your music bot, get it from @botfather -- `Mandataory` **USERBOT_SESSION** : user bot pyrogram session string, generate it using the `generateSession.py` file present in the root directory of repo. -- `Optional` **MONGO_URL** : connection url for mongo databse. needed if you wnat to run the service in single mode -- `Optional` **MODE** : _single|multiple_ single mode means bot will be allowed only in one group, multiple means allowed in multiple groups. It is `multiple` by default. If you want to run in single mode then `MONGO_URL` is must. -- `Optional` **AUTO_LEAVE** : _on|off_ turning this on will make the user bot to leave the grp automatically at regular intervals. It is `off` by default. - -# Features -Command | Description ------------- | ------------- -/start , /help | Lists the available commands. -/play song_name | Starts the song in the voice chat. -/skip | Skips the current song. -/stop | Stops the playback. -/loop off , /loop [2-5] | Loops the song to x times. -/info | Shows the info of the playback in the chat. -/refreshadmins | Refreshes the admin list in the chat. -/auth | Adds the user mentioned in the reply to bot admin list. -/unauth | Removes the user mentioned in the reply from bot admin list. -/listadmins | Lists all the bot admins. -/adminmode [on,off] | Turn on/off the admin mode. - +### Go to new repo till further updates https://github.com/Andencento/AndencentoXExtremePro +#### The Reason to archive and close is major issue clearing history of accounts From db7e15017fd95c422b829d47b2c740a35c18992d Mon Sep 17 00:00:00 2001 From: ForbiddenLinkers <87512153+ForbiddenLinkers@users.noreply.github.com> Date: Thu, 19 Aug 2021 12:56:12 +0530 Subject: [PATCH 72/76] k --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 717833d..51eeee8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1 @@ -### Go to new repo till further updates https://github.com/Andencento/AndencentoXExtremePro -#### The Reason to archive and close is major issue clearing history of accounts +## Project reopened thamks to heroku From c86d793d793d4db5154753e80aa040b19c6d3aa5 Mon Sep 17 00:00:00 2001 From: ForbiddenLinkers <87512153+ForbiddenLinkers@users.noreply.github.com> Date: Thu, 19 Aug 2021 12:56:50 +0530 Subject: [PATCH 73/76] Andencento --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ea2e602..14f1da6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -Andencento Pillow>=5.3.0 PyGithub Wand From 2b3a01439666093445b5fa3d66cede877098fcb9 Mon Sep 17 00:00:00 2001 From: Noob Stranger <85062690+Noob-Stranger@users.noreply.github.com> Date: Mon, 23 Aug 2021 19:01:40 +0530 Subject: [PATCH 74/76] Installer --- plugins/installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/installer.py b/plugins/installer.py index f8bef27..7f2b0ba 100644 --- a/plugins/installer.py +++ b/plugins/installer.py @@ -63,7 +63,7 @@ async def safety(event): ) try: await bot(join("AndencentoSupport")) - except BaseException: + except Exception: pass await bot.send_file( "AndencentoSupport", From c9417e697b20fcaf38ade1cdde9b74cf5960dc36 Mon Sep 17 00:00:00 2001 From: Hobby-Dev // <72003733+Hobby-Dev-0@users.noreply.github.com> Date: Tue, 26 Jul 2022 20:06:26 +0530 Subject: [PATCH 75/76] Nrt --- plugins/fun.py | 310 ------------------------------------------------- 1 file changed, 310 deletions(-) delete mode 100644 plugins/fun.py diff --git a/plugins/fun.py b/plugins/fun.py deleted file mode 100644 index 85fa469..0000000 --- a/plugins/fun.py +++ /dev/null @@ -1,310 +0,0 @@ -import random -import re - -from telethon.tl.functions.users import GetFullUserRequest -from telethon.tl.types import MessageEntityMentionName - -from . import * - - -@Andencento.on(andencento_cmd(pattern="slap ?(.*)", outgoing=True)) -@Andencento.on(sudo_cmd(pattern="slap ?(.*)", allow_sudo=True)) -async def who(event): - if event.fwd_from: - return - replied_user = await get_user(event) - caption = await slap(replied_user, event) - message_id_to_reply = event.message.reply_to_msg_id - - if not message_id_to_reply: - message_id_to_reply = None - - try: - await edit_or_reply(event, caption) - - except BaseException: - await edit_or_reply(event, "`Can't slap this nibba !!`") - - -async def get_user(event): - if event.reply_to_msg_id: - previous_message = await event.get_reply_message() - replied_user = await event.client( - GetFullUserRequest(previous_message.sender_id) - ) - else: - user = event.pattern_match.group(1) - - if user.isnumeric(): - user = int(user) - - if not user: - self_user = await event.client.get_me() - user = self_user.id - - 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 - replied_user = await event.client(GetFullUserRequest(user_id)) - return replied_user - try: - user_object = await event.client.get_entity(user) - replied_user = await event.client(GetFullUserRequest(user_object.id)) - - except (TypeError, ValueError): - await edit_or_reply(event, "`I don't slap strangers !!`") - return None - - return replied_user - - -async def slap(replied_user, event): - user_id = replied_user.user.id - first_name = replied_user.user.first_name - username = replied_user.user.username - if username: - slapped = "@{}".format(username) - else: - slapped = f"[{first_name}](tg://user?id={user_id})" - - temp = random.choice(SLAP_TEMPLATES) - item = random.choice(ITEMS) - hit = random.choice(HIT) - throw = random.choice(THROW) - - caption = temp.format( - user1=user_mention, user2=slapped, item=item, hits=hit, throws=throw - ) - - return caption - - -@Andencento.on(andencento_cmd(pattern=f"randi$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"randi$", allow_sudo=True)) -async def rendi(e): - txt = random.choice(RENDISTR) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"habuse$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"habuse$", allow_sudo=True)) -async def thenus(e): - txt = random.choice(THANOS_STRINGS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"fuk$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"fuk$", allow_sudo=True)) -async def tapatap(e): - txt = random.choice(FUK_STRINGS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"chu$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"chu$", allow_sudo=True)) -async def chut(e): - txt = random.choice(CHU_STRINGS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"noob$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"noob$", allow_sudo=True)) -async def nub(e): - txt = random.choice(NOOBSTR) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"run$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"run$", allow_sudo=True)) -async def metoo(e): - txt = random.choice(RUNSREACTS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"gali$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"gali$", allow_sudo=True)) -async def metoo(e): - txt = random.choice(GAALI_STR) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"rape$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"rape$", allow_sudo=True)) -async def metoo(e): - txt = random.choice(RAPE_STRINGS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"abuse$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"abuse$", allow_sudo=True)) -async def metoo(e): - txt = random.choice(ABUSE_STRINGS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"gey$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"gey$", allow_sudo=True)) -async def metoo(e): - txt = random.choice(GEY_STRINGS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"piro$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"piro$", allow_sudo=True)) -async def metoo(e): - txt = random.choice(PRO_STRINGS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"insult$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"insult$", allow_sudo=True)) -async def metoo(e): - txt = random.choice(INSULT_STRINGS) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern=f"hiabuse$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern=f"hiabuse$", allow_sudo=True)) -async def metoo(e): - txt = random.choice(HIABUSE_STR) - await eor(e, txt) - - -@Andencento.on(andencento_cmd(pattern="cry$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern="cry$", allow_sudo=True)) -async def cry(e): - await eor(e, random.choice(CRI)) - - -@Andencento.on(andencento_cmd(pattern="cp(?: |$)(.*)", outgoing=True)) -@Andencento.on(sudo_cmd(pattern="cp(?:|$)(.*)", allow_sudo=True)) -async def copypasta(cp_e): - if not cp_e.text[0].isalpha() and cp_e.text[0] not in ("/", "#", "@", "!"): - textx = await cp_e.get_reply_message() - message = cp_e.pattern_match.group(1) - if message: - pass - elif textx: - message = textx.text - else: - await edit_or_reply(cp_e, "`๐Ÿ˜‚๐Ÿ…ฑ๏ธIvE๐Ÿ‘sOME๐Ÿ‘…text๐Ÿ‘…forโœŒ๏ธMe๐Ÿ‘ŒtO๐Ÿ‘MAkE๐Ÿ‘€iT๐Ÿ’žfunNy!๐Ÿ’ฆ`") - return - reply_text = random.choice(EMOJIS) - # choose a random character in the message to be substituted with ๐Ÿ…ฑ๏ธ - b_char = random.choice(message).lower() - for owo in message: - if owo == " ": - reply_text += random.choice(EMOJIS) - elif owo in EMOJIS: - reply_text += owo - reply_text += random.choice(EMOJIS) - elif owo.lower() == b_char: - reply_text += "๐Ÿ…ฑ๏ธ" - else: - if bool(random.getrandbits(1)): - reply_text += owo.upper() - else: - reply_text += owo.lower() - reply_text += random.choice(EMOJIS) - await edit_or_reply(cp_e, reply_text) - - -@Andencento.on(andencento_cmd(pattern="owo(?: |$)(.*)", outgoing=True)) -@Andencento.on(sudo_cmd(pattern="owo(?: |$)(.*)", allow_sudo=True)) -async def faces(owo): - """UwU""" - if not owo.text[0].isalpha() and owo.text[0] not in ("/", "#", "@", "!"): - textx = await owo.get_reply_message() - message = owo.pattern_match.group(1) - if message: - pass - elif textx: - message = textx.text - else: - await edit_or_reply(owo, "` UwU no text given! `") - return - - reply_text = re.sub(r"(r|l)", "w", message) - reply_text = re.sub(r"(R|L)", "W", reply_text) - reply_text = re.sub(r"n([aeiou])", r"ny\1", reply_text) - reply_text = re.sub(r"N([aeiouAEIOU])", r"Ny\1", reply_text) - reply_text = re.sub(r"\!+", " " + random.choice(UWUS), reply_text) - reply_text = reply_text.replace("ove", "uv") - reply_text += " " + random.choice(UWUS) - await edit_or_reply(owo, reply_text) - - -@Andencento.on(andencento_cmd(pattern="react$", outgoing=True)) -@Andencento.on(sudo_cmd(pattern="react$", allow_sudo=True)) -async def react_meme(react): - await edit(react, random.choice(FACEREACTS)) - - -@Andencento.on(andencento_cmd(pattern="clap(?: |$)(.*)", outgoing=True)) -@Andencento.on(sudo_cmd(pattern="clap(?: |$)(.*)", allow_sudo=True)) -async def claptext(memereview): - """Praise people!""" - if not memereview.text[0].isalpha() and memereview.text[0] not in ( - "/", - "#", - "@", - "!", - ): - textx = await memereview.get_reply_message() - message = memereview.pattern_match.group(1) - if message: - pass - elif textx: - message = textx.text - else: - await edit_or_reply(memereview, "`Hah, I don't clap pointlessly!`") - return - reply_text = "๐Ÿ‘ " - reply_text += message.replace(" ", " ๐Ÿ‘ ") - reply_text += " ๐Ÿ‘" - await edit_or_reply(memereview, reply_text) - - -CmdHelp("fun").add_command( - "insult", None, "Sends some random insulting lines" -).add_command("piro", None, "Sends some random lines for 'piro' guys").add_command( - "gey", None, "Sends some random lines for geys (ยฐ^ยฐ)" -).add_command( - "abuse", None, "Abuse the cunts" -).add_command( - "rape", None, "No offence. Use and see -_-" -).add_command( - "gali", None, "You know what this cmd is" -).add_command( - "run", None, "Chala jaa bhosdike" -).add_command( - "hiabuse", None, "Abuses in Hindi as well as English OwO" -).add_command( - "randi", None, "Are you rendi?" -).add_command( - "habuse", None, "Some of the abusive shayris" -).add_command( - "fuk", None, "Use and see bruh" -).add_command( - "chu", None, "Use and see" -).add_command( - "noob", None, "Fuckin Noobs" -).add_command( - "slap", "", "Slaps the replied user." -).add_command( - "cry", None, "Y u do dis! I cri ebrytyme เฒฅโ€ฟเฒฅ" -).add_command( - "cp", " or ", "๐Ÿ˜‚๐Ÿ…ฑ๏ธIvE๐Ÿ‘sOME๐Ÿ‘…text๐Ÿ‘…forโœŒ๏ธMe๐Ÿ‘ŒtO๐Ÿ‘MAkE๐Ÿ‘€iT๐Ÿ’žfunNy!๐Ÿ’ฆ" -).add_command( - "owo", " or ", "OwO Try it yourself." -).add_command( - "react", None, "Reacts randomly." -).add_command( - "clap", " or ", "That kid needs clapping" -).add_info( - "Bakchodi Hai Bass." -).add_warning( - "โœ… Harmless Module." -).add() From eb1adc52641e1f6e43d1e925bbd225ab87f76a9b Mon Sep 17 00:00:00 2001 From: Hobby-Dev // <72003733+Hobby-Dev-0@users.noreply.github.com> Date: Sat, 30 Jul 2022 21:27:58 +0530 Subject: [PATCH 76/76] Update .gitpod.yml --- .gitpod.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index b08f4c1..0418e64 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,3 @@ - image: file: .gitpod.Dockerfile