This commit is contained in:
levina 2022-02-10 12:10:08 +07:00 committed by GitHub
parent a4826c67c7
commit 6f39b11ff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,6 @@
import asyncio
import socket
from config import HEROKU_API_KEY
from driver.core import bot, calls
from driver.database.dbqueue import remove_active_chat
from driver.queues import QUEUE, clear_queue, get_queue, pop_an_item
@ -144,3 +146,13 @@ async def bash(cmd):
err = stderr.decode().strip()
out = stdout.decode().strip()
return out, err
async def is_heroku():
return "heroku" in socket.getfqdn()
async def user_input(input):
if " " in input or "\n" in input:
return str(input.split(maxsplit=1)[1].strip())
return ""