Skip to content

Commit

Permalink
[0.0.3.1] Fixed minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
z00k committed Jun 24, 2015
1 parent 0bd44b0 commit 3535089
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PyVKBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ def printexception(botvkid):
report = requests.post("http://bot.mew.su/service/listenerror.php",
data={'botid': botvkid,
'text': 'LINE {} "{}"): {}'.format(lineno, line.strip(), exc_obj)}, verify=False)
print(report)
version = '0.0.3.1'

# Берем данные из конфига
config = configparser.ConfigParser()
config.read('config.ini')

# Inputs and shit
if (config['main']['token']) and (config['main']['botid']):
print("Прошлые данные были восстановленны. Если желаете их имзенить - отредактируйте config.ini")
print("Прошлые данные были восстановлены. Если желаете их изменить - отредактируйте config.ini")
at = config['main']['token']
bid = config['main']['botid']
elif (config['main']['token'] == '') and (config['main']['botid'] == ''):
Expand Down Expand Up @@ -167,7 +167,7 @@ def printexception(botvkid):
resp = requests.post("http://bot.mew.su/service/speak.php",
data={'session': session.text, 'botid': str(jsn['id']),
'sender': str(info['id']), 'ischat': '0',
'text': parseitems[inte]['body']}, verify=False)
'text': parseitems[inte]['body'], 'version': version}, verify=False)
print(info['first_name'], info['last_name'], "-", info['id'])
print(parseitems[inte]['body'])
print("Ответ:", resp.text)
Expand Down
4 changes: 4 additions & 0 deletions config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[main]
token =
botid =

0 comments on commit 3535089

Please sign in to comment.