blob: eb2b3b23a9f4ff4d114698f7d63722368de3c43d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import cursed
import asyncio
import tele
async def on_str(s):
await tele.client.send_message("+46763060644", s)
async def on_tab():
print("tab")
def main():
messages = []
with cursed.Console(messages) as c:
tele.messages = messages
tele.redraw = lambda: c.redraw()
with tele.client:
tele.client.start()
tele.client.loop.run_until_complete(c.start(on_str, on_tab))
if __name__=="__main__":
main()
|