Henrik-3 / unofficial-valorant-api

Unofficial VALORANT API using the VALORANT Ingame API
442 stars 19 forks source link

const VAPI = new HenrikDevValorantAPI(); #58

Closed vismodo closed 2 years ago

vismodo commented 2 years ago
const { HenrikDevValorantAPI } = require('unofficial-valorant-api')
const VAPI = new HenrikDevValorantAPI();

The code above throws an error

TypeError: HenrikDevValorantAPI is not a constructor`

How do I fix this?

Coops0 commented 2 years ago

Remove the curly braces from the import. You're using object destructuring where you don't need to be.

const HenrikDevValorantAPI = require('unofficial-valorant-api');
const VAPI = new HenrikDevValorantAPI();