Skip to content
Open

Yato #69

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2413830
Update bot configuration parameters
Im-Sourav02 Mar 4, 2026
830e499
Implement custom domain redirection in shortner
Im-Sourav02 Apr 17, 2026
e617117
Update premium purchase links and transfer link logic
Im-Sourav02 Apr 17, 2026
56c8790
Update bot token and fix reply message typo
Im-Sourav02 Apr 17, 2026
020f1c2
Add pip install command to Dockerfile
Im-Sourav02 Apr 17, 2026
ecad386
Update config.py
Im-Sourav02 Apr 17, 2026
5e5d78a
Update config.py
souravagarwal2007 May 26, 2026
679f2cc
Update config.py
souravagarwal2007 May 26, 2026
bcd62e6
Update premium upgrade button URL
souravagarwal2007 May 26, 2026
7cc2e17
Update config.py
souravagarwal2007 May 26, 2026
70708f6
Update start.py
souravagarwal2007 May 26, 2026
ef3d238
Enhance caption processing for video messages
souravagarwal2007 May 26, 2026
84a3326
Update caption formatting for video and document messages
souravagarwal2007 May 26, 2026
952310c
Enhance channel_post with video quality handling
souravagarwal2007 May 26, 2026
227aa6e
Implement toggle button for get files feature
souravagarwal2007 May 26, 2026
10512de
Update helper_func.py
souravagarwal2007 May 26, 2026
cdeed3c
Refactor channel_post.py for improved readability
souravagarwal2007 May 26, 2026
51d0e44
Merge pull request #1 from souravagarwal2007/Yato
Im-Sourav02 Jun 27, 2026
35d4a78
Change bot token in config.py
Im-Sourav02 Jun 27, 2026
2a31d3f
Update DB_CHANNEL to new channel ID
Im-Sourav02 Jun 27, 2026
93a3c73
Added Auto-Watermark
Im-Sourav02 Jun 27, 2026
1ac6635
Added Auto-Watermark
Im-Sourav02 Jun 27, 2026
a681d98
Restore Auto Watermark Feature and Fix Channel Post
Im-Sourav02 Jun 27, 2026
d0d846e
Changed the token
Im-Sourav02 Jun 27, 2026
0c8a183
feat: updated broadcast, shortener, and texts
Im-Sourav02 Jul 30, 2026
69bd97f
fix(shortner): use native shortener URLs and add 24h TTL cache to pre…
Im-Sourav02 Aug 3, 2026
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: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REDIRECTOR_DOMAIN=sukuna.site
ENCRYPTION_KEY=e2d7c581a9f032b4c6e917d84b2c1f3a5e8d9b0a1f2c3d4e5f6a7b8c9d0e1f2a
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM python:3.10

WORKDIR /app

COPY . .

RUN pip install --no-cache-dir -r requirements.txt

RUN chmod +x start.sh

CMD ["bash", "start.sh"]
7 changes: 7 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ async def start(self):
self.tutorial_link = SHORT_TUT
self.shortner_enabled = True

# Load bot settings
try:
self.auto_watermark = await self.mongodb.get_bot_setting('auto_watermark', True)
except Exception as e:
self.LOGGER(__name__, self.name).warning(f"Error loading bot settings: {e}")
self.auto_watermark = True

try:
db_channel = await self.get_chat(self.db)
self.db_channel = db_channel
Expand Down
38 changes: 19 additions & 19 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@

# Bot Configuration
LOG_FILE_NAME = "bot.log"
PORT = '5010'
OWNER_ID = 6497757690
PORT = 5010
OWNER_ID = 6123108288

MSG_EFFECT = 5046509860389126442

SHORT_URL = "linkshortify.com" # shortner url
SHORT_API = ""
SHORT_TUT = "https://t.me/How_to_Download_7x/26"
SHORT_API = "573350da0e10a5a44f7e6fec3bc2b3f836b47805"
SHORT_TUT = "https://t.me/Infinix_Tutorial/10"

# Bot Configuration
SESSION = "yato"
TOKEN = "642712"
API_ID = ""
API_HASH = ""
TOKEN = "7851665401:AAF3WH1TYu_wDd506riW6py1c9nZswyrO3c"
API_ID = "21446955"
API_HASH = "e6f34a6186963663342b88b88c2b4750"
WORKERS = 5

DB_URI = "mongodb"
DB_NAME = "yato"
DB_URI = "mongodb+srv://souravagarwal14092007:szXRs8g7fErCnn4@cluster0.xlsbf3o.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"
DB_NAME = "Cluster0"

FSUBS = [[-1003016571084, True, 10]] # Force Subscription Channels [channel_id, request_enabled, timer_in_minutes]
FSUBS = [] # Temporarily disabled so bot can run locally without being an admin in the channel
# Database Channel (Primary)
DB_CHANNEL = # just put channel id dont add ""
DB_CHANNEL = -1002558171315 # just put channel id dont add ""
# Multiple Database Channels (can be set via bot settings)
# DB_CHANNELS = {
# "-1002595092736": {"name": "Primary DB", "is_primary": True, "is_active": True},
Expand All @@ -33,22 +33,22 @@
# Auto Delete Timer (seconds)
AUTO_DEL = 300
# Admin IDs
ADMINS = [6497757690, 6103092779]
ADMINS = [6123108288]
# Bot Settings
DISABLE_BTN = True
PROTECT = True

