discord-avatar
Version:
A simple utility to display a member's avatar in an embedded message.
119 lines (92 loc) • 4.39 kB
Markdown
<div align="center">

<b>ENG</b> This is an updated version of discord.js v13 and improved from [discord.js-avatar](https://www.npmjs.com/package/discord.js-avatar)
<b>ES</b> Esta es una versión actualizada a discord.js v13 y mejorada de [discord.js-avatar](https://www.npmjs.com/package/discord.js-avatar)
<p>
<a href="https://nodei.co/npm/discord-avatar
/"><img src="https://nodei.co/npm/discord-avatar.png?downloads=true&stars=true" alt="NPM info" /></a>
</p>
[](https://github.com/BringFeel/discord-avatar/releases/latest)
[](https://github.com/BringFeel/discord-avatar/stargazers)
[](https://github.com/BringFeel/discord-avatar/releases/latest)
[](https://discord.bringfeel.com)
[](https://www.npmjs.com/package/discord-avatar)</br>
</div>
# ENGLISH
A simple utility to display a member's avatar in an embedded message.
* By default it supports 5 languages, more can be added.
* Supported languages: English, Spanish, Portuguese, Russian, Chinese, German.
* The color of the embed is assigned by the color of the role
If you want to change it go to ```node_modules/discord-avatar/index.js``` and change
```js
.setColor(message.guild.me.displayHexColor)
↓
.setColor("Your Color")
```
Colors: [htmlcolorcodes.com](https://htmlcolorcodes.com)
Supports only discord.js@^13.6.0 (master).
# Installation
* `npm install discord-avatar`
# Usage
__Basic Bot Example__
```js
// Import the discord-avatar package.
const avatarEmbed = require('discord-avatar');
// Call the avatarEmbed method, only the first argument is required.
// * language: Language in which the embedded message will be sent.
avatarEmbed(message, language = 'english');
// And voila now you have an avatar command with embeds!
```
```js
// Import the discord-avatar package.
const avatarEmbed = require('discord-avatar');
module.exports = {
name: 'avatar',
execute(message) {
// Call the avatarEmbed method, only the first argument is required.
// * language: Language in which the embedded message will be sent.
avatarEmbed(message, language = 'english');
}
};
```
# Preview

# SPANISH
Una sencilla utilidad para mostrar el avatar de un miembro en un mensaje embebecido.
* Por defecto se soporta 5 idiomas, se pueden agregar más.
* Idiomas soportados: Inglés, Español, Portugués, Ruso, Chino y Alemán
* El color del embed se asigna mediante el color del rol
Si desea cambiarlo vaya a ```node_modules/discord-avatar/index.js``` y cambie
```js
.setColor(message.guild.me.displayHexColor)
↓
.setColor("Tu Color")
```
Colores: [htmlcolorcodes.com](https://htmlcolorcodes.com)
Solo admite discord.js@^13.6.0 (master).
# Instalación
* `npm install discord-avatar`
# Uso
__Ejemplo de bot básico__
```js
// Importar el paquete discord-avatar.
const avatarEmbed = require('discord-avatar');
// Llama al método avatarEmbed, se requiere solo el primer argumento.
// * language: Idioma en el que se enviará el mensaje embebecido.
avatarEmbed(message, language = 'spanish');
// Y listo ahora tienes un comando de avatar con embeds!
```
```js
// Importar el paquete discord-avatar.
const avatarEmbed = require('discord-avatar');
module.exports = {
name: 'avatar',
execute(message) {
// Llama al método avatarEmbed, se requiere solo el primer argumento.
// * language: Idioma en el que se enviará el mensaje embebecido.
avatarEmbed(message, language = 'spanish');
}
};
```
# Vista previa
