# powerds

> A powerful discord libary

Latest version **0.1.1** (published 2019-07-19) · 0 weekly downloads

## Install

```sh
npm install powerds
pnpm add powerds
yarn add powerds
bun add powerds
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2019-07-19 |
| First published | 2019-07-19 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | buj351 |

## Links

- npm: https://www.npmjs.com/package/powerds
- npm.io page: https://npm.io/package/powerds

## Dependencies (1)

- [discord.js](https://npm.io/package/discord.js.md) ^11.5.1

## Recent versions

- 0.1.1 (latest) — 2019-07-19
- 0.1.0 — 2019-07-19

## README

###About PowerDS

This is a package-based discord.js addon
(Now in beta)

##Why PowerDS

This addon has a easy usage. You can easily manage packets and catching commands

###Documentation

##Loging in

For loging in you just need to create a object of PowerClient

```javascript
const $ = require('powerds');

const client = $.PowerClient('token', 'prefix');
```

You will automatially login in

##Packages

#Create a package

Packages (or Asset Packages) is a objects which contains a declarations of different events like **OnCommandSendedEvent(event)**

For declare a package use **PowerClient.CreatePackage(name, callback)**

```javascript
client.CreatePackage('main', pkg => { //pkg is our package object
	pkg.OnCommandSendedEvent(event => { //Event declaration
		//Event implementation
	})
	//Other events
})
```

##Events

#OnCommandSendedEvent

This event using for make command implementations. Callback value is Command object

```javascript
const $ = require('powerds');

const client = $.PowerClient('token'); //Prefix is automatiallsy setted to '$'

client.CreatePackage('main', pkg => {
	pkg.OnCommandSendedEvent(event => { //Event here is a Command object
		event.OnCommand('hello').then((message, args) => { //Definition of command
			$.printf(message.channel, 'world'); //Send 'world' to a channel
		});
		event.OnCommand('text').argMinCount(1, 'I nead at lest one argument').then((message, args) => { //Definition of command with minimum one argument
			$.printf(message.channel, args[1]); //Argument array startr from 1
		});
	})
})
```

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