wrapper and docs update.

This commit is contained in:
ingvar1995
2016-04-30 15:18:15 +03:00
parent 6a82b7d285
commit 59c72486f4
6 changed files with 45 additions and 49 deletions

5
bot.py
View File

@@ -3,7 +3,7 @@ import os
from settings import *
from toxcore_enums_and_consts import *
from ctypes import *
from util import log, Singleton
from util import Singleton
from file_transfers import *
from collections import defaultdict
@@ -62,7 +62,7 @@ class Bot(Singleton):
:param friend_num: number of friend who sent message
:param message: text of message
"""
id = self._tox.friend_get_public_key(friend_num)
id = self._tox.friend_get_public_key(friend_num) # public key of user
settings = Settings.get_instance()
message = message.strip()
# message parsing
@@ -277,6 +277,7 @@ class Bot(Singleton):
:param tox_id: tox id of contact
:param message: message
"""
print 'Friend request:', message
self._tox.friend_add_norequest(tox_id)
settings = Settings.get_instance()
# give friend default rights