db-indonesia.js
v1.0.3
Published
Database Indonesia JavaScript
Downloads
2
Readme
Instalation
npm install db-indonesia.js
Using ?
const Discord = require('discord.js');
const client = new Discord.Client();
const { Users, CurrencyShop } = require('./dbObjects');
const { Op } = require('sequelize');
const currency = new Discord.Collection();
const PREFIX = '!';
// [alpha]
client.once('ready', async () => {
// [beta]
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', async message => {
if (message.author.bot) return;
currency.add(message.author.id, 1);
if (!message.content.startsWith(PREFIX)) return;
const input = message.content.slice(PREFIX.length).trim();
if (!input.length) return;
const [, command, commandArgs] = input.match(/(\w+)\s*([\s\S]*)/);
if (command === 'balance') {
// [gamma]
} else if (command === 'inventory') {
// [delta]
} else if (command === 'transfer') {
// [epsilon]
} else if (command === 'buy') {
// [zeta]
} else if (command === 'shop') {
// [theta]
} else if (command === 'leaderboard') {
// [lambda]
}
});
client.login('your-token-goes-here');