1.0.4 • Published 3 years ago

discord-wallet v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Welcome to Wallet!

Wallet is a project designed to connect Discord's economy bots. With a simple installation and set-up, any dev can add their bot to the Wallet economy!

Questions? Comments? Concerns? Join the Discord server! https://discord.gg/aKGv9z2g8B

Getting Started

const Wallet = require('discord-wallet');


Wallet.addToWallet(client, userID, amountOfCurrency, currencySymbol /* Optional, defaults to $ */);

Wallet.removeFromWallet(client, userID, amountOfCurrency, currencySymbol);

Wallet.checkBalance(client, userID, currencySymbol);

// Including a currency symbol will affect how your currency is viewed in the Wallet bot.

Example

const Discord = require('discord.js');
const Wallet = require('discord-wallet');

const client = new Discord.Client();

client.on('message', async message => {
    const command = message.content.split(' ');
    const args = message.content.split(' ').shift();

    if(command == '!wallet') {
        if(args[0] == 'add') {
            let deposit = await Wallet.addToWallet(client, message.author.id, args[1]);

            console.log(deposit);
            // In case of error.

            yourDatabase.money -= args[1];
            // Remove the amount from your database.

            message.channel.send(`Desposited ${args[0]} in your Wallet.`);
        }

        if(args[0] == 'balance') {
            let balance = await Wallet.checkBalance(client, message.author.id);

            message.channel.send(`You have $${balance} in your Wallet.`);
        }
    }
})

Warning: Abuse of any of Wallet's features will have your bot banned. Think you've found an exploit? Let us know in the Discord server.

1.0.2

3 years ago

1.0.1

3 years ago

1.0.2-common

3 years ago

0.0.10

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

0.0.9

3 years ago

1.0.2-readme

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

1.0.0

3 years ago