Add wait message.
This commit is contained in:
parent
c5de892685
commit
898f2ddf26
1 changed files with 10 additions and 4 deletions
|
@ -175,9 +175,13 @@ class SyncBot(Tox):
|
|||
|
||||
def on_friend_message(self, friendid, message):
|
||||
if message == 'invite':
|
||||
if not self.tox_group_id is None:
|
||||
print('Inviting %s' % self.get_name(friendid))
|
||||
self.invite_friend(friendid, self.tox_group_id)
|
||||
return
|
||||
else:
|
||||
message = 'Waiting for GroupBot, please try again in 1 min.'
|
||||
|
||||
self.ensure_exe(self.send_message, (friendid, message))
|
||||
|
||||
def send_both(self, content):
|
||||
|
@ -188,6 +192,8 @@ class SyncBot(Tox):
|
|||
cmd = cmd[1:]
|
||||
if cmd in ['syncbot', 'echobot']:
|
||||
self.send_both(self.get_address())
|
||||
elif cmd == 'resync':
|
||||
sys.exit(0)
|
||||
elif cmd.startswith('remember '):
|
||||
args = cmd[9:].split(' ')
|
||||
subject = args[0]
|
||||
|
|
Loading…
Reference in a new issue