I need to make output and input work at the same time. Already tried to make it several times, watched like 10 the same posts but they don't solve my problem at all.
tried solving by using prompt_toolkit library more solutions i tried to use: Python async: Waiting for stdin input while doing other stuff https://www.reddit.com/r/learnpython/comments/oqn18z/comment/h6cnpti/?utm_source=share&utm_medium=web2x&context=3
I saw people saying that better creating gui than terminal interface, but I need to make commands and don't know how to make terminal gui in like pyqt, and I think my stuff looks better in console than gui.
Also, i saw this post Problem with ainput (Async input in Python) in category "Review questions already on Stack Overflow to see if your question is a duplicate" and saw something in it, but I don't see how to use it properly or if its any helpful.
Example code:
user = User("...")
@user.on.message(text="ping")
async def messagehandler(msg: Message):
msg.answer("pong")
async def main():
while True:
command = input(Style.RESET_ALL + " > ")
await HandleCommand(command)
user.loop.run_until_complete(main())
user.run_forever()