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-18 23:53:40 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5e0feb74dfcda135f75810704c57e240148c19f1
5e0feb74
1 parent
6ccb54e7
Handle exception of nonexistent nickname in loawa.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
commands/loawa.js
commands/loawa.js
View file @
5e0feb7
...
...
@@ -23,6 +23,10 @@ module.exports = {
};
await
getHTML
().
then
(
html
=>
{
const
$
=
cheerio
.
load
(
html
.
data
);
if
(
$
(
"div.profile-attention span:nth-child(2)"
).
text
()
===
"캐릭터명을 확인해주세요."
||
$
(
"div.level-info2__expedition"
).
text
().
split
(
"Lv."
)[
1
]
===
"0.00"
){
interaction
.
reply
({
content
:
"`"
+
interaction
.
options
.
getString
(
"닉네임"
)
+
"`"
+
"이라는 캐릭터는 없습니다"
,
allowedMentions
:
{
repliedUser
:
false
}});
return
;
}
open
(
`https://loawa.com/char/
${
interaction
.
options
.
getString
(
"닉네임"
)}
`
);
interaction
.
reply
({
content
:
`
${
interaction
.
options
.
getString
(
"닉네임"
)}
의 로아와 정보로 이동합니다.`
,
allowedMentions
:
{
repliedUser
:
false
}});
});
...
...
Please
register
or
login
to post a comment