Skip to content

Commit

Permalink
[Enhancement] Updated discord-js package, song link as hyperlink in e…
Browse files Browse the repository at this point in the history
…mbed
  • Loading branch information
naseif committed Oct 5, 2021
1 parent a47a8b7 commit f1acb6b
Show file tree
Hide file tree
Showing 3 changed files with 508 additions and 296 deletions.
15 changes: 11 additions & 4 deletions commands/Music/play.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,22 @@ const playdl = require("play-dl");
module.exports = {
name: "play",
aliases: ["p"],
description: "Plays music from Youtube",
description: "Plays music from Youtube, Spotify and Soundcloud!",
args: true,
usage: "p <YouTube URL | Song Name | Spotify URL | Soundcloud URL |>",
async run(message, args, client, prefix) {
const songString = args.join(" ");

if (!songString)
return await message.channel.send({embeds: [embedMessage("#9dcc37", `❌ | ${message.member.toString()}, You have to provide a song name or URL`)]});

return await message.channel.send({
embeds: [
embedMessage(
"#9dcc37",
`❌ | ${message.member.toString()}, You have to provide a song name or URL`
),
],
});

if (!message.member.voice.channelId)
return message.channel.send({
embeds: [
Expand Down Expand Up @@ -78,7 +85,7 @@ module.exports = {
name: `${message.member.user.username}`,
icon_url: `${message.member.user.avatarURL()}`,
},
description: `Song: **${searchSong.tracks[0].title}**`,
description: `Song: **[${searchSong.tracks[0].title}](${searchSong.tracks[0].url})**`,
thumbnail: {
url: `${searchSong.tracks[0].thumbnail}`,
},
Expand Down
Loading

0 comments on commit f1acb6b

Please sign in to comment.