Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- settings = {
- "stalk": {}
- }
- if text.startswith("stalk:on "):
- res = text.split(" ")
- groups = client.getGroupIdsJoined()
- group = groups[int(res[0])-1]
- settings['stalk'][group] = {'to': to}
- client.sendMessage(to,"Ready to stalk group : {}".format(client.getGroup(group).name))
- if text.startswith("stalk:off "):
- res = text.split(" ")
- groups = client.getGroupIdsJoined()
- group = groups[int(res[0])-1]
- if group not in settings['stalk']:
- return client.sendMessage(to,"Stalk not active on group : {}".format(client.getGroup(group).name))
- del settings['stalk'][group]
- client.sendMessage(to,"Deactive stalk on group : {}".format(client.getGroup(group).name))
- if op.type == 26:
- if msg.contentType == 0:
- if to in settings["stalk"]:
- ret = "Text : {}".format(text)
- ret += "\nFrom : @!".format(sender)
- ret += "\nTime : {}".format(str(time))
- client.sendMention(settings["stalk"][to]["to"], str(ret), [sender])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement