1.1.0 • Published 4 years ago
discord-coins v1.1.0
discord-coins
Discord Coins is a free discord money system for npmjs.
This is under HIGH development at the moment.
If these do not work then we are going to make a new one later. To be notified about the updates, join my discord.
Installation
npm i discord-coins
Methods
.Balance .Add .Subtract
Loading and using the module
We suggest you load the module via require
, pending the stabalizing of the modules in node:
const discordcoins = require("discord-coins")
You should start by using some code.
const discordcoins = require("discord-coins")
const Discord = require("discord.js")
const bot = new Discord.Client();
const prefix = "."
bot.on("message", message => {
if (message.content === `${prefix}BAL`) {
let Balance = discordcoins.Balance(message.author.id)
message.channel.send(`Their balance is ${Balance}!`)
}
})
Now we can use subtract.
const discordcoins = require("discord-coins")
const Discord = require("discord.js")
const bot = new Discord.Client();
const prefix = "."
bot.on("message", message => {
if (message.content === `${prefix}ADD`) {
let Add = discordcoins.Add(message.author.id, 100) //100 is the amount you want to add.
message.channel.send(Add)
}
})
You can use subtract, just switch everything that says Add to Subtract.