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-31 19:53:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b0b2b788d14a96c9f2c50c61391782e47ee4734e
b0b2b788
1 parent
53192494
Create each_stamp information system
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
commands/stamp.js
commands/stamp.js
View file @
b0b2b78
...
...
@@ -43,8 +43,11 @@ module.exports ={
case
'도화가'
:
job_number
=
7
;
class_number
=
2
;
break
;
default
:
interaction
.
reply
(
'올바른 직업명을 입력해주세요!'
);
return
;
}
const
tempembed
=
new
MessageEmbed
()
.
setColor
(
'#F7819F'
)
.
setDescription
(
'작업중입니다!(1~2분 가량 소요될 수 있습니다)'
)
await
interaction
.
reply
(
'작업중입니다!(1~2분 가량 소요될 수 있습니다)'
);
interaction
.
reply
({
embeds
:
[
tempembed
],
allowedMentions
:
{
repliedUser
:
false
}
}
);
await
puppeteer
.
launch
().
then
(
async
browser
=>
{
const
page
=
await
browser
.
newPage
();
...
...
@@ -90,25 +93,29 @@ module.exports ={
console
.
error
(
error
);
})
var
sortary
=
[];
var
each_
sortary
=
[];
for
(
var
name
in
each_stamp
){
sortary
.
push
([
name
,
each_stamp
[
name
]
*
5
]);
each_
sortary
.
push
([
name
,
each_stamp
[
name
]
*
5
]);
}
sortary
.
sort
(
function
(
a
,
b
){
each_
sortary
.
sort
(
function
(
a
,
b
){
return
b
[
1
]
-
a
[
1
];
})
console
.
log
(
sortary
);
/* const stampembed = new MessageEmbed()
let
each_stamp_print
=
""
;
for
(
i
=
0
;
i
<
each_sortary
.
length
;
i
++
){
each_stamp_print
+=
each_sortary
[
i
][
0
]
+
': '
+
each_sortary
[
i
][
1
]
+
'% \n'
;
}
const
stampembed
=
new
MessageEmbed
()
.
setColor
(
'#F7819F'
)
.
setTitle
(
class_name
)
.
setDescription
(
class_name
+
'의 상위 20명 각인 정보'
)
.addField(
{name: "각인 상세 정보", value: }
) */
interaction
.
editReply
(
'test'
);
.
addFields
(
{
name
:
"각인 상세 정보"
,
value
:
each_stamp_print
,
inline
:
true
},
{
name
:
"각인 전체 정보"
,
value
:
'개발중'
,
inline
:
true
}
)
interaction
.
editReply
({
embeds
:
[
stampembed
],
allowedMentions
:
{
repliedUser
:
false
}
});
})
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment