Skip to content

Instantly share code, notes, and snippets.

@nesffer
Last active November 9, 2019 11:54
Show Gist options
  • Select an option

  • Save nesffer/3e786aafc2242d1a96a60edd748dc7f2 to your computer and use it in GitHub Desktop.

Select an option

Save nesffer/3e786aafc2242d1a96a60edd748dc7f2 to your computer and use it in GitHub Desktop.

Revisions

  1. Nesffer revised this gist Nov 5, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions bot.js
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    const schedule = require('node-schedule');

    schedule.scheduleJob('0 0 * * * *', () => {
    var chatParticipantGroupFile = fs.readFileSync('./chat_participant.txt', 'utf8');
    var chatParticipantGroup = chatParticipantGroupFile.split('\n');
    chatParticipantGroup.forEach((element, index, array) => {
    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});
    }
  2. Nesffer revised this gist Nov 5, 2016. 2 changed files with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bot.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    const schedule = require('node-schedule');

    schedule.scheduleJob('0 0 * * * *', () => {
    var chatParticipantGroupFile = fs.readFileSync('./chat_participant_group.txt', 'utf8');
    var chatParticipantGroupFile = fs.readFileSync('./chat_participant.txt', 'utf8');
    var chatParticipantGroup = chatParticipantGroupFile.split('\n');
    chatParticipantGroup.forEach((element, index, array) => {
    if (element) {
    File renamed without changes.
  3. Nesffer created this gist Nov 5, 2016.
    11 changes: 11 additions & 0 deletions bot.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    const schedule = require('node-schedule');

    schedule.scheduleJob('0 0 * * * *', () => {
    var chatParticipantGroupFile = fs.readFileSync('./chat_participant_group.txt', 'utf8');
    var chatParticipantGroup = chatParticipantGroupFile.split('\n');
    chatParticipantGroup.forEach((element, index, array) => {
    if (element) {
    bot.sendMessage(element, '정각입니다.', {disable_notification: true});
    }
    });
    });
    5 changes: 5 additions & 0 deletions chat_participant_group.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    CHAT_ID_0
    CHAT_ID_1
    CHAT_ID_2
    CHAT_ID_3
    CHAT_ID_4