-
Notifications
You must be signed in to change notification settings - Fork 0
/
nowplaying.js
26 lines (24 loc) · 876 Bytes
/
nowplaying.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
const { MessageEmbed } = require("discord.js");
const sendError = require("../util/error")
module.exports = {
info: {
name: "nowplaying",
description: "Mostra a música que está sendo tocada",
usage: "",
aliases: ["np"],
},
run: async function (client, message, args) {
const serverQueue = message.client.queue.get(message.guild.id);
if (!serverQueue) return sendError("Não há uma música tocando agora", message.channel);
let song = serverQueue.songs[0]
let thing = new MessageEmbed()
.setAuthor("Tocando agora")
.setThumbnail(song.img)
.setColor("PURPLE")
.addField("Nome", song.title, true)
.addField("Duração", song.duration, true)
.addField("Adicionado por", song.req.tag, true)
.setFooter(`${song.views} Visualizações | ${song.ago}`)
return message.channel.send(thing)
},
};