From 0e1480f9d9607a2672f79c85a9fc6f109f3437f7 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Sat, 18 Dec 2021 21:34:50 -0700 Subject: [PATCH] attachment url for ask.js --- util/ask.js | 1 + 1 file changed, 1 insertion(+) diff --git a/util/ask.js b/util/ask.js index 91988d3..500e60c 100644 --- a/util/ask.js +++ b/util/ask.js @@ -4,6 +4,7 @@ module.exports = async (message, toAsk, time, nofilter, timeoutResponse) => { try { let collected = await msg.channel.awaitMessages({filter: filter, max: 1, errors: ['time'], time: time}); collected = collected.first().content; + if (collected.first().attachments.size) {collected = collected.first().attachments.first().url;} return collected; } catch { if (timeoutResponse) {message.reply("This question has timed out! Please try again.");}