fixing errors

This commit is contained in:
= 2021-07-13 20:57:37 -04:00
parent 47725a7624
commit a09c83fa4e
2 changed files with 4 additions and 7 deletions

View File

@ -12,10 +12,9 @@ module.exports = {
// message.channel.send(file.name + ' requested by ' + message.author.username + '\n' + res.data[0].embed_url).then().catch(console.error); // message.channel.send(file.name + ' requested by ' + message.author.username + '\n' + res.data[0].embed_url).then().catch(console.error);
const gifInfo = { const gifInfo = {
'name': file.name, 'name': file.name,
'embed_url': res.data[0].images.original.url, 'embed_url': res.data[0].images.original.url
'author': message.author,
}; };
message.channel.send(functions.createGifEmbed(gifInfo)); message.channel.send(functions.createGifEmbed(gifInfo, message.author, `${file.name}.${file.extension}`));
} else { } else {
message.channel.send('I was unable to find a gif of ' + file.name); message.channel.send('I was unable to find a gif of ' + file.name);
} }
@ -25,8 +24,7 @@ module.exports = {
// message.channel.send(file.name + ' requested by ' + message.author.username + '\n' + client.gifs.get(file.name).embed_url); // message.channel.send(file.name + ' requested by ' + message.author.username + '\n' + client.gifs.get(file.name).embed_url);
const gifInfo = { const gifInfo = {
'name': file.name, 'name': file.name,
'embed_url': client.gifs.get(file.name).embed_url, 'embed_url': client.gifs.get(file.name).embed_url
'author': message.author,
}; };
message.channel.send(functions.createGifEmbed(gifInfo, message.author, `${file.name}.${file.extension}`)); message.channel.send(functions.createGifEmbed(gifInfo, message.author, `${file.name}.${file.extension}`));
} }

View File

@ -47,8 +47,7 @@ module.exports = {
}, },
createGifEmbed(data, author, command) { createGifEmbed(data, author, command) {
return new Discord.MessageEmbed() return new Discord.MessageEmbed()
.setAuthor('NodBot v2 - GIF') .setAuthor(command)
.setTitle(command)
.setImage(data.embed_url) .setImage(data.embed_url)
.setTimestamp() .setTimestamp()
.setFooter(`@${author.username}#${author.discriminator}`); .setFooter(`@${author.username}#${author.discriminator}`);