From 50429ce861da3e6dad87e95ef6088d0ab45447f8 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Mon, 20 Dec 2021 03:29:42 -0700 Subject: [PATCH] raw images now actually work in ask.js --- util/ask.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/ask.js b/util/ask.js index 80084b6..52266bc 100644 --- a/util/ask.js +++ b/util/ask.js @@ -3,8 +3,8 @@ module.exports = async (message, toAsk, time, nofilter, timeoutResponse) => { let filter = nofilter ? () => true : m => m.author.id === message.author.id; 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;} + if (collected.first().attachments.size > 0) {collected = collected.first().attachments.first().url;} + else {collected = collected.first().content;} return collected; } catch { if (timeoutResponse) {message.reply("This question has timed out! Please try again.");}