Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
e8a30af
Fixed Error Raised When A Invalid UID is Provided
AlbertEinsteinTG Apr 21, 2021
2e19ea0
Update commands.py
AlbertEinsteinTG Apr 23, 2021
bd3a60e
Fixed Some Adaptive Issues 😅
AlbertEinsteinTG Apr 23, 2021
baee87b
Update channel.py
shahsad-kp May 10, 2021
f347d8c
Update channel.py
shahsad-kp May 10, 2021
0693188
Update auto_filter.py
shahsad-kp May 10, 2021
70962f1
Ignore Bot messages in autofilter
InukaAsith May 10, 2021
494202d
filters.bot
AlbertEinsteinTG May 10, 2021
22943d5
Update auto_filter.py
shahsad-kp May 10, 2021
77539fe
Added File Size
AlbertEinsteinTG May 10, 2021
3318eb6
Update channel.py
AlbertEinsteinTG May 10, 2021
ef78257
Update database.py
AlbertEinsteinTG May 14, 2021
5c39744
Bug Fix
AlbertEinsteinTG May 15, 2021
1780fb4
Bug Fix
AlbertEinsteinTG May 18, 2021
d55ab0e
Support For Multiple Bots In Same DB URI
AlbertEinsteinTG Jun 8, 2021
4b5c920
Oops Mistakes😬😅
AlbertEinsteinTG Jun 11, 2021
613fab0
Ownership Transfer
AlbertEinsteinTG Jun 14, 2021
aa5bca3
Redirect
AlbertEinsteinTG Jun 14, 2021
0d362bc
Fix!
AlbertEinsteinTG Jun 14, 2021
9c50553
Technical Move 😁
AlbertEinsteinTG Jun 14, 2021
5328dc3
Better Way?
AlbertEinsteinTG Jul 10, 2021
f12b2da
Mammanodu Onnum Thonnale.......
AlbertEinsteinTG Jul 11, 2021
d552047
Does this fix?👀
AlbertEinsteinTG Jul 18, 2021
2cfd863
💡
PR0FESS0R-99 Oct 9, 2021
7152983
💡
PR0FESS0R-99 Oct 9, 2021
ea6377a
💡
PR0FESS0R-99 Oct 9, 2021
d182733
💡
PR0FESS0R-99 Oct 9, 2021
bdd5909
💡
PR0FESS0R-99 Oct 9, 2021
7af764a
💡
PR0FESS0R-99 Oct 9, 2021
7ba0f12
💡
PR0FESS0R-99 Oct 9, 2021
42c16f7
💡
PR0FESS0R-99 Oct 9, 2021
cfcd369
💡
PR0FESS0R-99 Oct 9, 2021
ce41ae6
💡
PR0FESS0R-99 Oct 9, 2021
e674bc1
💡
PR0FESS0R-99 Oct 9, 2021
7ada01c
💡
PR0FESS0R-99 Oct 9, 2021
c3d7ad9
💡
PR0FESS0R-99 Oct 9, 2021
d1448cf
Delete bot directory
PR0FESS0R-99 Oct 9, 2021
c623439
💡
PR0FESS0R-99 Oct 9, 2021
e634edf
💡
PR0FESS0R-99 Oct 9, 2021
35ff684
Update __main__.in
PR0FESS0R-99 Oct 9, 2021
f46ad00
Delete __main__.in
PR0FESS0R-99 Oct 9, 2021
e9fd617
Create __main__.py
PR0FESS0R-99 Oct 9, 2021
8465d06
💡
PR0FESS0R-99 Oct 9, 2021
3288fd7
💡
PR0FESS0R-99 Oct 9, 2021
8774e6b
💡
PR0FESS0R-99 Oct 9, 2021
b4cffae
💡
PR0FESS0R-99 Oct 9, 2021
4452f88
💡
PR0FESS0R-99 Oct 9, 2021
2b7102e
💡
PR0FESS0R-99 Oct 9, 2021
470616a
😂
PR0FESS0R-99 Oct 13, 2021
ef71ee1
💡
PR0FESS0R-99 Oct 14, 2021
4fd2037
💡
PR0FESS0R-99 Oct 14, 2021
03a958f
Create MoTech
PR0FESS0R-99 Oct 14, 2021
df0333f
💡
PR0FESS0R-99 Oct 14, 2021
ecd4df3
Delete MoTech
PR0FESS0R-99 Oct 14, 2021
08772bc
💡
PR0FESS0R-99 Oct 14, 2021
1a452cb
💡
PR0FESS0R-99 Oct 14, 2021
fe4d5d6
Create MoTech.md
PR0FESS0R-99 Oct 14, 2021
eee1b53
💡
PR0FESS0R-99 Oct 14, 2021
c7bd3ce
Create MoTech.md
PR0FESS0R-99 Oct 14, 2021
810eedb
💡
PR0FESS0R-99 Oct 14, 2021
d3485b4
Delete MoTech.md
PR0FESS0R-99 Oct 14, 2021
c1a9726
Delete MoTech.md
PR0FESS0R-99 Oct 14, 2021
a253b16
💡
PR0FESS0R-99 Oct 14, 2021
044f882
💡
PR0FESS0R-99 Oct 14, 2021
11624f8
Create MoTech.txt
PR0FESS0R-99 Oct 14, 2021
c264d1d
💡
PR0FESS0R-99 Oct 14, 2021
09f2dc9
💡
PR0FESS0R-99 Oct 14, 2021
26b1527
Create motech.py
PR0FESS0R-99 Oct 14, 2021
9cf43d9
💡
PR0FESS0R-99 Oct 14, 2021
cefc1cd
Delete motech.py
PR0FESS0R-99 Oct 14, 2021
0d5bc9e
💡
PR0FESS0R-99 Oct 14, 2021
0529d71
Update Readme.md
PR0FESS0R-99 Oct 14, 2021
c64f6d1
💡
PR0FESS0R-99 Oct 14, 2021
c22da41
💡
PR0FESS0R-99 Oct 14, 2021
ea769f4
Update Simple_Config.py
PR0FESS0R-99 Oct 14, 2021
710786b
Bug Fix💡
PR0FESS0R-99 Oct 14, 2021
79e6ab4
Update Callback.py
PR0FESS0R-99 Oct 15, 2021
1b64877
Update Readme.md
PR0FESS0R-99 Nov 4, 2021
0e03202
Update Readme.md
sara1541 Feb 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# (C) AlbertEinstein_TG
# Copyright permission under MIT License
# All rights reserved by PR0FESS0R-99
# License -> https://github.com/PR0FESS0R-99/DonLee_Robot/blob/main/LICENSE

