유병우

Update mari command

......@@ -49,5 +49,55 @@ module.exports = {
});
return itemInfo;
});
const embed = new MessageEmbed()
.setTitle("마리샵 성장 추천 목록")
.setColor("#FAA8F0")
.setDescription("성장 추천");
for(idx = 0; idx < 6; idx++) {
embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); }
embed.addField("\u200B", "전투ㆍ생활 추천", false);
for(idx = 18; idx < 24; idx++) {
embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); }
interaction.reply({ embeds: [embed], components: [buttonsRow], allowedMentions: {repliedUser: false}});
const filter = (interaction) => { return interaction.customId === "12time_ago" || "6time_ago" || "0time_ago" ;};
const collector = interaction.channel.createMessageComponentCollector({ filter, time: 60000});
collector.on("collect", async (interaction) => {
if(interaction.customId === "12time_ago") {
const embed = new MessageEmbed()
.setTitle("마리샵 성장 추천 목록")
.setColor("#FAA8F0")
.setDescription("성장 추천");
for(idx = 6; idx < 12; idx++) {
embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); }
embed.addField("\u200B", "전투ㆍ생활 추천", false);
for(idx = 24; idx < 30; idx++) {
embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); }
interaction.update({ embeds: [embed], components: [buttonsRow], allowedMentions: {repliedUser: false}});
} else if(interaction.customId === "6time_ago"){
const embed = new MessageEmbed()
.setTitle("마리샵 성장 추천 목록")
.setColor("#FAA8F0")
.setDescription("성장 추천");
for(idx = 12; idx < 18; idx++) {
embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); }
embed.addField("\u200B", "전투ㆍ생활 추천", false);
for(idx = 30; idx < 36; idx++) {
embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); }
interaction.update({ embeds: [embed], components: [buttonsRow], allowedMentions: {repliedUser: false}});
} else if(interaction.customId === "0time_ago"){
const embed = new MessageEmbed()
.setTitle("마리샵 성장 추천 목록")
.setColor("#FAA8F0")
.setDescription("성장 추천");
for(idx = 0; idx < 6; idx++) {
embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); }
embed.addField("\u200B", "전투ㆍ생활 추천", false);
for(idx = 18; idx <24; idx++) {
embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); }
interaction.update({ embeds: [embed], components: [buttonsRow], allowedMentions: {repliedUser: false}});
}
});
},
};
\ No newline at end of file
......