Skip to content

Instantly share code, notes, and snippets.

@Surye
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Surye/9e8966feeb97fc8559b4 to your computer and use it in GitHub Desktop.
Save Surye/9e8966feeb97fc8559b4 to your computer and use it in GitHub Desktop.
import tgl
def cinfo(success, chat):
for userid in chat.user_list:
user = tgl.Peer(type=tgl.PEER_USER, id=userid)
print(user)
def on_msg_receive(msg):
peer = msg.dest
if peer.type is tgl.PEER_CHAT:
peer.info(cinfo)
tgl.set_on_msg_receive(on_msg_receive)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment