-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaily.js
36 lines (25 loc) · 892 Bytes
/
daily.js
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
const Discord = require('discord.js');
const bot = new Discord.Client();
require("fs");
const { TOKEN } = require("./lib/bot.json");
var { game } = require("./lib/bot.json");
const cron = require('cron');
bot.on("ready", () => {
console.log("yoo");
function multiplegame() {
let status = game
let statusR = Math.floor(Math.random() * status.length);
bot.user.setActivity(status[statusR] , {type : "Playing" , status : "Idle"});
};
setInterval(multiplegame, 20000); // avoid faster
})
let jadwal = new cron.CronJob('00 44 05 * * *', () => {
var piro = true;
let yot = '$setgame Aku benci Nino'
// This runs every day at 10:30:00, you can do anything you want
let channel = bot.channels.get('730514615695310851');
channel.send('tested');
console.log(`terbacot ${Number(piro)}`)
});
jadwal.start()
bot.login(TOKEN);