Skip to content
This repository has been archived by the owner on Mar 6, 2021. It is now read-only.

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
xditya authored Sep 6, 2020
1 parent 21659d7 commit db957e6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions userbot/plugins/heroku.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
heroku_api = "https://api.heroku.com"


@register(outgoing=True, pattern=r"^\.(set|get|del) var(?: |$)(.*)(?: |$)([\s\S]*)")
@telebot.on(admin_cmd(outgoing=True, pattern=r"(set|get|del) var(?: |$)(.*)(?: |$)([\s\S]*)"))
async def variable(var):
"""
Manage most of ConfigVars setting, set new var, get current var,
Expand Down Expand Up @@ -96,7 +96,7 @@ async def variable(var):
return await var.edit(f"**{variable}** `is not exists`")


@register(outgoing=True, pattern=r"^\.usage(?: |$)")
@telebot.on(admin_cmd(outgoing=True, pattern=r"usage(?: |$)"))
async def dyno_usage(dyno):
"""
Get your account Dyno Usage
Expand Down Expand Up @@ -154,7 +154,7 @@ async def dyno_usage(dyno):
)


@command(pattern="^.info heroku")
@telebot.on(admin_cmd(pattern="info heroku"))
async def info(event):
await borg.send_message(event.chat_id, "**Info for Module to Manage Heroku:**\n\n`.usage`\nUsage:__Check your heroku dyno hours status.__\n\n`.set var <NEW VAR> <VALUE>`\nUsage: __add new variable or update existing value variable__\n**!!! WARNING !!!, after setting a variable the bot will restart.**\n\n`.get var or .get var <VAR>`\nUsage: __get your existing varibles, use it only on your private group!__\n**This returns all of your private information, please be cautious...**\n\n`.del var <VAR>`\nUsage: __delete existing variable__\n**!!! WARNING !!!, after deleting variable the bot will restarted**")
await event.delete()
Expand All @@ -168,7 +168,7 @@ def prettyjson(obj, indent=2, maxlinelength=80):
return indentitems(items, indent, level=0)


@register(outgoing=True, pattern=r"^\.logs")
@telebot.on(admin_cmd(outgoing=True, pattern=r"logs"))
async def _(givelogs):
try:
Heroku = heroku3.from_key(Var.HEROKU_API_KEY)
Expand All @@ -182,9 +182,9 @@ async def _(givelogs):
givelogs.chat_id,
"logs.txt",
reply_to=givelogs.id,
caption="Logs Collected Using Heroku",
caption="[Heroku] TeleBot Logs ",
)
await givelogs.edit("Trying To Send Logs.....")
await givelogs.edit("Heroku Logs Incoming!!")
await asyncio.sleep(5)
await givelogs.delete()
return os.remove('logs.txt')

0 comments on commit db957e6

Please sign in to comment.