Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Warcord/WarCord-2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WarCord

This is a package to simplify use of Wargaming API on Discord.

NPM

Initial Files:

const { Warcord } = require('warcord')
const warcord = new Warcord('your-app-id')

Useful Links

  • Discord Server (In creation)

Credits

Topics

World of Tanks

World of Tanks Blitz

World Of Tanks Functions

User Wot

Getting a user by ID Wot

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.

Searching a user by name Wot

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.

Top Tanks of user Wot

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.

Clan Wot

Getting a clan by ID Wot

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.

Searching a clan by name or tag Wot

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.

Rating of clan Wot

...
const ratingOfClan = await warcord.wargaming.wot.clan.rating('ID of Clan')
//this returns an Object with rating of searched clan.

Tank Wot

Getting a tank by ID Wot

...
const tank = await warcord.wargaming.blitz.tank.get('ID of Tank')
//this returns an Object with tank data.

User Wotb

...
const user = await warcord.wargaming.blitz.user.get('Wargaming ID of User')
//this returns user data.

Searching a user by name Wotb

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.

Top Tanks of user Wotb

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.

Clan Wotb

Getting a clan by ID Wotb

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.

Searching a clan by name or tag Wotb

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.

Tank Wotb

Getting a tank by ID Wotb

...
const tank = await warcord.wargaming.blitz.tank.get('ID of Tank')
//this returns an Object with tank data.