Toggle navigation
Toggle navigation
This project
Loading...
Sign in
유병우
/
lostark-discord-bot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
유병우
2022-05-27 20:38:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
acd55b22badf9c49710023b4c0017d057e4bdc14
acd55b22
1 parent
eacaa641
Update auction command
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
commands/auction.js
commands/auction.js
View file @
acd55b2
...
...
@@ -33,5 +33,16 @@ module.exports = {
manyPeople
=
16
;
else
if
(
manyPeopleChoice
==
"30인(필보/카게)"
)
manyPeople
=
30
;
const
equalBid
=
parseInt
(
buyValue
*
(
manyPeople
-
1
)
/
manyPeople
);
const
benefitBid
=
parseInt
(
equalBid
/
11
*
10
);
const
embed
=
new
MessageEmbed
()
.
setTitle
(
":moneybag: 경매 분배금 계산기"
)
.
setDescription
(
`경매가:
${
parseInt
(
interaction
.
options
.
getString
(
"경매가"
))}
<:gold:952804483237289994> 인원:
${
manyPeople
}
인`
)
.
setColor
(
"#FAA8F0"
)
.
addFields
(
{
name
:
"이 가격에 내가 입찰했는데 다른사람이 입찰하면 내가 이득이에요!"
,
value
:
`입찰가:
${
benefitBid
}
<:gold:952804483237289994> 이득:
${
buyValue
-
benefitBid
}
<:gold:952804483237289994>`
},
{
name
:
"이 가격 이상부터 입찰하면 손해에요!"
,
value
:
`입찰가:
${
equalBid
}
<:gold:952804483237289994> 이득:
${
buyValue
-
equalBid
}
<:gold:952804483237289994>`
}
)
await
interaction
.
reply
({
embeds
:
[
embed
],
allowedMentions
:
{
repliedUser
:
false
}
});
},
};
\ No newline at end of file
...
...
Please
register
or
login
to post a comment