function test () {
return axios( { method: 'post', url: `https://api.vk.com/method/messages.send` } ).then( ( { data } ) => {
console.log( data );
data.response ? Promise.resolve( data.response ) : Promise.reject( data.error )
} ).catch( error => {
console.log( error.toJSON().message );
} )
}
test()