# discord-options

> A module to use more easily the Discord functions.

Latest version **0.0.8** (published 2020-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install discord-options
pnpm add discord-options
yarn add discord-options
bun add discord-options
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2020-06-17 |
| First published | 2020-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Zerio |
| Maintainers | zeriooo |
| Keywords | discord, functions |

## Links

- npm: https://www.npmjs.com/package/discord-options
- Repository: https://github.com/ZerioDev
- Issues: https://github.com/ZerioDev
- npm.io page: https://npm.io/package/discord-options

## Dependencies (1)

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

## Recent versions

- 0.0.8 (latest) — 2020-06-17
- 0.0.7 — 2020-06-17
- 0.0.6 — 2020-06-17
- 0.0.5 — 2020-06-17
- 0.0.4 — 2020-06-17
- 0.0.3 — 2020-06-17
- 0.0.2 — 2020-06-17
- 0.0.1 — 2020-06-17

## README

## Installation

To install the module :

```
npm install --save discord-options@0.0.8
```

## Presentation

Discord options is a module designed to optimize and make the functions easier to use.
It is recommended to use the latest version of discord.js to use this module !

## Utilisation

All functions :

Server information :

- `[GUILD.ID]` //Get server ID
- `[GUILD.NAME]` //Get server name
- `[GUILD.OWNER]` //Get the name of the creator of the server
- `[GUILD.CHANNELS.SIZE]` //Get the total number of channels
- `[GUILD.CHANNELS.TEXT]` //Get total number of text channels
- `[GUILD.CHANNELS.VOICE]` //Get the total number of voice channels
- `[GUILD.CHANNELS.CATEGORY]` //Get the total number of categories

Bot information :

- `[BOT.PING]` //Get the latency in ms of the bot

Maintenance (do not work at the moment) :

- Nothing at the moment.

A short example :

```js
//Module
const Translate = require("discord-options");

//It analyzes the message and replaces if necessary
let text = await Translate.options("The name of this server is [GUILD.ID]", message, client)

//It sends the modified message if necessary
message.channel.send(text)
```

Or in an embed for example :

```js
//Module
const Translate = require("discord-options");

//Options
var ID = await Translate.options("[GUILD.ID]", message, client)
var NAME = await Translate.options("[GUILD.NAME]", message, client)
var OWNER = await Translate.options("[GUILD.OWNER]", message, client)

//New embed
const embed = new Discord.MessageEmbed()

//Color
embed.setColor("RED")

//Title
embed.setAuthor(`Informations`)

//Options
embed.addField("ID", ID, true)
embed.addField("Name", NAME, true)
embed.addField("Owner", OWNER, true)

//Add picture
embed.setThumbnail("https://i.imgur.com/Pzi3oOY.png")

//A little thought to the module
embed.setFooter("Made with the help of the module discord-options.")

//Message
message.channel.send(embed)
```

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