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-23 16:16:28 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2076d42e5feb03761f35c8307cca2c9511793d92
2076d42e
1 parent
8c8431f7
Update lospi command
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
commands/lospi.js
commands/lospi.js
View file @
2076d42
...
...
@@ -15,6 +15,21 @@ module.exports = {
console
.
error
(
error
);
}
};
await
getHTML
().
then
(
html
=>
{
const
$
=
cheerio
.
load
(
html
.
data
);
const
buyValue
=
$
(
"div.price.buy span"
).
text
();
const
sellValue
=
$
(
"div.price.sell span"
).
text
();
const
embed
=
new
MessageEmbed
()
.
setTitle
(
"크리스탈 시세"
)
.
setDescription
(
"100<:bluecrystal:952747773097295932>당 "
+
$
(
"div.searched_time"
).
text
())
.
setColor
(
"#CECEF6"
)
.
addFields
(
{
name
:
"크리스탈 구매가"
,
value
:
`
${
buyValue
}
<:gold:952804483237289994>`
,
inline
:
true
},
{
name
:
"\u200b"
,
value
:
"\u200b"
,
inline
:
true
},
{
name
:
"크리스탈 판매가"
,
value
:
`
${
sellValue
}
<:gold:952804483237289994>`
,
inline
:
true
}
);
interaction
.
reply
({
embeds
:
[
embed
],
allowedMentions
:
{
repliedUser
:
false
}});
});
},
};
\ No newline at end of file
...
...
Please
register
or
login
to post a comment