EconomyBalance class

const economyBalance = new EconomyBalance(client: Client, guildMember: GuildMember);

constructor

The EconomyBalance class requires two arguments. The first argument must be an instance of the Discord.js Client class which represents the bot. The second argument must be an instance of the Discord.js GuildMember class which represents the member where to get the economy info from.

Properties

bank

A number which represents the value the member has on it's bank in the economy system.

cash

A number which represents the value the member has as cash in the economy system.

Functions

setBank

economyBalance.setBank(amount: number) : Promise<EconomyBalance>;

Updates the amount the member has on it's bank. The function returns a Promise which returns an instance of the EconomyBalance class with the updated data.

ArgumentDescription

amount

A number which represents the amount the member's bank should be changed to.

setCash

economyBalance.setCash(amount: number) : Promise<EconomyBalance>;

Updates the amount the member has as cash. The function returns a Promise which returns an instance of the EconomyBalance class with the updated data.

ArgumentDescription

amount

A number which represents the amount the member's cash should be changed to.

Last updated