diff options
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,8 +1,9 @@ import cursed import asyncio +import tele async def on_str(s): - print(s) + await tele.client.send_message("+46703279113", s) async def on_tab(): @@ -10,11 +11,10 @@ async def on_tab(): def main(): - print("hejhej") - with cursed.Console() as c: - print("hej") - print(c) - asyncio.new_event_loop().run_until_complete(cursed.start(c, on_str, on_tab)) + with tele.client: + tele.client.start() + with cursed.Console() as c: + tele.client.loop.run_until_complete(cursed.start(c, on_str, on_tab)) if __name__=="__main__": |
