Skip to content

Commit

Permalink
🙂🙂🙂
Browse files Browse the repository at this point in the history
  • Loading branch information
AbirHasan2005 authored Feb 25, 2022
1 parent 100505a commit b5a5650
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bot/plugins/video_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time
import json
import shlex
import shutil
from bot.client import (
Client
)
Expand All @@ -21,9 +22,20 @@
from bot.core.file_info import get_file_attr


def filesystem_free(path='.'):
_, __, free = shutil.disk_usage(".")
return free


@Client.on_message(filters.command("video_info") & filters.private & ~filters.edited)
async def video_info_handler(c: Client, m: Message):
await add_user_to_database(c, m)
if filesystem_free() < 5000000000:
return await m.reply_text(
"Because of less server space I can't do this task right now !!\n\n"
"Please try again after some time or use @AHToolsBot to do same task.",
True
)
if (not m.reply_to_message) or (len(m.command) == 1):
await m.reply_text(f"Reply to video with,\n/{m.command[0]} `--change-title` new title `--change-video-title` new video title `--change-audio-title` new audio title `--change-subtitle-title` new subtitle title `--change-file-name` new file name", True)
return
Expand Down

0 comments on commit b5a5650

Please sign in to comment.