Showing
1 changed file
with
50 additions
and
0 deletions
| ... | @@ -49,5 +49,55 @@ module.exports = { | ... | @@ -49,5 +49,55 @@ module.exports = { |
| 49 | }); | 49 | }); |
| 50 | return itemInfo; | 50 | return itemInfo; |
| 51 | }); | 51 | }); |
| 52 | + | ||
| 53 | + const embed = new MessageEmbed() | ||
| 54 | + .setTitle("마리샵 성장 추천 목록") | ||
| 55 | + .setColor("#FAA8F0") | ||
| 56 | + .setDescription("성장 추천"); | ||
| 57 | + for(idx = 0; idx < 6; idx++) { | ||
| 58 | + embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); } | ||
| 59 | + embed.addField("\u200B", "전투ㆍ생활 추천", false); | ||
| 60 | + for(idx = 18; idx < 24; idx++) { | ||
| 61 | + embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); } | ||
| 62 | + interaction.reply({ embeds: [embed], components: [buttonsRow], allowedMentions: {repliedUser: false}}); | ||
| 63 | + | ||
| 64 | + const filter = (interaction) => { return interaction.customId === "12time_ago" || "6time_ago" || "0time_ago" ;}; | ||
| 65 | + const collector = interaction.channel.createMessageComponentCollector({ filter, time: 60000}); | ||
| 66 | + collector.on("collect", async (interaction) => { | ||
| 67 | + if(interaction.customId === "12time_ago") { | ||
| 68 | + const embed = new MessageEmbed() | ||
| 69 | + .setTitle("마리샵 성장 추천 목록") | ||
| 70 | + .setColor("#FAA8F0") | ||
| 71 | + .setDescription("성장 추천"); | ||
| 72 | + for(idx = 6; idx < 12; idx++) { | ||
| 73 | + embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); } | ||
| 74 | + embed.addField("\u200B", "전투ㆍ생활 추천", false); | ||
| 75 | + for(idx = 24; idx < 30; idx++) { | ||
| 76 | + embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); } | ||
| 77 | + interaction.update({ embeds: [embed], components: [buttonsRow], allowedMentions: {repliedUser: false}}); | ||
| 78 | + } else if(interaction.customId === "6time_ago"){ | ||
| 79 | + const embed = new MessageEmbed() | ||
| 80 | + .setTitle("마리샵 성장 추천 목록") | ||
| 81 | + .setColor("#FAA8F0") | ||
| 82 | + .setDescription("성장 추천"); | ||
| 83 | + for(idx = 12; idx < 18; idx++) { | ||
| 84 | + embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); } | ||
| 85 | + embed.addField("\u200B", "전투ㆍ생활 추천", false); | ||
| 86 | + for(idx = 30; idx < 36; idx++) { | ||
| 87 | + embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); } | ||
| 88 | + interaction.update({ embeds: [embed], components: [buttonsRow], allowedMentions: {repliedUser: false}}); | ||
| 89 | + } else if(interaction.customId === "0time_ago"){ | ||
| 90 | + const embed = new MessageEmbed() | ||
| 91 | + .setTitle("마리샵 성장 추천 목록") | ||
| 92 | + .setColor("#FAA8F0") | ||
| 93 | + .setDescription("성장 추천"); | ||
| 94 | + for(idx = 0; idx < 6; idx++) { | ||
| 95 | + embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); } | ||
| 96 | + embed.addField("\u200B", "전투ㆍ생활 추천", false); | ||
| 97 | + for(idx = 18; idx <24; idx++) { | ||
| 98 | + embed.addField(`${(itemInfo[idx]).name}`, `${(itemInfo[idx]).amount}<:bluecrystal:952747773097295932>`, true); } | ||
| 99 | + interaction.update({ embeds: [embed], components: [buttonsRow], allowedMentions: {repliedUser: false}}); | ||
| 100 | + } | ||
| 101 | + }); | ||
| 52 | }, | 102 | }, |
| 53 | }; | 103 | }; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment