Showing
1 changed file
with
11 additions
and
0 deletions
... | @@ -33,5 +33,16 @@ module.exports = { | ... | @@ -33,5 +33,16 @@ module.exports = { |
33 | manyPeople = 16; | 33 | manyPeople = 16; |
34 | else if(manyPeopleChoice == "30인(필보/카게)") | 34 | else if(manyPeopleChoice == "30인(필보/카게)") |
35 | manyPeople = 30; | 35 | manyPeople = 30; |
36 | + const equalBid = parseInt(buyValue * (manyPeople - 1) / manyPeople); | ||
37 | + const benefitBid = parseInt(equalBid / 11 * 10); | ||
38 | + const embed = new MessageEmbed() | ||
39 | + .setTitle(":moneybag: 경매 분배금 계산기") | ||
40 | + .setDescription(`경매가: ${parseInt(interaction.options.getString("경매가"))}<:gold:952804483237289994> 인원: ${manyPeople}인`) | ||
41 | + .setColor("#FAA8F0") | ||
42 | + .addFields( | ||
43 | + {name: "이 가격에 내가 입찰했는데 다른사람이 입찰하면 내가 이득이에요!", value: `입찰가: ${benefitBid}<:gold:952804483237289994> 이득: ${buyValue-benefitBid}<:gold:952804483237289994>`}, | ||
44 | + {name: "이 가격 이상부터 입찰하면 손해에요!", value:`입찰가: ${equalBid}<:gold:952804483237289994> 이득: ${buyValue-equalBid}<:gold:952804483237289994>`} | ||
45 | + ) | ||
46 | + await interaction.reply({ embeds: [embed], allowedMentions: {repliedUser: false} }); | ||
36 | }, | 47 | }, |
37 | }; | 48 | }; |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment