-
Notifications
You must be signed in to change notification settings - Fork 0
/
boton.js
45 lines (35 loc) · 1.43 KB
/
boton.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const Discord = require('discord.js')
const marsnpm = require('marsnpm')
module.exports = {
config: {
nombre: "boton",
alias: []
},
run: async (client, message, args, lang) => {
let bot = client.user.username
let botavatar = client.user.avatarURL()
let prefijo = process.env.PREFIX;
let user = message.mentions.users.first();
let member = message.mentions.users.first()
const embed = new Discord.MessageEmbed()
.setAuthor(bot+' ┊ Boton', botavatar)
.setDescription("Ejemplo: `"+prefijo+"boton Texto-1, Texto-2` \n \nRecuerda separar los textos con una coma")
.setImage("https://media.discordapp.net/attachments/595203556487725087/653179838601101312/file.jpg")
.setColor("RANDOM")
.setFooter(message.author.tag)
.setTimestamp()
let texto = args.join(' ');
let opt = texto.split(', ');
if(!opt[0]) return message.channel.send({embed})
if(!opt[1]) return message.channel.send({embed})
let url = await marsnpm.boton(opt[0], opt[1])
const embes = new Discord.MessageEmbed()
.attachFiles([{
attachment: url,
name: "boton.png"
}])
.setColor("RANDOM")
.setImage("attachment://boton.png")
.setFooter(message.author.tag)
message.channel.send(embes)
}}