This repository contains a template for creating bots using the Aoi.js library with integration to the Supercell API. The goal of this template is to provide a solid and easy-to-use foundation for developers looking to build custom bots that interact with Brawl Stars data, such as player statistics and match information.
If you'd like to create a new project based on this one, follow these steps:
git clone https://github.com/ladyneo/aoi-brawlapi.git
cd aoi-brawlapi
npm install
This will clone the repository, creating a new directory, and installing the aoi.js dependency.
First you need to create an account on one of Supercell's APIs.
- Brawl Stars
- Clash of Clans
- Clash Royale Then you need to access the "My Account" tab.
Now you must create a new key:
Now copy the token.
After that use the following function:
$registerToken[here-goes-the-name-of-the-token;here-goes-the-token-you-copied]
Parameters with ? at the end of the name are optional parameters.
$registerToken[token-name;token]
$unregisterToken[token-name]
$getTokens[sep?]
$getTokenValue[token-name]
$getPlayerName[game (coc/cr/bs);#PlayerID;token-name]
$getPlayerTrophies[#PlayerID;token-name]
$getPlayerClubName[#PlayerID;token-name]
$getPlayerClubTrophies[#PlayerID;token-name]
$getPlayerClubID[#PlayerID;token-name]