summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/main.py b/main.py
index 9763bfa..a65c706 100644
--- a/main.py
+++ b/main.py
@@ -3,7 +3,7 @@ import asyncio
import tele
async def on_str(s):
- await tele.client.send_message("+46703279113", s)
+ await tele.client.send_message("+46763060644", s)
async def on_tab():
@@ -11,12 +11,15 @@ async def on_tab():
def main():
- messages = ["hej", "vad", "är", "klockan"]
- tele.messages = messages
- tele.redraw = cursed.redraw
- with tele.client:
- tele.client.start()
- with cursed.Console() as c:
+ messages = []
+ with cursed.Console() as c:
+ def redraw(messages):
+ cursed.redraw(c.stdscr, messages)
+
+ tele.messages = messages
+ tele.redraw = redraw
+ with tele.client:
+ tele.client.start()
tele.client.loop.run_until_complete(cursed.start(c, on_str, on_tab, messages))