-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnowplaying.js
26 lines (24 loc) · 975 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: "To show the music which is currently playing in this server",
usage: "",
aliases: ["np"],
},
run: async function (client, message, args) {
const serverQueue = message.client.queue.get(message.guild.id);
if (!serverQueue) return sendError("There is nothing playing in this server.", message.channel);
let song = serverQueue.songs[0]
let thing = new MessageEmbed()
.setAuthor("Now Playing", "https://raw.githubusercontent.com/SudhanPlayz/Discord-MusicBot/master/assets/Music.gif")
.setThumbnail(song.img)
.setColor("BLUE")
.addField("Name", song.title, true)
.addField("Duration", song.duration, true)
.addField("Requested by", song.req.tag, true)
.setFooter(`Views: ${song.views} | ${song.ago}`)
return message.channel.send(thing)
},
};