New GIF search
This commit is contained in:
parent
523c481f59
commit
eb9fbc8808
@ -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));
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user