From eb9fbc8808744bdada12ee3546c11490f9570df8 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 9 Jul 2021 23:34:16 -0400 Subject: [PATCH] New GIF search --- commands/gif.js | 2 +- functions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/gif.js b/commands/gif.js index 3641814..506efa3 100644 --- a/commands/gif.js +++ b/commands/gif.js @@ -25,7 +25,7 @@ module.exports = { // message.channel.send(file.name + ' requested by ' + message.author.username + '\n' + client.gifs.get(file.name).embed_url); const gifInfo = { 'name': file.name, - 'embed_url': file.embed_url, + 'embed_url': client.gifs.get(file.name).embed_url, 'author': message.author, }; message.channel.send(functions.createGifEmbed(gifInfo)); diff --git a/functions.js b/functions.js index cb13ffc..d3ef14f 100644 --- a/functions.js +++ b/functions.js @@ -57,7 +57,7 @@ module.exports = { fs.writeFile(`./gifs/${name}.js`, `module.exports = {\n\tname: '${name}',\n\tembed_url: '${embed_url}'\n}`, function(err) { if (err) throw err; console.log('Saved file!'); - const gif = require(`../gifs/${name}.js`); + const gif = require(`./gifs/${name}.js`); message.client.gifs.set(gif.name, gif); }); }