teamx-cloner commited on
Commit
dc7c4ba
·
1 Parent(s): f6f8afe

Update _bot.py

Browse files
Files changed (1) hide show
  1. plugins/_bot.py +13 -12
plugins/_bot.py CHANGED
@@ -104,21 +104,22 @@ heroku_api = Var.HEROKU_API
104
 
105
  @ultroid_cmd(
106
  pattern="restart$",
107
- fullsudo=True,
108
  )
109
- async def restartbt(ult):
110
- ok = await ult.eor(get_string("bot_5"))
111
- call_back()
112
- who = "bot" if ult.client._bot else "user"
113
- udB.set_key("_RESTART", f"{who}_{ult.chat_id}_{ok.id}")
114
- if heroku_api:
115
- return await restart(ok)
116
  await bash("git pull && pip3 install -r requirements.txt")
117
- if len(sys.argv) > 1:
118
- os.execl(sys.executable, sys.executable, "main.py")
119
- else:
120
- os.execl(sys.executable, sys.executable, "-m", "xteam")
121
 
 
 
 
 
 
 
 
 
 
122
 
123
  @ultroid_cmd(
124
  pattern="shutdown$",
 
104
 
105
  @ultroid_cmd(
106
  pattern="restart$",
107
+ fullsudo=False,
108
  )
109
+ async def restart(e):
110
+ await e.eor("`Processing...`")
 
 
 
 
 
111
  await bash("git pull && pip3 install -r requirements.txt")
112
+ os.execl(sys.executable, sys.executable, "-m", "xteam")
 
 
 
113
 
114
+ @ayra_cmd(
115
+ pattern="Restart$",
116
+ fullsudo=False,
117
+ )
118
+ async def restart(e):
119
+ await e.eor("`Processing...`")
120
+ await bash("git pull")
121
+ await e.eor("Done.")
122
+ os.execl(sys.executable, sys.executable, "-m", "xteam")
123
 
124
  @ultroid_cmd(
125
  pattern="shutdown$",