Remove manual sync command. It is done automatically
This commit is contained in:
parent
034a2adfd3
commit
8e9e8a6476
14
bot.py
14
bot.py
|
@ -37,7 +37,6 @@ class Bot():
|
||||||
self.commands = {
|
self.commands = {
|
||||||
"help": self._help,
|
"help": self._help,
|
||||||
"prune": self._prune,
|
"prune": self._prune,
|
||||||
"sync": self._sync,
|
|
||||||
"groups": self._groups,
|
"groups": self._groups,
|
||||||
"getgroups": self._getgroups
|
"getgroups": self._getgroups
|
||||||
}
|
}
|
||||||
|
@ -71,23 +70,10 @@ class Bot():
|
||||||
self.session.backend.handleMessage(self.session.user, self.name, message)
|
self.session.backend.handleMessage(self.session.user, self.name, message)
|
||||||
|
|
||||||
# commands
|
# 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):
|
def _help(self):
|
||||||
self.send("""following bot commands are available:
|
self.send("""following bot commands are available:
|
||||||
\\help show this message
|
\\help show this message
|
||||||
\\prune clear your buddylist
|
\\prune clear your buddylist
|
||||||
\\sync sync your imported contacts with WhatsApp
|
|
||||||
|
|
||||||
following user commands are available:
|
following user commands are available:
|
||||||
\\lastseen request last online timestamp from buddy
|
\\lastseen request last online timestamp from buddy
|
||||||
|
|
Loading…
Reference in a new issue