From 618dba0065c01b7947bb0e3a5fe0d060565188a6 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Jul 2019 03:38:48 +0200 Subject: [PATCH] show public tweet without any info on who tweeted --- commands/general/tweet.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/commands/general/tweet.js b/commands/general/tweet.js index 31fc5b5..26727e0 100644 --- a/commands/general/tweet.js +++ b/commands/general/tweet.js @@ -37,7 +37,6 @@ class tweetCommand extends Command { filter.removeWords(...uncensor); const blacklist = reload('../../json/twiBlacklist.json'); - const channel = this.client.channels.get(twiChannel); if (blacklist.includes(message.author.id)) { return message.channel.send('You have been blacklisted from this command... be less naughty next time.'); @@ -66,7 +65,16 @@ class tweetCommand extends Command { }); const tweetid = response.id_str; - + + // Im too lazy for now to make an entry in config.json + const publicEmbed = new MessageEmbed() + .setDescription(args.text) + .addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`) + .setTimestamp(); + + let channel = this.client.channels.get('597964498921455637'); + channel.send({embed: publicEmbed}); + const Embed = new MessageEmbed() .setAuthor(message.author.username, message.author.displayAvatarURL()) .setDescription(args.text) @@ -74,6 +82,7 @@ class tweetCommand extends Command { .setFooter(`Tweet ID: ${tweetid} | Author ID: ${message.author.id} | Guild ID: ${message.guild.id}`) .setTimestamp(); + channel = this.client.channels.get(twiChannel); channel.send({embed: Embed}); return message.channel.send(`Go see ur epic tweet https://twitter.com/HahaYesDB/status/${tweetid}`);