@Speedrace/

Counter

Nodejs

No description

fork
loading
Files
  • index.js
  • currency.js
  • keep_alive.js
  • package-lock.json

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.0804396768498501","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"Y29uc3QgRGlzY29yZCA9IHJlcXVpcmUoJ2Rpc2NvcmQuanMnKTsKY29uc3QgY2xpZW50ID0gbmV3IERpc2NvcmQuQ2xpZW50KCk7CmNvbnN0IHRva2VuID0gcHJvY2Vzcy5lbnYuY291bnRlcjsKY29uc3Qga2VlcF9hbGl2ZSA9IHJlcXVpcmUoJy4va2VlcF9hbGl2ZS5qcycpCmNvbnN0IHNjaGVkID0gcmVxdWlyZSgnbm9kZS1zY2hlZHVsZScpOwpjb25zdCBTZXF1ZWxpemUgPSByZXF1aXJlKCdzZXF1ZWxpemUnKTsKY29uc3QgUFJFRklYID0gJyEnOwoKY2xpZW50Lm9uKCdyZWFkeScsICgpID0+IHsKICBjb25zb2xlLmxvZygiSSdtIGluIik7CiAgY29uc29sZS5sb2coY2xpZW50LnVzZXIudXNlcm5hbWUpOwp9KTsKCmNsaWVudC5vbignbWVzc2FnZScsIG1zZyA9PiB7CiAgICBpZiAobXNnLmNvbnRlbnQudG9Mb3dlckNhc2UoKSA9PT0gJ3BpbmcnKSB7CiAgICBtc2cuY2hhbm5lbC5zZW5kKCJwb25nISIpOwogICAgfQp9KTsKCmNsaWVudC5vbignbWVzc2FnZScsIG1zZyA9PiB7CiAgICBpZiAobXNnLmNvbnRlbnQudG9Mb3dlckNhc2UoKSA9PT0gJ2JlZXAnKSB7CiAgICBtc2cuY2hhbm5lbC5zZW5kKCJib29wISIpOwogICAgfQp9KTsKCmNsaWVudC5vbignbWVzc2FnZScsIG1zZyA9PiB7CiAgICBpZiAobXNnLmF1dGhvci51c2VybmFtZSA9PT0gJ2NodW5reWFieScgfHwgbXNnLmF1dGhvci51c2VybmFtZSA9PT0gJ3d3MicpIHsKICAgIGN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wogICAgaWYobW9uID09IDExKSB7CiAgICAgbW9uPTA7CiAgICAgIHllYXIrKzsKICAgIH0gZWxzZSB7CiAgICBtb24rKzsKICAgfQogIH0KICAgIAp9KTsKCgoKCgoKY2xpZW50LmxvZ2luKHRva2VuKTsK"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const Discord = require('discord.js');
const client = new Discord.Client();
const token = process.env.counter;
const keep_alive = require('./keep_alive.js')
const sched = require('node-schedule');
const Sequelize = require('sequelize');
const PREFIX = '!';

client.on('ready', () => {
  console.log("I'm in");
  console.log(client.user.username);
});

client.on('message', msg => {
    if (msg.content.toLowerCase() === 'ping') {
    msg.channel.send("pong!");
    }
});

client.on('message', msg => {
    if (msg.content.toLowerCase() === 'beep') {
    msg.channel.send("boop!");
    }
});

client.on('message', msg => {
    if (msg.author.username === 'chunkyaby' || msg.author.username === 'ww2') {
    client.channels.get('575506557958225920').send(msg.content);
    if(msg.channel != '575506557958225920') {
    msg.delete();
    }
    }
});



let array = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];

var mon = 2;
var year = 2021;

//client.on('message', msg => {
 // if(!msg.content.startsWith("!")) return;
//    msg.channel.send('Message that goes above image', {
 //           url: [github.com/Tony120914/Beldum-Bot/blob/master/images/tails.png]});
//});
var hour = 8;
var rule2 = new sched.RecurrenceRule();
rule2.second = 20;
rule2.minute = 12;
sched.scheduleJob(rule2, function(){
  if(hour < 12) {
    hour++;
  } else {
    hour = 0;
    client.channels.get('575515429653577738').send('**' + array[mon] + ' ' + year + '**');
    if(mon == 11) {
     mon=0;
      year++;
    } else {
    mon++;
   }
  }
    
});






client.login(token);
node v10.16.0