update info when tweet

This commit is contained in:
loicbersier 2019-07-19 04:35:28 +02:00
parent 2ad60dbb1f
commit f73710bcdf

View file

@ -66,21 +66,23 @@ class tweetCommand extends Command {
const tweetid = response.id_str; const tweetid = response.id_str;
// Im too lazy for now to make an entry in config.json
const publicEmbed = new MessageEmbed() const publicEmbed = new MessageEmbed()
.setAuthor('Some user of discord...') .setAuthor('Some user of discord...')
.setDescription(args.text) .setDescription(args.text)
.addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`) .addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`)
.setTimestamp(); .setTimestamp();
// Im too lazy for now to make an entry in config.json
let channel = this.client.channels.get('597964498921455637'); let channel = this.client.channels.get('597964498921455637');
channel.send({embed: publicEmbed}); channel.send({embed: publicEmbed});
const Embed = new MessageEmbed() const Embed = new MessageEmbed()
.setAuthor(message.author.username, message.author.displayAvatarURL()) .setAuthor(message.author.username, message.author.displayAvatarURL())
.setDescription(args.text) .setDescription(args.text)
.addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`) .addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`, true)
.setFooter(`Tweet ID: ${tweetid} | Author ID: ${message.author.id} | Guild ID: ${message.guild.id}`) .addField('Tweet ID', tweetid, true)
.addField('Author', `${message.author.username}(${message.author.id})`, true)
.addField('Guild', `${message.guild.name}(${message.guild.id})`, true)
.setTimestamp(); .setTimestamp();
channel = this.client.channels.get(twiChannel); channel = this.client.channels.get(twiChannel);