Skip to content

Commit db3d134

Browse files
authored
Update callback_bot.py (#452)
Неполный путь до ключа from_id
1 parent 1c27030 commit db3d134

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/callback_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def bot():
4949
# если же это сообщение, отвечаем пользователю
5050
elif data['type'] == 'message_new':
5151
# получаем ID пользователя
52-
from_id = data['object']['from_id']
52+
from_id = data['object']['message']['from_id']
5353
# отправляем сообщение
5454
vk.messages.send(
5555
message='Hello World!',

0 commit comments

Comments
 (0)