Commands

In this page you can find all the commands available

For this to work make sure to install discord.js

Basic Setup

const Discord = require('discord.js') //npm i discord.js
const client = new Discord.Client()
const prodigous = require('prodigous') //npm i prodigous
const prefix = "!"
client.on('ready', () => {
console.log(`logged in as ${client.user.username}`)
})
client.on('message', async(message) => {
const args = message.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();
if(command === 'commandName') {
message.channel.send("working")
}
})
client.login("TOKEN")

Have a advance command handler?

The function all works the same way just import the package on every file where you want to use the package

Command list

Economy

Before using any of these methods do the following:

await prodigous.connect("MONGO_DB_URI") //Put this at the bottom in index.js or your main file

Balance Command

if(command === 'balance') {
let member = message.mentions.users.first() || message.author;
await prodigous.balanceCommand(message, member.id)
}
//Four lines

Reset all command

if(command === "resetall") {
await prodigous.resetAll(message) //Resets all the currency to 0
} 

Leaderboard command

if(command === 'leaderboard') {
await prodigous.leaderboardCommand(message, client)
}

Add money command

if(command === 'add') {
let member = message.mentions.users.first()
if(!member) return message.channel.send("Invalid member")
if(!args[1]) return message.channel.send("Need a amount")
await prodigous.addCommand(member.id, args[1])
}

The following commands are still in Beta

Blackjack command

if(command === 'blackjack') {
await prodigous.blackjackCommand(message)
}

Voice Tracker

Before using any of these method do the following

client.on('voiceStateUpdate', async(oldState, newState) => {
await prodigous.voiceStart(oldState, newState)
})

These methods are still in beta so use it at your own risk

Time command

if(command === 'time') {
let member = message.mentions.users.first() || message.author;
await prodigous.timeCommand(member.id, message) //get user time spend in vc
}

Voice leaderboard command

if(command === 'voice-lb') {
await prodigous.voiceLeaderboard(client, message)
}

More command coming soon...

Last updated