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-09 21:15:16 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
644a4bdcee94fb45887e4daca64818f5d272b4c0
644a4bdc
1 parent
a2e7ecec
Update servicing loawa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
commands/loawa.js
commands/loawa.js
View file @
644a4bd
...
...
@@ -14,5 +14,18 @@ module.exports = {
.
setRequired
(
true
)
),
async
execute
(
interaction
)
{
async
function
getHTML
()
{
try
{
return
await
axios
.
get
(
encodeURI
(
`https://lostark.game.onstove.com/Profile/Character/
${
interaction
.
options
.
getString
(
"닉네임"
)}
`
));
}
catch
(
error
)
{
console
.
error
(
error
);
}
};
await
getHTML
().
then
(
html
=>
{
const
$
=
cheerio
.
load
(
html
.
data
);
open
(
`https://loawa.com/char/
${
interaction
.
options
.
getString
(
"닉네임"
)}
`
);
interaction
.
reply
({
content
:
`
${
interaction
.
options
.
getString
(
"닉네임"
)}
의 로아와 정보로 이동합니다.`
,
allowedMentions
:
{
repliedUser
:
false
}});
});
},
};
\ No newline at end of file
...
...
Please
register
or
login
to post a comment