This is a package to simplify use of Wargaming API on Discord.
const { Warcord } = require('warcord')
const warcord = new Warcord('your-app-id')- Discord Server (In creation)
- GardZock (Owner).
World of Tanks
World of Tanks Blitz
In case you want to use the lib to look up users in the Wargaming API, use:
...
const user = await warcord.wargaming.wot.user.get('Wargaming ID of User')
//this returns user data.We don't always have the user ID in our hands, so we use the search method, which returns a user's information, such as ID and NickName.
...
const searchingUser = await warcord.wargaming.wot.user.search('Wargaming NickName of User')
//this returns an array of the users found.
const user = await warcord.wargaming.wot.user.get(searchingUser[0].id)
//this returns the first user data.If you are interested in seeing a user's 5 best tanks, use this:
...
const tank = await warcord.wargaming.wot.user.topTanks('Wargaming ID of User')
//this returns an Object Array with the 5 best tanks of a user.If you need get a clan by ID, use this:
...
const clan = await warcord.wargaming.wot.clan.get('ID of Clan')
//this returns clan data.You don't have the ID of clan? Use this to get!
...
const searchingClan = await warcord.wargaming.wot.clan.search('Name or Tag of Clan')
//this returns an array of the clans found
const clan = await warcord.wargaming.wot.clan.get(searchingClan[0].clan_id)
//this returns the first clan data....
const ratingOfClan = await warcord.wargaming.wot.clan.rating('ID of Clan')
//this returns an Object with rating of searched clan....
const tank = await warcord.wargaming.blitz.tank.get('ID of Tank')
//this returns an Object with tank data....
const user = await warcord.wargaming.blitz.user.get('Wargaming ID of User')
//this returns user data.We don't always have the user ID in our hands, so we use the search method, which returns a user's information, such as ID and NickName.
...
const searchingUser = await warcord.wargaming.blitz.user.search('Wargaming NickName of User')
//this returns an array of the users found.
const user = await warcord.wargaming.blitz.user.get(searchingUser[0].id)
//this returns the first user data.If you are interested in seeing a user's 5 best tanks, use this:
...
const tank = await warcord.wargaming.blitz.user.topTanks('Wargaming ID of User')
//this returns an Object Array with the 5 best tanks of a user.If you need get a clan by ID, use this:
...
const clan = await warcord.wargaming.blitz.clan.get('ID of Clan')
//this returns clan data.You don't have the ID of clan? Use this to get!
...
const searchingClan = await warcord.wargaming.blitz.clan.search('Name or Tag of Clan')
//this returns an array of the clans found
const clan = await warcord.wargaming.blitz.clan.get(searchingClan[0].clan_id)
//this returns the first clan data....
const tank = await warcord.wargaming.blitz.tank.get('ID of Tank')
//this returns an Object with tank data.