import random
import string
import asyncio

from pyrogram import Client, filters
from pyrogram.errors import UserAlreadyParticipant, FloodWait

from bot import VERIFY # pylint: disable=import-error
from bot.bot import Bot # pylint: disable=import-error
from bot.database import Database # pylint: disable=import-error
from bot.plugins.auto_filter import recacher # pylint: disable=import-error
from DonLee_Robot import VERIFY
from DonLee_Robot.donlee_robot import DonLee_Robot
from DonLee_Robot.Modules.Filters import Database, recacher

db = Database()

@Client.on_message(filters.command(["add"]) & filters.group, group=1)
async def connect(bot: Bot, update):
async def connect(bot: DonLee_Robot, update):
"""
A Funtion To Handle Incoming /add Command TO COnnect A Chat With Group
"""
Expand Down Expand Up @@ -113,6 +117,7 @@ async def connect(bot: Bot, update):
file_id = file_id.video.file_id
file_name = msgs.video.file_name[0:-4]
file_caption = msgs.caption if msgs.caption else ""
file_size = msgs.video.file_size
file_type = "video"

elif msgs.audio:
Expand All @@ -127,6 +132,7 @@ async def connect(bot: Bot, update):
file_id = file_id.audio.file_id
file_name = msgs.audio.file_name[0:-4]
file_caption = msgs.caption if msgs.caption else ""
file_size = msgs.audio.file_size
file_type = "audio"

elif msgs.document:
Expand All @@ -141,6 +147,7 @@ async def connect(bot: Bot, update):
file_id = file_id.document.file_id
file_name = msgs.document.file_name[0:-4]
file_caption = msgs.caption if msgs.caption else ""
file_size = msgs.document.file_size
file_type = "document"

