mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
Add Back Starboard
This commit is contained in:
@@ -61,12 +61,12 @@ client.on('messageReactionAdd', (reaction, user) => {
|
|||||||
if (reaction.count > 1) return;
|
if (reaction.count > 1) return;
|
||||||
let starboard = reaction.message.guild.channels.find('name', 'starboard');
|
let starboard = reaction.message.guild.channels.find('name', 'starboard');
|
||||||
if (!starboard) return;
|
if (!starboard) return;
|
||||||
/*if (reaction.message.author.id === user.id) {
|
if (reaction.message.author.id === user.id) {
|
||||||
reaction.remove(user.id);
|
reaction.remove(user.id);
|
||||||
reaction.message.channel.send(`:x: Error! ${user.username}, you can't star your own messages!`);
|
reaction.message.channel.send(`:x: Error! ${user.username}, you can't star your own messages!`);
|
||||||
}
|
}
|
||||||
else {*/
|
else {
|
||||||
if (reaction.message.attachments.size < 0 && reaction.message.attachments.first().height) {
|
if (reaction.message.attachments.size > 0 && reaction.message.attachments.first().height) {
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
.setAuthor(user.username, user.avatarURL)
|
.setAuthor(user.username, user.avatarURL)
|
||||||
.setColor(0xFFA500)
|
.setColor(0xFFA500)
|
||||||
@@ -74,7 +74,6 @@ client.on('messageReactionAdd', (reaction, user) => {
|
|||||||
.setImage(reaction.message.attachments.first().url)
|
.setImage(reaction.message.attachments.first().url)
|
||||||
.setDescription(reaction.message.content);
|
.setDescription(reaction.message.content);
|
||||||
starboard.sendEmbed(embed);
|
starboard.sendEmbed(embed);
|
||||||
console.log(reaction.message.attachments.first().url);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
@@ -83,7 +82,7 @@ client.on('messageReactionAdd', (reaction, user) => {
|
|||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setDescription(reaction.message.content);
|
.setDescription(reaction.message.content);
|
||||||
starboard.sendEmbed(embed);
|
starboard.sendEmbed(embed);
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user