- Added start time
Notes: Default time is using Asia/Jakarta.
You can change to your time in main.py
- Change some command in anime module
This commit is contained in:
Hafitz Setya 2021-04-23 08:41:56 +07:00 committed by GitHub
parent c9da00d8db
commit 4c3ff77bcc
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "slam-mirrorbot ",
"description": "Telegram mirror bot with python",
"description": "A Telegram bot for all your mirror needs",
"logo": "https://telegra.ph/file/6507910fd06d18dfaba82.jpg",
"keywords": [
"bot",
@ -8,7 +8,7 @@
"python"
],
"repository": "https://github.com/breakdowns/slam-mirrorbot",
"website": "https://t.me/SlamMirrorSupportGroup",
"website": "https://t.me/SlamMirrorSupport",
"success_url": "https://github.com/breakdowns/slam-mirrorbot/blob/master/README.md",
"stack": "container",
"env": {

View File

@ -16,10 +16,12 @@ from .helper.ext_utils.bot_utils import get_readable_file_size, get_readable_tim
from .helper.telegram_helper.filters import CustomFilters
from .modules import authorize, list, cancel_mirror, mirror_status, mirror, clone, watch, shell, eval, anime, stickers, search, delete, speedtest, usage
now=datetime.now(pytz.timezone('Asia/Jakarta'))
@run_async
def stats(update, context):
currentTime = get_readable_time((time.time() - botStartTime))
current = now.strftime('%Y/%m/%d %I:%M:%S')
total, used, free = shutil.disk_usage('.')
total = get_readable_file_size(total)
used = get_readable_file_size(used)
@ -30,6 +32,7 @@ def stats(update, context):
memory = psutil.virtual_memory().percent
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>Used:</b> {used} ' \
f'<b>Free:</b> {free}\n\n' \

View File

@ -252,16 +252,16 @@ def manga(update: Update, _):
@run_async
def weebhelp(update, context):
help_string = '''
`/al`*:* search anime
`/chr`*:* search character
`/mng`*:* search manga
`/anime`*:* search anime
`/character`*:* search character
`/manga`*:* search manga
'''
update.effective_message.reply_photo("https://telegra.ph/file/db03910496f06094f1f7a.jpg", help_string, parse_mode=ParseMode.MARKDOWN)
ANIME_HANDLER = CommandHandler("al", anime)
CHARACTER_HANDLER = CommandHandler("chr", character)
MANGA_HANDLER = CommandHandler("mng", manga)
ANIME_HANDLER = CommandHandler("anime", anime)
CHARACTER_HANDLER = CommandHandler("character", character)
MANGA_HANDLER = CommandHandler("manga", manga)
WEEBHELP_HANDLER = CommandHandler("weebhelp", weebhelp)
dispatcher.add_handler(ANIME_HANDLER)

View File

@ -23,3 +23,4 @@ messages
js2py
lxml
telegraph
pytz