瀏覽代碼

minor fix (#136)

Aarav Arora 4 年之前
父節點
當前提交
80f9407bc2
共有 1 個文件被更改,包括 4 次插入 和 4 次删除
  1. 4 4
      wbb/modules/userbot.py

+ 4 - 4
wbb/modules/userbot.py

@@ -10,7 +10,7 @@ import re
 import subprocess
 import sys
 import traceback
-import asyncio
+from asyncio import sleep, create_subprocess_shell, subprocess
 from html import escape
 from io import StringIO
 from time import time
@@ -178,10 +178,10 @@ async def shellrunner(_, message: Message):
         shell = " ".join(code)
     else:
         shell = text
-    process = await asyncio.create_subprocess_shell(
+    process = await create_subprocess_shell(
               shell,
-              stdout=asyncio.subprocess.PIPE,
-              stderr=asyncio.subprocess.PIPE,
+              stdout=subprocess.PIPE,
+              stderr=subprocess.PIPE,
              )
     out, errorz = await process.communicate()
     if errorz: