SHARE
TWEET

embed.js

a guest Sep 15th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require("discord.js")
  2. const configGeral = require("../config/geral.json")
  3.  
  4. const cores = {
  5.     erro: '#e74c3c',
  6.     normal:'#2ecc71'
  7. }
  8.  
  9. module.exports.erro = function (message, msg) {
  10.     const embed = new Discord.RichEmbed()
  11.         .setColor(cores.erro)
  12.         .setDescription(`**${msg}**`)
  13.         .setFooter(`${message.author.username}`, message.author.displayAvatarURL)
  14.         .setTimestamp(Date.now())
  15.     return embed
  16. }
  17.  
  18. module.exports.info = function (message, msg) {
  19.     const embed = new Discord.RichEmbed()
  20.         .setColor(cores.normal)
  21.         .setDescription(`${msg}`)
  22.         .setFooter(`${message.author.username}`, message.author.displayAvatarURL)
  23.         .setTimestamp(message.createdTimestamp)
  24.     return embed
  25. }
  26.  
  27. module.exports.sintaxeIncorreta=function(message,comando,comandoNome,msg){
  28.     const linhas = [
  29.         `**<>** = Obrigatório`,
  30.         `**[]** = Opcional`,
  31.         `${!msg? '':`\n**${msg}**\n`}`,
  32.         `**__Forma correta:__** ${"``"}${configGeral.prefixo}${comandoNome} ${comando.parametros.join(' ')}${"``"}`
  33.     ].join('\n')
  34.     const embed = new Discord.RichEmbed()
  35.         .setColor(cores.erro)
  36.         .setTitle('Sintaxe incorreta!')
  37.         .setDescription(`${linhas}`)
  38.         .setFooter(`${message.author.username}`, message.author.displayAvatarURL)
  39.         .setTimestamp(message.createdTimestamp)
  40.     return embed
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top