Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 TroJanzHEX
Copyright (c) 2021 KicchaRequest

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto Filter Bot V2
# Kiccha Filter Bot V2

<p align="center">
<a href="https://www.python.org">
Expand All @@ -7,29 +7,29 @@
</a>
</p>
<p align="center">
<a href="https://github.com/TroJanzHEX/Auto-Filter-Bot-V2/stargazers">
<img src="https://img.shields.io/github/stars/TroJanzHEX/Auto-Filter-Bot-V2?style=social">
<a href="https://github.com/sachin9742s/Auto-Filter-Bot-V2/stargazers">
<img src="https://img.shields.io/github/stars/sachin9742s/Auto-Filter-Bot-V2?style=social">

</a>

<a href="https://github.com/TroJanzHEX/Auto-Filter-Bot-V2/fork">
<img src="https://img.shields.io/github/forks/TroJanzHEX/Auto-Filter-Bot-V2?label=Fork&style=social">
<a href="https://github.com/sachin9742s/Auto-Filter-Bot-V2/fork">
<img src="https://img.shields.io/github/forks/sachin9742s/Auto-Filter-Bot-V2?label=Fork&style=social">

</a>
</p>

[![TroJanz](https://img.shields.io/badge/TroJanzHEX-Channel-orange?style=for-the-badge&logo=telegram)](https://telegram.dog/TroJanzHEX)
[![sachin9742s](https://img.shields.io/badge/-Channel-orange?style=for-the-badge&logo=telegram)](https://telegram.dog/sachin9742s)
ㅤㅤㅤㅤㅤㅤㅤ
[![TroJanz](https://img.shields.io/badge/TroJanzHEX-Support-red?style=flat&logo=telegram)](https://telegram.dog/TroJanzSupport) [![TroJanz](https://img.shields.io/badge/TroJanzHEX-Website-red?style=flat&logo=CodersRank)](https://TroJanzHEX.me)
[![sachin9742s](https://img.shields.io/badge/sachin9742s-Support-red?style=flat&logo=telegram)](https://telegram.dog/KicchaRequest) [![sachin9742s](https://img.shields.io/badge/sachin9742s-Website-red?style=flat&logo=CodersRank)](https://sachin9742s.me)
ㅤㅤㅤㅤㅤㅤㅤ
[![MIT license](https://img.shields.io/badge/License-MIT-blue?style=flat)](https://github.com/TroJanzHEX/Auto-Filter-Bot-V2/blob/main/LICENSE) [![Open Source](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/TroJanzHEX/Auto-Filter-Bot-V2)
[![MIT license](https://img.shields.io/badge/License-MIT-blue?style=flat)](https://github.com/sachin9742s/Auto-Filter-Bot-V2/blob/main/LICENSE) [![Open Source](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/sachin9742s/Auto-Filter-Bot-V2)





#### You can call this as an Auto Filter Bot if you like :D
#### This is Version 2 of [Auto Filter Bot](https://github.com/TroJanzHEX/Auto-Filter-Bot)
#### This is Version 2 of [Auto Filter Bot](https://github.com/sachin9742s/Auto-Filter-Bot)
#### Bot simply search for the files from provided channel according to given query and gives link to those files as buttons!

## How to use the bot
Expand Down Expand Up @@ -63,19 +63,19 @@ or

[Click here to see tutorial video](https://youtu.be/zum9AUlOgtQ)

Thanks to [InfotelGroup](https://telegram.dog/InFoTelGroup) and [Erich Daniken](https://telegram.dog/ErichDaniken) for the video
Thanks to [KicchaRequest](https://telegram.dog/KicchaRequest) and [Sachin S](https://telegram.dog/sachin_official_admin) for the video

## Any bugs or errors or suggestions, report at [TroJanzSupport](https://telegram.dog/TroJanzSupport)
## Any bugs or errors or suggestions, report at [KicchaRequest](https://telegram.dog/KicchaRequest)


## Installation

### Deploy to Heroku
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/TroJanzHEX/Auto-Filter-Bot-V2)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/sachin9742s/Auto-Filter-Bot-V2)

### Deploy in your vps
```sh
git clone https://github.com/TroJanzHEX/Auto-Filter-Bot-V2
git clone https://github.com/sachin9742s/Auto-Filter-Bot-V2
cd Auto-Filter-Bot-V2
pip3 install -r requirements.txt
# <Create config.py appropriately>
Expand Down Expand Up @@ -108,4 +108,4 @@ python3 main.py

[![TroJanz](https://img.shields.io/badge/Pyrogram%20-%23F37626.svg?&style=for-the-badge&logo=telegram&logoColor=white)](https://github.com/pyrogram/pyrogram)

And as always, [SpEcHlDe](https://telegram.dog/SpEcHlDe)
And as always, [KicchaRequest](https://telegram.dog/KicchaRequest)
12 changes: 6 additions & 6 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "Auto Filter Bot",
"description": "Kind of a filter bot where you don't have to add filters manually.",
"logo": "https://telegra.ph/file/71aaa621508cd696ab538.jpg",
"logo": "https://telegra.ph/file/37a348385e6aa444aafb3.jpg",
"keywords": [
"Auto",
"Filter",
"Telegram Bot",
"TroJanzHEX"
"sachin9742s"
],
"website": "https://TroJanzHEX.me",
"repository": "https://github.com/TroJanzHEX/Auto-Filter-Bot-V2",
"success_url": "https://telegram.dog/TroJanzHEX",
"website": "https://sachin9742s.me",
"repository": "https://github.com/sachin9742s/Auto-Filter-Bot-V2",
"success_url": "https://telegram.dog/KicchaRequest",
"env": {
"TG_BOT_TOKEN": {
"description": "You Telegram Bot Token from @BotFather",
Expand Down Expand Up @@ -64,4 +64,4 @@
"size": "free"
}
}
}
}
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
# @sachin9742s


from pyrogram import (
Expand Down
2 changes: 1 addition & 1 deletion database/mdb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
# @sachin9742s


import re
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
# @sachin9742s


from bot import Bot

Bot().run()
Bot().run()
4 changes: 2 additions & 2 deletions plugins/channel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
# @sachin9742s


import re
Expand Down Expand Up @@ -38,7 +38,7 @@ async def addchannel(client: Bot, message: Message):
await message.reply_text(
"<i>Enter in correct format!\n\n<code>/add channelid</code> or\n"
"<code>/add @channelusername</code></i>"
"\n\nGet Channel id from @ChannelidHEXbot",
"\n\nGet Channel id from @GD_FILMCLUB",
)
return
try:
Expand Down
120 changes: 50 additions & 70 deletions plugins/commands.py
Original file line number Diff line number Diff line change
@@ -1,78 +1,58 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
# (c) @sachin9742s

class Translation(object):

START_TEXT = """<b>Hey {}!!</b>
<i>Am Just A Kiccha Auto Filter Bot....😉

from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from script import script
Just Add Me To Your Group And Channel And Connect Them And See My Pevers 🔥🔥😝

For More Details Click Help Button Below..
@KicchaRequest
</i>"""

HELP_TEXT = """
<b><i><u>How To Use Me!?</u></i></b>

@Client.on_message(filters.command(["start"]) & filters.private)
async def start(client, message):
try:
await message.reply_text(
text=script.START_MSG.format(message.from_user.mention),
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("HELP", callback_data="help_data"),
InlineKeyboardButton("ABOUT", callback_data="about_data"),
],
[
InlineKeyboardButton(
"⭕️ JOIN OUR CHANNEL ⭕️", url="https://t.me/TroJanzHEX")
]
]
),
reply_to_message_id=message.message_id
)
except:
pass
<i>
-> Add Me To Any Group And Make Me Admin
-> Add Me To Your Desired Channel
</i>

@Client.on_message(filters.command(["help"]) & filters.private)
async def help(client, message):
try:
await message.reply_text(
text=script.HELP_MSG,
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("BACK", callback_data="start_data"),
InlineKeyboardButton("ABOUT", callback_data="about_data"),
],
[
InlineKeyboardButton(
"⭕️ SUPPORT ⭕️", url="https://t.me/TroJanzSupport")
]
]
),
reply_to_message_id=message.message_id
)
except:
pass
<b>Bot Commands (Works Only In Groups) :</b>

@Client.on_message(filters.command(["about"]) & filters.private)
async def about(client, message):
try:
await message.reply_text(
text=script.ABOUT_MSG,
disable_web_page_preview=True,
reply_markup=InlineKeyboardMarkup(
[
[
InlineKeyboardButton("BACK", callback_data="help_data"),
InlineKeyboardButton("START", callback_data="start_data"),
],
[
InlineKeyboardButton(
"SOURCE CODE", url="https://github.com/TroJanzHEX/Auto-Filter-Bot-V2")
]
]
),
reply_to_message_id=message.message_id
)
except:
pass
-> <code>/add chat_id</code>
OR - To Connect A Group With A Channel (Bot Should Be Admin With Full Previlages In Both Group And Channel)
<code>/add @Username</code>

-> <code>/del chat_id</code>
OR - To disconnect A Group With A Channel
<code>/del @Username</code>

-> <code>/delall</code> - This Command Will Disconnect All Connected Channel With The Group And Deletes All Its File From DB

-> <code>/settings</code> - This Command Will Display You A Settings Pannel Instance Which Can Be Used To Tweek Bot's Settings Accordingly

-> <code>Channel</code> - Button Will Show You All The Connected Chats With The Group And Will Show Buttons Correspnding To There Order For Furthur Controls

-> <code>Filter Types</code> - Button Will Show You The 3 Filter Option Available In Bot... Pressing Each Buttons Will Either Enable or Disable Them And This Will Take Into Action As Soon As You Use Them Without The Need Of A Restart

-> <code>Configure</code> - Button Will Helps You To Change No. of Pages/ Buttons Per Page/ Total Result Without Acutally Editing The Repo... Also It Provide Option To Enable/Disable For Showing Invite Link In Each Results

-> <code>Status</code> - Button Will Shows The Stats Of Your Channel

@sachin9742s
"""

ABOUT_TEXT = """<b>➥ Name</b> : <code> Auto Filter Bot</code>

<b>➥ Creator</b> : <b><i><a href="https://t.me/sachin_official_admin">Sachin_S</a></i></b>

<b>➥ Language</b> : <code>Python3</code>

<b>➥ Library</b> : <i><a href="https://t.me/ROCKHDMOVIES2021">Pyrogram Asyncio 1.13.0 </a></i>

<b>➥ Source Code</b> : <i><a href="https://t.me/KicchaRequest">Click Me</a></i>
"""
34 changes: 17 additions & 17 deletions plugins/filters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
# @sachin9742s


import re
Expand Down Expand Up @@ -59,7 +59,7 @@ async def filter(client: Bot, message: Message):
else:
buttons = btn
buttons.append(
[InlineKeyboardButton(text="📃 Pages 1/1",callback_data="pages")]
[InlineKeyboardButton(text="🎶 Pages 1/1 🎶",callback_data="pages")]
)
await message.reply_text(
f"<b> Here is the result for {message.text}</b>",
Expand All @@ -71,10 +71,10 @@ async def filter(client: Bot, message: Message):
buttons = data['buttons'][0].copy()

buttons.append(
[InlineKeyboardButton(text="NEXT ",callback_data=f"next_0_{keyword}")]
[InlineKeyboardButton(text="🎸 NEXT 🎸",callback_data=f"next_0_{keyword}")]
)
buttons.append(
[InlineKeyboardButton(text=f"📃 Pages 1/{data['total']}",callback_data="pages")]
[InlineKeyboardButton(text=f"🎶 Pages 1/{data['total']}",callback_data="pages")]
)

await message.reply_text(
Expand All @@ -99,10 +99,10 @@ async def cb_handler(client: Bot, query: CallbackQuery):
buttons = data['buttons'][int(index)+1].copy()

buttons.append(
[InlineKeyboardButton(" BACK", callback_data=f"back_{int(index)+1}_{keyword}")]
[InlineKeyboardButton("🎵 BACK 🎵", callback_data=f"back_{int(index)+1}_{keyword}")]
)
buttons.append(
[InlineKeyboardButton(f"📃 Pages {int(index)+2}/{data['total']}", callback_data="pages")]
[InlineKeyboardButton(f"🎶 Pages {int(index)+2}/{data['total']}", callback_data="pages")]
)

await query.edit_message_reply_markup(
Expand All @@ -113,10 +113,10 @@ async def cb_handler(client: Bot, query: CallbackQuery):
buttons = data['buttons'][int(index)+1].copy()

buttons.append(
[InlineKeyboardButton(" BACK", callback_data=f"back_{int(index)+1}_{keyword}"),InlineKeyboardButton("NEXT ", callback_data=f"next_{int(index)+1}_{keyword}")]
[InlineKeyboardButton("🎵 BACK 🎵", callback_data=f"back_{int(index)+1}_{keyword}"),InlineKeyboardButton("🎸 NEXT 🎸", callback_data=f"next_{int(index)+1}_{keyword}")]
)
buttons.append(
[InlineKeyboardButton(f"📃 Pages {int(index)+2}/{data['total']}", callback_data="pages")]
[InlineKeyboardButton(f"🎶 Pages {int(index)+2}/{data['total']}", callback_data="pages")]
)

await query.edit_message_reply_markup(
Expand All @@ -134,10 +134,10 @@ async def cb_handler(client: Bot, query: CallbackQuery):
buttons = data['buttons'][int(index)-1].copy()

buttons.append(
[InlineKeyboardButton("NEXT ", callback_data=f"next_{int(index)-1}_{keyword}")]
[InlineKeyboardButton("🎸 NEXT 🎸", callback_data=f"next_{int(index)-1}_{keyword}")]
)
buttons.append(
[InlineKeyboardButton(f"📃 Pages {int(index)}/{data['total']}", callback_data="pages")]
[InlineKeyboardButton(f"🎶 Pages {int(index)}/{data['total']}", callback_data="pages")]
)

await query.edit_message_reply_markup(
Expand All @@ -148,10 +148,10 @@ async def cb_handler(client: Bot, query: CallbackQuery):
buttons = data['buttons'][int(index)-1].copy()

buttons.append(
[InlineKeyboardButton(" BACK", callback_data=f"back_{int(index)-1}_{keyword}"),InlineKeyboardButton("NEXT ", callback_data=f"next_{int(index)-1}_{keyword}")]
[InlineKeyboardButton("🎵 BACK 🎵", callback_data=f"back_{int(index)-1}_{keyword}"),InlineKeyboardButton("🎸 NEXT 🎸", callback_data=f"next_{int(index)-1}_{keyword}")]
)
buttons.append(
[InlineKeyboardButton(f"📃 Pages {int(index)}/{data['total']}", callback_data="pages")]
[InlineKeyboardButton(f"🎶 Pages {int(index)}/{data['total']}", callback_data="pages")]
)

await query.edit_message_reply_markup(
Expand All @@ -167,9 +167,9 @@ async def cb_handler(client: Bot, query: CallbackQuery):
elif query.data == "start_data":
await query.answer()
keyboard = InlineKeyboardMarkup([
[InlineKeyboardButton("HELP", callback_data="help_data"),
InlineKeyboardButton("ABOUT", callback_data="about_data")],
[InlineKeyboardButton("⭕️ JOIN OUR CHANNEL ⭕️", url="https://t.me/TroJanzHEX")]
[InlineKeyboardButton("HELP", callback_data="help_data"),
InlineKeyboardButton("ABOUT", callback_data="about_data")],
[InlineKeyboardButton(" JOIN OUR CHANNEL ", url="https://t.me/ROCKHDMOVIES2021")]
])

await query.message.edit_text(
Expand All @@ -184,7 +184,7 @@ async def cb_handler(client: Bot, query: CallbackQuery):
keyboard = InlineKeyboardMarkup([
[InlineKeyboardButton("BACK", callback_data="start_data"),
InlineKeyboardButton("ABOUT", callback_data="about_data")],
[InlineKeyboardButton("⭕️ SUPPORT ⭕️", url="https://t.me/TroJanzSupport")]
[InlineKeyboardButton(" SUPPORT ", url="https://t.me/KicchaRequest")]
])

await query.message.edit_text(
Expand All @@ -199,7 +199,7 @@ async def cb_handler(client: Bot, query: CallbackQuery):
keyboard = InlineKeyboardMarkup([
[InlineKeyboardButton("BACK", callback_data="help_data"),
InlineKeyboardButton("START", callback_data="start_data")],
[InlineKeyboardButton("SOURCE CODE", url="https://github.com/TroJanzHEX/Auto-Filter-Bot-V2")]
[InlineKeyboardButton("SOURCE CODE", url="https://t.me/KicchaRequest")]
])

await query.message.edit_text(
Expand Down
Loading