diff --git a/src/modules/music.js b/src/modules/music.js index f14a397..c6ec7cb 100644 --- a/src/modules/music.js +++ b/src/modules/music.js @@ -397,7 +397,15 @@ command.callback = async function (msg, line) { type = "sc"; } else if (REGEX_FILE.test(argStr)) { type = "file"; - } else if + } else if (msg.attachments.length > 0) { + const entries = msg.attachments.filter((attachment) => + REGEX_FILE.test(attachment.url) + ); + if (entries.length > 0) { + type = "file"; + argStr = entries[0].url; + } + } if (type != null) { if (playlist) {