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-09 04:31:22 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
45c3b6111639ad5e21570915eb65a9f9f9e7e18e
45c3b611
1 parent
f0fe4a1a
Chore overall
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
README.md
app.js
data/.keep
README.md
View file @
45c3b61
...
...
@@ -76,7 +76,7 @@
<!-- ABOUT THE PROJECT -->
## About The Project
![
Product Name Screen Shot
][
product-screenshot
]
![
demo
](
./images/screenshot.jpg
)
### 핵심기능
...
...
@@ -223,4 +223,3 @@ Distributed under the MIT License. See `LICENSE.txt` for more information.
<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[
product-screenshot
]:
images/screenshot.jpg
\ No newline at end of file
...
...
app.js
View file @
45c3b61
...
...
@@ -4,7 +4,7 @@ const {MessageEmbed} = require('discord.js');
const
client
=
new
Discord
.
Client
()
const
fs
=
require
(
'fs'
);
const
internal
=
require
(
"stream"
);
cons
t
now
=
new
Date
();
le
t
now
=
new
Date
();
const
moment
=
require
(
'moment'
)
const
Youtube
=
require
(
'simple-youtube-api'
);
const
youtube
=
new
Youtube
(
youtubeAPI
);
...
...
@@ -38,7 +38,7 @@ client.on("ready", () => {
//명령어 인식
client
.
on
(
"message"
,
msg
=>
{
console
.
log
(
msg
.
author
.
id
,
msg
.
content
);
//채팅을 로그에 띄우기
now
=
new
Date
();
//prefix로 시작하지 않는경우 통과 를 위한 명령어
if
(
!
msg
.
content
.
startsWith
(
prefix
)
||
msg
.
author
.
bot
)
return
;
...
...
@@ -140,6 +140,8 @@ client.on("message", msg => {
var
fileName
=
"data/stopWatch/"
+
msg
.
channel
.
id
+
"/"
+
msg
.
author
.
id
+
".txt"
;
try
{
fs
.
statSync
(
fileName
);
// 파일 있는지 확인. 없으면 catch
//(공부시작을 한 경우) : 공부시간 계산
...
...
data/.keep
0 → 100644
View file @
45c3b61
File mode changed
Please
register
or
login
to post a comment