Commit 5994d34e authored by Vincent Castellano's avatar Vincent Castellano

Implement calling from python into C. Need to implement command queue to execute during netloop.

parent 3a13f800
import tgl
import pprint
our_id = 0
pp = pprint.PrettyPrinter(indent=4)
def on_binlog_replay_end():
pass
def on_get_difference_end():
pass
def on_our_id():
pass
def on_our_id(id):
our_id = id
return "Set ID: " + str(our_id)
def on_msg_receive(msg):
pp.pprint(msg)
tgl.send_msg(msg["from"]["type"], msg["from"]["id"], "PONG!")
return "Got msg from " + msg["from"]["peer"]["first_name"]
def on_secret_chat_update(peer, types):
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment