# discord-reply

> An discord.js extension to inline reply messages

Latest version **0.1.2** (published 2021-03-20) · Apache-2.0 license · 0 weekly downloads

## Install

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

## 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.1.2 |
| Published | 2021-03-20 |
| First published | 2021-02-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Angelo II#0007 |
| Maintainers | angelo2007 |
| Keywords | discord.js, reply, messagereply, discordmessagereply, src, angeloii |

## Links

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

## Dependencies (1)

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

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2021-03-20
- 0.1.1 — 2021-03-18
- 0.1.0 — 2021-03-18
- 0.0.9-a — 2021-02-25
- 0.0.9 — 2021-02-25
- 0.0.1 — 2021-02-25

## README

<div align="center">

  <p>
    <a href="https://www.npmjs.com/package/discord-reply"><img src="https://img.shields.io/npm/v/discord-reply?maxAge=3600" alt="NPM version" /></a>
    <a href="https://www.npmjs.com/package/discord-reply"><img src="https://img.shields.io/npm/dt/discord-reply?maxAge=3600" alt="NPM downloads" /></a>
  </p>

  <p>
    <a href="https://www.npmjs.com/package/discord-reply"><img src="https://nodei.co/npm/discord-reply.png?downloads=true&stars=true" alt="NPM Banner"></a>
  </p>
</div>

## Install
```sh
$ npm i discord-reply
```
## Setup
```js
const discord = require('discord.js');
require('discord-reply'); //⚠️ IMPORTANT: put this before your discord.Client()
const client = new discord.Client();
```

<h1>Discord.js</h2>

## Example
```js
const discord = require('discord.js');
require('discord-reply'); //⚠️ IMPORTANT: put this before your discord.Client()
const client = new discord.Client();

client.on('ready', () => {
  console.log(client.user.tag)
});

client.on('message', async message => {
  if (message.content.startsWith('!reply')) {
    message.lineReply('Hey'); //Line (Inline) Reply with mention

    message.lineReplyNoMention(`My name is ${client.user.username}`); //Line (Inline) Reply without mention
  }
});

client.login('TOKEN');
```

## Embed
```js
if (message.content.startsWith('!reply')) {
  let embed = new discord.MessageEmbed()
  .setDescription(`Reply to ${message.author}`);

  message.lineReply(embed); //Line (Inline) Reply with mention

  //or

  message.lineReplyNoMention(embed); //Line (Inline) Reply without mention
}
```

<h2 style="display:inline;">Edit</h2> <h4 style="display:inline;">(Async Function)</h4>

```js
if (message.content.startsWith('!ping')) {

  let m = await message.lineReply('Ping');

  let ping = (m.createdTimestamp - message.createdTimestamp);

  m.edit(`${ping}ms`)
}
```

## Command Handler
```js
/**
 * No need to define it
 * */
module.exports = {
  name: 'reply',
  category: 'Test',
  run: (client, message, args) => {
    message.lineReply('This is reply with @mention');
  }
}
```

<h1>Eris</h1>
<h4><b>SOON</b></h4>

<hr>

## Contact

[Youtube](https://www.youtube.com/channel/UCxxK71QFN4_PrBhCFmH2Jmw), [Discord](https://discord.gg/5JtyYqW)

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