Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김건우
/
studyChatBot
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
김건우
2021-12-08 19:00:02 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
495736cfbd5d02cea949487da9d490f39789a3ea
495736cf
1 parent
dcd38cc8
Chore printStyle
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
app.js
app.js
View file @
495736c
...
...
@@ -274,13 +274,13 @@ client.on("message", msg => {
var
t2
=
moment
(
String
(
now
.
getFullYear
())
+
"-"
+
dDayWhen
[
0
]
+
"-"
+
dDayWhen
[
1
]
,
'YYYY-MM-DD'
);
// 저장된 날짜
var
dDayPrint
=
(
Number
(
t2
.
diff
(
t1
,
'days'
))
+
2
);
if
(
dDayPrint
>
0
)
{
msg
.
reply
(
el
.
replace
(
'.txt'
,
''
)
+
"까지 D - "
+
dDayPrint
);
//dDay 답장 (날짜안지난경우)
msg
.
channel
.
send
(
el
.
replace
(
'.txt'
,
''
)
+
"까지 D - "
+
dDayPrint
);
//dDay 답장 (날짜안지난경우)
}
else
if
(
dDayPrint
<
0
)
{
msg
.
reply
(
el
.
replace
(
'.txt'
,
''
)
+
"까지 D + "
+
(
-
dDayPrint
));
//dDay 답장 (날짜지난경우)
msg
.
channel
.
send
(
el
.
replace
(
'.txt'
,
''
)
+
"까지 D + "
+
(
-
dDayPrint
));
//dDay 답장 (날짜지난경우)
}
else
{
msg
.
reply
(
el
.
replace
(
'.txt'
,
''
)
+
"까지 D - day"
);
//dDay 답장 (오늘인경우)
msg
.
channel
.
send
(
el
.
replace
(
'.txt'
,
''
)
+
"까지 D - day"
);
//dDay 답장 (오늘인경우)
}
});
...
...
Please
register
or
login
to post a comment