New GIF search

This commit is contained in:
= 2021-07-09 23:34:16 -04:00
parent 523c481f59
commit eb9fbc8808
2 changed files with 2 additions and 2 deletions

View File

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

View File

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