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); }); }