# Messages Configuration
MESSAGES = {
"START": "<b>›› ʜᴇʏ!!, {first} ~ <blockquote>ʟᴏᴠᴇ ᴘᴏʀɴʜᴡᴀ? ɪ ᴀᴍ ᴍᴀᴅᴇ ᴛᴏ ʜᴇʟᴘ ʏᴏᴜ ᴛᴏ ғɪɴᴅ ᴡʜᴀᴛ ʏᴏᴜ aʀᴇ ʟᴏᴏᴋɪɴɢ ꜰᴏʀ.</blockquote></b>",
"START": "<b>›› ʜᴇʏ!!, {first} ~ <blockquote>ʟᴏᴠᴇ ᴘᴏʀɴ? ɪ ᴀᴍ ᴍᴀᴅᴇ ᴛᴏ ʜᴇʟᴘ ʏᴏᴜ ᴛᴏ ғɪɴᴅ ᴡʜᴀᴛ ʏᴏᴜ aʀᴇ ʟᴏᴏᴋɪɴɢ ꜰᴏʀ.</blockquote></b>",
"FSUB": "<b><blockquote>›› ʜᴇʏ ×</blockquote>\n ʏᴏᴜʀ ғɪʟᴇ ɪs ʀᴇᴀᴅʏ ‼️ ʟᴏᴏᴋs ʟɪᴋᴇ ʏᴏᴜ ʜᴀᴠᴇɴ'ᴛ sᴜʙsᴄʀɪʙᴇᴅ ᴛᴏ ᴏᴜʀ ᴄʜᴀɴɴᴇʟs ʏᴇᴛ, sᴜʙsᴄʀɪʙᴇ ɴᴏᴡ ᴛᴏ ɢᴇᴛ ʏᴏᴜʀ ғɪʟᴇs</b>",
"ABOUT": "<b>›› ғᴏʀ ᴍᴏʀᴇ: @Nova_Flix \n <blockquote expandable>›› ᴜᴘᴅᴀᴛᴇs ᴄʜᴀɴɴᴇʟ: <a href='https://t.me/codeflix_bots'>Cʟɪᴄᴋ ʜᴇʀᴇ</a> \n›› ᴏᴡɴᴇʀ: @ProYato\n›› ʟᴀɴɢᴜᴀɢᴇ: <a href='https://docs.python.org/3/'>Pʏᴛʜᴏɴ 3</a> \n›› ʟɪʙʀᴀʀʏ: <a href='https://docs.pyrogram.org/'>Pʏʀᴏɢʀᴀᴍ ᴠ2</a> \n›› ᴅᴀᴛᴀʙᴀsᴇ: <a href='https://www.mongodb.com/docs/'>Mᴏɴɢᴏ ᴅʙ</a> \n›› ᴅᴇᴠᴇʟᴏᴘᴇʀ: @cosmic_freak</b></blockquote>",
"REPLY": "<b>For More Join - @Hanime_Arena</b>",
"ABOUT": "<b><blockquote>◈ ᴏᴡɴᴇʀ : <a href=t.me/Im_Sukuna02>ɪᴍ•Ꮪᴜ͢ᴋᴜɴᴀ</a>\n◈ ꜰᴏᴜɴᴅᴇʀ ᴏꜰ : <a href=https://t.me/InfinixSyndicate>ɪɴғɪɴɪx sʏɴᴅɪᴄᴀᴛᴇ</a>\n◈ ᴍᴏᴠɪᴇs ᴄʜᴀɴɴᴇʟ : <a href=https://t.me/Infinix_Movie>ɪɴғɪɴɪx ᴍᴏᴠɪᴇs</a>\n◈ ᴅᴇᴠᴇʟᴏᴘᴇʀ : <a href=https://t.me/Im_Sukuna02>Sᴜᴋᴜɴᴀ</a></blockquote></b>",
"REPLY": "<b>For More Join - @Infinix_Adult</b>",
"SHORT_MSG": "<b>📊 ʜᴇʏ {first}, \n\n‼️ ɢᴇᴛ ᴀʟʟ ꜰɪʟᴇꜱ ɪɴ ᴀ ꜱɪɴɢʟᴇ ʟɪɴᴋ ‼️\n\n ⌯ ʏᴏᴜʀ ʟɪɴᴋ ɪꜱ ʀᴇᴀᴅʏ, ᴋɪɴᴅʟʏ ᴄʟɪᴄᴋ ᴏɴ ᴏᴘᴇɴ ʟɪɴᴋ ʙᴜᴛᴛᴏɴ..</b>",
"START_PHOTO": "https://graph.org/file/510affa3d4b6c911c12e3.jpg",
"FSUB_PHOTO": "https://telegra.ph/file/7a16ef7abae23bd238c82-b8fbdcb05422d71974.jpg",
"SHORT_PIC": "https://telegra.ph/file/7a16ef7abae23bd238c82-b8fbdcb05422d71974.jpg",
"SHORT": "https://telegra.ph/file/8aaf4df8c138c6685dcee-05d3b183d4978ec347.jpg"
"START_PHOTO": "https://i.ibb.co/GvJsGpyL/x.jpg",
"FSUB_PHOTO": "https://i.ibb.co/GvJsGpyL/x.jpg",
"SHORT_PIC": "https://i.ibb.co/GvJsGpyL/x.jpg",
"SHORT": "https://i.ibb.co/GvJsGpyL/x.jpg"
}

def LOGGER(name: str, client_name: str) -> logging.Logger:
Expand Down
2 changes: 1 addition & 1 deletion helper/helper_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ async def batch_auto_del_notification(bot_username, messages, delay_time, transf

# Update notification with get files button
try:
if transfer_link:
if transfer_link and getattr(client, 'get_files_btn', True):
try:
name = "• ɢᴇᴛ ғɪʟᴇs •"
link = f"https://t.me/{bot_username}?start={transfer_link}"
Expand Down
Loading