diff --git a/commands/general/tweet.js b/commands/general/tweet.js index 86d3598..a4abca3 100644 --- a/commands/general/tweet.js +++ b/commands/general/tweet.js @@ -2,6 +2,7 @@ const { Command } = require('discord-akairo'); const Twitter = require('twitter-lite'); const rand = require('../../rand.js'); const Filter = require('bad-words'); +const { MessageEmbed } = require('discord.js'); let filter = new Filter(); const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret, twiChannel } = require('../../config.json'); const reload = require('auto-reload'); @@ -64,9 +65,14 @@ class tweetCommand extends Command { const tweetid = response.id_str; - // Send the final text + const Embed = new MessageEmbed() + .setAuthor(message.author.username, message.author.displayAvatarURL()) + .setDescription(args.text) + .addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`) + .setFooter(`Tweet ID: ${tweetid} | Author ID: ${message.author.id}`) + .setTimestamp(); - channel.send(`AUTHOR: ${message.author.username} (${message.author.id}) Sent: ${args.text}\nhttps://twitter.com/HahaYesDB/status/${tweetid}`); + channel.send({embed: Embed}); return message.channel.send(`Go see ur epic tweet https://twitter.com/HahaYesDB/status/${tweetid}`); } catch(err) { diff --git a/commands/utility/feedback.js b/commands/utility/feedback.js index 2f93430..1967df4 100644 --- a/commands/utility/feedback.js +++ b/commands/utility/feedback.js @@ -1,5 +1,6 @@ const { Command } = require('discord-akairo'); const { feedbackChannel } = require('../../config.json'); +const { MessageEmbed } = require('discord.js'); class FeedbackCommand extends Command { constructor() { @@ -23,10 +24,14 @@ class FeedbackCommand extends Command { } async exec(message,args) { - let text = args.text; - const channel = this.client.channels.get(feedbackChannel); - channel.send(`from ${message.author.username} (${message.author.id}) : ${text}`); + + const Embed = new MessageEmbed() + .setAuthor(message.author.username, message.author.displayAvatarURL()) + .setDescription(args.text) + .setFooter(`Author ID: ${message.author.id}`) + .setTimestamp(); + channel.send({embed: Embed}); message.channel.send('Your feedback has been sent!'); } }