for i in ["_", "|", "-", "."]: # Work Around
Expand All @@ -164,6 +171,7 @@ async def connect(bot: Bot, update):
unique_id=unique_id,
file_name=file_name,
file_caption=file_caption,
file_size=file_size,
file_type=file_type,
file_link=file_link,
chat_id=channel_id,
Expand All @@ -190,7 +198,7 @@ async def connect(bot: Bot, update):


@Client.on_message(filters.command(["del"]) & filters.group, group=1)
async def disconnect(bot: Bot, update):
async def disconnect(bot: DonLee_Robot, update):
"""
A Funtion To Handle Incoming /del Command TO Disconnect A Chat With A Group
"""
Expand Down Expand Up @@ -255,7 +263,7 @@ async def disconnect(bot: Bot, update):


@Client.on_message(filters.command(["delall"]) & filters.group, group=1)
async def delall(bot: Bot, update):
async def delall(bot: DonLee_Robot, update):
"""
A Funtion To Handle Incoming /delall Command TO Disconnect All Chats From A Group
"""
Expand All @@ -280,8 +288,8 @@ async def delall(bot: Bot, update):
await update.reply_text("Sucessfully Deleted All Connected Chats From This Group....")


@Client.on_message(filters.channel & (filters.video | filters.audio | filters.document), group=0)
async def new_files(bot: Bot, update):
@Client.on_message(filters.channel & (filters.video | filters.audio | filters.document) & ~filters.edited, group=0)
async def new_files(bot: DonLee_Robot, update):
"""
A Funtion To Handle Incoming New Files In A Channel ANd Add Them To Respective Channels..
"""
Expand All @@ -296,19 +304,22 @@ async def new_files(bot: Bot, update):
file_id = update.video.file_id
file_name = update.video.file_name[0:-4]
file_caption = update.caption if update.caption else ""
file_size = update.video.file_size

elif update.audio:
file_type = "audio"
file_id = update.audio.file_id
file_name = update.audio.file_name[0:-4]
file_caption = update.caption if update.caption else ""
file_size = update.audio.file_size

elif update.document:
file_type = "document"
file_id = update.document.file_id
file_name = update.document.file_name[0:-4]
file_caption = update.caption if update.caption else ""

file_size = update.document.file_size

for i in ["_", "|", "-", "."]: # Work Around
try:
file_name = file_name.replace(i, " ")
Expand Down Expand Up @@ -338,6 +349,7 @@ async def new_files(bot: Bot, update):
unique_id=unique_id,
file_name=file_name,
file_caption=file_caption,
file_size = file_size,
file_type=file_type,
file_link=file_link,
chat_id=channel_id,
Expand All @@ -348,3 +360,4 @@ async def new_files(bot: Bot, update):
await db.add_filters(data)
return

runing = """Team mo tech"""
2 changes: 2 additions & 0 deletions DonLee_Robot/Modules/Channel/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DEPLOY = "💡 DEPLOY NOW 💡"
HEROKU = "https://youtu.be/lI71HsWzTKE"
170 changes: 170 additions & 0 deletions DonLee_Robot/Modules/Commands/Commands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# (c) @SpEcHIDe
# (c) @AlbertEinsteinTG
# (c) @Muhammed_RK, @Mo_Tech_YT , @Mo_Tech_Group, @MT_Botz
# Copyright permission under MIT License
# All rights reserved by PR0FESS0R-99
# License -> https://github.com/PR0FESS0R-99/DonLee_Robot/blob/main/LICENSE

from pyrogram import filters, Client
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup, CallbackQuery
from pyrogram.errors import UserNotParticipant
from DonLee_Robot import Translation, LOGGER, Mo_Tech_YT
from DonLee_Robot.Modules.Filters import Database
from DonLee_Robot.donlee_robot import DonLee_Robot
from DonLee_Robot.Modules import DEPLOY, HEROKU
db = Database()

