Skip to content

Instantly share code, notes, and snippets.

@pvlv
Created May 19, 2019 09:48
Show Gist options
  • Save pvlv/085c0364cfd24f9af4af7fbc5654f0f5 to your computer and use it in GitHub Desktop.
Save pvlv/085c0364cfd24f9af4af7fbc5654f0f5 to your computer and use it in GitHub Desktop.
VK api

Ошибка в диалоге

  object:
   { date: 1558258457,
     from_id: 1001201,
     id: 107,
     out: 0,
     peer_id: 1001201,
     text: 'update message',
     conversation_message_id: 107,
     fwd_messages: [],
     important: false,
     random_id: 0,
     attachments: [],
     payload: '{"command":"update"}',
     is_hidden: false },
  group_id: 182473207 } +3ms
  vk-io:api http --> messages.edit +2m
  vk-io:updates http --> +45ms
  vk-io:api http <-- messages.edit 40ms +40ms
{ APIError: Code №15 - Access denied
  code: 15,
  name: 'APIError',
  params:
   [ { key: 'oauth', value: '1' },
     { key: 'method', value: 'messages.edit' },
     { key: 'v', value: '5.92' },
     { key: 'attachment', value: '' },
     { key: 'message', value: 'new text' },
     { key: 'keep_forward_messages', value: '1' },
     { key: 'keep_snippets', value: '1' },
     { key: 'peer_id', value: '1001201' },
     { key: 'message_id', value: '107' } ] }

Ошибка в чате

  object:
   { date: 1558258981,
     from_id: 1001201,
     id: 0,
     out: 0,
     peer_id: 2000000001,
     text: '[club182473207|@testeam_vk_bot] update message',
     conversation_message_id: 94,
     fwd_messages: [],
     important: false,
     random_id: 0,
     attachments: [],
     payload: '{"command":"update"}',
     is_hidden: false },
  group_id: 182473207 } +0ms
  vk-io:api http --> messages.edit +9m
  vk-io:updates http --> +5ms
  vk-io:api http <-- messages.edit 64ms +65ms
{ APIError: Code №100 - One of the parameters specified was missing or invalid: message_id is undefined
  code: 100,
  name: 'APIError',
  params:
   [ { key: 'oauth', value: '1' },
     { key: 'method', value: 'messages.edit' },
     { key: 'v', value: '5.92' },
     { key: 'attachment', value: '' },
     { key: 'message', value: 'new text' },
     { key: 'keep_forward_messages', value: '1' },
     { key: 'keep_snippets', value: '1' },
     { key: 'peer_id', value: '2000000001' },
     { key: 'message_id', value: '0' } ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment