v4.7.7 (#103)
- Remove unused import - Added badge Co-authored-by: Tanmoy karmakar <59302188+tk007-git@users.noreply.github.com>
This commit is contained in:
parent
dc9b9c8879
commit
813f2174be
19
README.md
19
README.md
|
|
@ -1,7 +1,18 @@
|
|||
[](https://youtu.be/Pk_TthHfLeE)
|
||||
|
||||
# Slam Mirror Bot
|
||||
This is a Telegram bot writen in Python for mirroring files on the Internet to our beloved Google Drive.
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
[](https://t.me/SlamMirrorSupport)
|
||||
|
||||
**Slam Mirror Bot** is a Telegram Bot writen in Python for mirroring files on the Internet to our beloved Google Drive.
|
||||
|
||||
# Features supported:
|
||||
|
||||
|
|
@ -169,7 +180,7 @@ sudo docker run mirrorbot
|
|||
|
||||
## Deploying on Heroku
|
||||
|
||||
- Fork this repo then upload **token.pickle** to your forks
|
||||
- Give stars and Fork this repo then upload **token.pickle** to your forks
|
||||
- Hit the **DEPLOY TO HEROKU** button and follow the further instructions in the screen
|
||||
|
||||
**NOTE**: If you didn't upload **token.pickle**, uploading will not work. How to generate **token.pickle**? [Read here](https://github.com/breakdowns/slam-mirrorbot#getting-google-oauth-api-credential-file)
|
||||
|
|
@ -178,7 +189,6 @@ sudo docker run mirrorbot
|
|||
## Deploying on Heroku with heroku-cli and Goorm IDE
|
||||
<p><a href="https://telegra.ph/How-to-Deploy-a-Mirror-Bot-to-Heroku-with-CLI-05-06"> <img src="https://img.shields.io/badge/see%20on%20telegraph-grey?style=for-the-badge" width="190""/></a></p>
|
||||
|
||||
|
||||
# Using Service Accounts for uploading to avoid user rate limit
|
||||
For Service Account to work, you must set **USE_SERVICE_ACCOUNTS=**"True" in config file or environment variables,
|
||||
Many thanks to [AutoRClone](https://github.com/xyou365/AutoRclone) for the scripts.
|
||||
|
|
@ -215,9 +225,6 @@ machine host login username password my_youtube_password
|
|||
```
|
||||
Where host is the name of extractor (eg. Youtube, Twitch). Multiple accounts of different hosts can be added each separated by a new line.
|
||||
|
||||
# Support Group
|
||||
<p><a href="https://t.me/SlamMirrorSupport"> <img src="https://img.shields.io/badge/Slam%20Mirror%20Support-black?style=for-the-badge&logo=telegram" width="230""/></a></p>
|
||||
|
||||
# Credits
|
||||
|
||||
Thanks to:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import shutil, psutil
|
||||
import signal
|
||||
import pickle
|
||||
|
||||
from pyrogram import idle
|
||||
from bot import app
|
||||
from os import execl, kill, path, remove
|
||||
|
|
@ -8,7 +9,8 @@ from sys import executable
|
|||
from datetime import datetime
|
||||
import pytz
|
||||
import time
|
||||
from telegram import ParseMode, BotCommand, InlineKeyboardMarkup
|
||||
|
||||
from telegram import ParseMode, BotCommand
|
||||
from telegram.ext import CommandHandler, run_async
|
||||
from bot import dispatcher, updater, botStartTime, IMAGE_URL
|
||||
from bot.helper.ext_utils import fs_utils
|
||||
|
|
@ -37,7 +39,7 @@ def stats(update, context):
|
|||
disk = psutil.disk_usage('/').percent
|
||||
stats = f'<b>Bot Uptime:</b> {currentTime}\n' \
|
||||
f'<b>Start Time:</b> {current}\n' \
|
||||
f'<b>Total disk space:</b> {total}\n' \
|
||||
f'<b>Total Disk Space:</b> {total}\n' \
|
||||
f'<b>Used:</b> {used} ' \
|
||||
f'<b>Free:</b> {free}\n\n' \
|
||||
f'📊Data Usage📊\n<b>Upload:</b> {sent}\n' \
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ def get_readable_message():
|
|||
msg += f"\n<b>Downloaded:</b> {get_readable_file_size(download.processed_bytes())} of {download.size()}"
|
||||
else:
|
||||
msg += f"\n<b>Uploaded:</b> {get_readable_file_size(download.processed_bytes())} of {download.size()}"
|
||||
msg += f"\n<b>Speed:</b> {download.speed()} | <b>ETA:</b> {download.eta()} "
|
||||
msg += f"\n<b>Speed:</b> {download.speed()}\n<b>ETA:</b> {download.eta()} "
|
||||
# if hasattr(download, 'is_torrent'):
|
||||
try:
|
||||
msg += f"\n<b>Seeders:</b> {download.aria_download().num_seeders}" \
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class DbManger:
|
|||
self.conn.commit()
|
||||
self.disconnect()
|
||||
SUDO_USERS.add(chat_id)
|
||||
return 'Successfully promoted as sudo'
|
||||
return 'Successfully promoted as Sudo'
|
||||
else:
|
||||
sql = 'INSERT INTO users VALUES ({},TRUE);'.format(chat_id)
|
||||
self.cur.execute(sql)
|
||||
|
|
@ -63,7 +63,7 @@ class DbManger:
|
|||
self.disconnect()
|
||||
AUTHORIZED_CHATS.add(chat_id)
|
||||
SUDO_USERS.add(chat_id)
|
||||
return 'Successfully Authorized and promoted as sudo'
|
||||
return 'Successfully Authorized and promoted as Sudo'
|
||||
|
||||
def db_rmsudo(self,chat_id: int):
|
||||
self.connect()
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ from speedtest import Speedtest
|
|||
from bot.helper.telegram_helper.filters import CustomFilters
|
||||
from bot import dispatcher, AUTHORIZED_CHATS
|
||||
from bot.helper.telegram_helper.bot_commands import BotCommands
|
||||
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup, ParseMode
|
||||
from telegram.ext import CallbackContext, Filters, run_async, CommandHandler
|
||||
from telegram import Update, ParseMode
|
||||
from telegram.ext import Filters, run_async, CommandHandler
|
||||
|
||||
|
||||
@run_async
|
||||
|
|
|
|||
Loading…
Reference in New Issue