@DonLee_Robot.on_message(filters.command(["start"]) & filters.private, group=1)
async def start(bot, update):
update_channel = Mo_Tech_YT.MO_TECH_YT_15
if update_channel:
try:
user = await bot.get_chat_member(update_channel, update.chat.id)
if user.status == "kicked out":
await update.reply_text("😔 Sorry Dude, You are **🅱︎🅰︎🅽︎🅽︎🅴︎🅳︎ 🤣🤣🤣**")
return
except UserNotParticipant:
#await update.reply_text(f"Join @{update_channel} To Use Me")
await update.reply_text(
text=Mo_Tech_YT.MO_TECH_YT_14,
reply_markup=InlineKeyboardMarkup([
[ InlineKeyboardButton(text=" 📢 Join My Update Channel 📢", url=f"https://t.me/{Mo_Tech_YT.MO_TECH_YT_15}")]
])
)
return
except Exception:
await update.reply_text(f"<b>This bot should be the admin on your update channel</b>\n\n<b>💢 ഈ ചാനലിൽ @{Mo_Tech_YT.MO_TECH_YT_15} ബോട്ടിനെ അഡ്മിൻ ആക്. എന്നിട്ട് /start കൊടുക്</b>\n\n<b>🗣️ any Doubt @Mo_Tech_Group</b>")
return
try:
file_uid = update.command[1]
except IndexError:
file_uid = False

if file_uid:
file_id, file_name, file_caption, file_type = await db.get_file(file_uid)

if (file_id or file_type) == None:
return

caption = file_caption if file_caption != ("" or None) else ("<code>" + file_name + "</code>")
try:
await update.reply_cached_media(
file_id,
quote=True,
caption = caption,
parse_mode="html",
reply_markup=InlineKeyboardMarkup(
[
[
Mo_Tech_YT.MO_TECH_YT_02
(
DEPLOY, url=HEROKU
)
]
]
)
)
except Exception as e:
await update.reply_text(f"<b>Error:</b>\n<code>{e}</code>", True, parse_mode="html")
LOGGER(__name__).error(e)
return

buttons = [
[
Mo_Tech_YT.MO_TECH_YT_02
(
'📢Update Channel', url='t.me/Mo_Tech_YT'
),
Mo_Tech_YT.MO_TECH_YT_02
(
'💡More Botz', url='t.me/MT_Botz'
)
],
[
Mo_Tech_YT.MO_TECH_YT_02
(
DEPLOY, url=HEROKU
)
],
[
Mo_Tech_YT.MO_TECH_YT_02
(
'🚶Help', callback_data='help'
)
]
]


reply_markup = InlineKeyboardMarkup(buttons)

await bot.send_message(
chat_id=update.chat.id,
text=Translation.START_TEXT.format(
update.from_user.first_name),
reply_markup=reply_markup,
parse_mode="html",
reply_to_message_id=update.message_id
)

@DonLee_Robot.on_message(filters.command(["help"]) & filters.private, group=1)
async def help(bot, update):
buttons = [
[
Mo_Tech_YT.MO_TECH_YT_02
(
DEPLOY, url=HEROKU
)
],
[
Mo_Tech_YT.MO_TECH_YT_02
(
'🏡 Home', callback_data='start'
),
Mo_Tech_YT.MO_TECH_YT_02
(
'About💡', callback_data='about'
)
]
]

reply_markup = InlineKeyboardMarkup(buttons)

await bot.send_message(
chat_id=update.chat.id,
text=Translation.HELP_TEXT,
reply_markup=reply_markup,
parse_mode="html",
reply_to_message_id=update.message_id
)


@DonLee_Robot.on_message(filters.command(["about"]) & filters.private, group=1)
async def about(bot, update):

buttons = [
[
Mo_Tech_YT.MO_TECH_YT_02
(
DEPLOY, url=HEROKU
)
],
[
Mo_Tech_YT.MO_TECH_YT_02
(
'🏠 Home', callback_data='start'
),
Mo_Tech_YT.MO_TECH_YT_02
(
'Close ❌️', callback_data='close'
)
]
]
reply_markup = InlineKeyboardMarkup(buttons)

await bot.send_message(
chat_id=update.chat.id,
text=Translation.ABOUT_TEXT,
reply_markup=reply_markup,
parse_mode="html",
reply_to_message_id=update.message_id
)
Loading