Remove manual sync command. It is done automatically

This commit is contained in:
moyamo 2015-12-18 20:56:36 +02:00
parent 034a2adfd3
commit 8e9e8a6476

14
bot.py
View file

@ -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