Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. settings = {
  2. "stalk": {}
  3. }
  4.  
  5. if text.startswith("stalk:on "):
  6. res = text.split(" ")
  7. groups = client.getGroupIdsJoined()
  8. group = groups[int(res[0])-1]
  9. settings['stalk'][group] = {'to': to}
  10. client.sendMessage(to,"Ready to stalk group : {}".format(client.getGroup(group).name))
  11.  
  12. if text.startswith("stalk:off "):
  13. res = text.split(" ")
  14. groups = client.getGroupIdsJoined()
  15. group = groups[int(res[0])-1]
  16. if group not in settings['stalk']:
  17. return client.sendMessage(to,"Stalk not active on group : {}".format(client.getGroup(group).name))
  18. del settings['stalk'][group]
  19. client.sendMessage(to,"Deactive stalk on group : {}".format(client.getGroup(group).name))
  20.  
  21. if op.type == 26:
  22. if msg.contentType == 0:
  23. if to in settings["stalk"]:
  24. ret = "Text : {}".format(text)
  25. ret += "\nFrom : @!".format(sender)
  26. ret += "\nTime : {}".format(str(time))
  27. client.sendMention(settings["stalk"][to]["to"], str(ret), [sender])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement