attachment url for ask.js

master
Kit Kasune 3 years ago
parent 2524a488ba
commit 0e1480f9d9
  1. 1
      util/ask.js

@ -4,6 +4,7 @@ module.exports = async (message, toAsk, time, nofilter, timeoutResponse) => {
try { try {
let collected = await msg.channel.awaitMessages({filter: filter, max: 1, errors: ['time'], time: time}); let collected = await msg.channel.awaitMessages({filter: filter, max: 1, errors: ['time'], time: time});
collected = collected.first().content; collected = collected.first().content;
if (collected.first().attachments.size) {collected = collected.first().attachments.first().url;}
return collected; return collected;
} catch { } catch {
if (timeoutResponse) {message.reply("This question has timed out! Please try again.");} if (timeoutResponse) {message.reply("This question has timed out! Please try again.");}

Loading…
Cancel
Save