Skip to content

Commit

Permalink
v4.6.8 (breakdowns#61)
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
breakdowns authored Apr 23, 2021
1 parent c9da00d commit 4c3ff77
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"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",
"telegram",
"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": {
Expand Down
3 changes: 3 additions & 0 deletions bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
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)
Expand All @@ -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' \
Expand Down
12 changes: 6 additions & 6 deletions bot/modules/anime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ messages
js2py
lxml
telegraph
pytz

0 comments on commit 4c3ff77

Please sign in to comment.