diff --git a/commands/savegif.js b/commands/savegif.js index 16c621b..20b5f43 100644 --- a/commands/savegif.js +++ b/commands/savegif.js @@ -13,9 +13,9 @@ module.exports = { description: 'Adds a given gif to the hardcoded list.', usage: '', execute(message, file) { - const channel = message.channel; const query = file.name; - tenor.Search.Query(query, 20) + message.author.createDM().then(channel => { + tenor.Search.Query(query, 20) .then(res => { if (res[0] == undefined) { channel.send('Sorry, I wasn\'t able to find a GIF of ' + file.name); @@ -92,5 +92,6 @@ module.exports = { }).catch(err => console.error(err)); }) .catch(err => console.error(err)); + }) } } \ No newline at end of file