Browse Source

Remove manual sync command. It is done automatically

pull/39/head
moyamo 7 years ago
parent
commit
8e9e8a6476
  1. 14
      bot.py

14
bot.py

@ -37,7 +37,6 @@ class Bot():
self.commands = {
"help": self._help,
"prune": self._prune,
"sync": self._sync,
"groups": self._groups,
"getgroups": self._getgroups
}
@ -71,23 +70,10 @@ class Bot():
self.session.backend.handleMessage(self.session.user, self.name, message)
# commands
def _sync(self):
user = self.session.legacyName
password = self.session.password
count = self.session.buddies.sync(user, password)
self.session.updateRoster()
if count:
self.send("sync complete, %d buddies are using WhatsApp" % count)
else:
self.send("sync failed, sorry something went wrong")
def _help(self):
self.send("""following bot commands are available:
\\help show this message
\\prune clear your buddylist
\\sync sync your imported contacts with WhatsApp
following user commands are available:
\\lastseen request last online timestamp from buddy

Loading…
Cancel
Save