# db-indonesia.js

> Database Indonesia JavaScript

Latest version **1.0.3** (published 2019-11-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install db-indonesia.js
pnpm add db-indonesia.js
yarn add db-indonesia.js
bun add db-indonesia.js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2019-11-02 |
| First published | 2019-11-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 31.9 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| Author | Hans Putera |
| Maintainers | hanspro |
| Keywords | Database |

## Links

- npm: https://www.npmjs.com/package/db-indonesia.js
- Repository: https://github.com/hansputera
- npm.io page: https://npm.io/package/db-indonesia.js

## Dependencies (2)

- [sqlite3](https://npm.io/package/sqlite3.md) ^4.1.0
- [sequelize](https://npm.io/package/sequelize.md) ^5.21.2

## Recent versions

- 1.0.3 (latest) — 2019-11-02
- 1.0.2 — 2019-11-02
- 1.0.1-beta — 2019-11-02
- 1.0.0-beta — 2019-11-02

## README

# Instalation

- `npm install db-indonesia.js`

# Using ?

```js

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');

```

---
_Source: https://npm.io/package/db-indonesia.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
