Last active
November 9, 2019 11:54
-
-
Save nesffer/3e786aafc2242d1a96a60edd748dc7f2 to your computer and use it in GitHub Desktop.
텔레그램 봇 정각알림
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const schedule = require('node-schedule'); | |
schedule.scheduleJob('0 0 * * * *', () => { | |
var chatParticipantFile = fs.readFileSync('./chat_participant.txt', 'utf8'); | |
var chatParticipant = chatParticipantFile.split('\n'); | |
chatParticipant.forEach((element, index, array) => { | |
if (element) { | |
bot.sendMessage(element, '정각입니다.', {disable_notification: true}); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHAT_ID_0 | |
CHAT_ID_1 | |
CHAT_ID_2 | |
CHAT_ID_3 | |
CHAT_ID_4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment