Add Heroku shutdown
This commit is contained in:
parent
590b4edd0c
commit
3f60e1975a
|
|
@ -8,7 +8,11 @@ from bot.helper import check_heroku
|
|||
@app.on_message(filters.command(['reboot', f'reboot@{bot.username}']) & filters.user(OWNER_ID))
|
||||
@check_heroku
|
||||
async def gib_restart(client, message, hap):
|
||||
msg_ = await message.reply_text("[HEROKU] - Restarting")
|
||||
msg_ = await message.reply_text("**[HEROKU] - Restarting**")
|
||||
hap.restart()
|
||||
|
||||
|
||||
@app.on_message(filters.command(['shutdown', f'shutdown@{bot.username}']) & filters.user(OWNER_ID))
|
||||
@check_heroku
|
||||
async def shutdown(client, message, app_):
|
||||
msg_ = await message.reply_text("**[HEROKU] - Shutdown**\n\n**NOTE: You need to turn on manual from Heroku to use this bot again.**")
|
||||
app_.process_formation()["worker"].scale(0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue