From 7b95f4b0ab4a48aaa6a8db6b879be402e931a9c0 Mon Sep 17 00:00:00 2001 From: = Date: Sun, 18 Jul 2021 21:17:38 -0400 Subject: [PATCH] send DMs for savegif, reduce spam --- commands/savegif.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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