Skip to content

Commit

Permalink
[Fix] fix play command not working with users without avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Nov 27, 2021
1 parent d6c7bbc commit 46d8f12
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/Music.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,14 @@ class Music {
? command.member.user.username
: command.user.username;

const avatar = command.member.user.avatarURL()
? command.member.user.avatarURL()
: command.user.avatarURL();
const avatar = command.member.user.avatarURL() || client.user.avatarURL();

const musicEmbed = {
color: "#9dcc37",
title: `${queue.playing ? "✅ Added to Queue" : "🎵 Playing"}`,
author: {
name: `${username}`,
icon_url: `${avatar || client.user.avatarURL()}`,
icon_url: `${avatar}`,
},
description: `Song: **[${searchSong.tracks[0].title}](${searchSong.tracks[0].url})**`,
thumbnail: {
Expand Down

0 comments on commit 46d8f12

Please sign in to comment.