discord-responses
v2.3.1
Published
Un npm para respuestas de discord en español.
Downloads
52
Readme
Instalacion
npm i discord-responses
Importante
Se esta trabajando en una nueva version.
No es recomendable usar este npm en la version 13.0.0 o superior ( hasta que saquemos la version 2.5.0 )
Changelogs
Se cambio el README.
Se fixeo un bug en el ejemplo del README.
Se arreglaron faltas de ortografia en el README
Se añadio la funcion message.responderNoMencion
Se añadio la funcion toMinus
Se añadio la funcion toMayus
Setup
const discord = require('discord.js');
require('discord-responses'); //requerimos el modulo.
const client = new discord.Client();
client.on('ready', () => {
console.log("Bot listo.")
});
client.on('message', async message => {
if (message.content.startsWith('test')) {
message.responder('Todo funcionando'); //Enviamos el mensaje.
}
});
client.login('token-del-bot'); //Iniciamos el bot.
Ejemplo responder mencion
if (message.content.startsWith('mencion')) {
message.responder('Hola que tal (ping)'); //Enviamos el mensaje con mencion al autor.
}
Ejemplo responder no mencion
if (message.content.startsWith('nomencion')) {
message.responder('hola que tal (no ping)'); //Enviamos el mensaje sin mencion al autor.
}
Ejemplo responder edit
if (message.content.startsWith('ejemplo')) {
let ejemplo = await message.responder('editando mensaje....'); //Enviamos el mensaje
ejemplo.edit(`Mensaje editado.`) //Editamos el mensaje.
}
Ejemplo toMayus
if (message.content.startsWith('testn')) {
const dresponses = require("discord-responses") //Requerimos el modulo.
let mensaje = "hola, ¿que tal?"
message.responder(`de ` + mensaje + ` a ` + dresponses.toMayus(mensaje)); //Enviamos el mensaje.
}
Ejemplo toMinus
if (message.content.startsWith('testm')) {
const dresponses = require("discord-responses") //Requerimos el modulo.
let mensaje = "HOLA, ¿QUE TAL?"
message.responder(`de ` + mensaje + ` a ` + dresponses.toMinus(mensaje)); //Enviamos el mensaje.
}
¿sugerencias/bugs?
[email protected]