Skip to content

Instantly share code, notes, and snippets.

@Hamatti
Last active August 2, 2021 14:45
Show Gist options
  • Save Hamatti/952482808a26cd1f5c7ba4311690857d to your computer and use it in GitHub Desktop.
Save Hamatti/952482808a26cd1f5c7ba4311690857d to your computer and use it in GitHub Desktop.
Very simple Discord bot skeleton
const Discord = require('discord.js');
const cron = require('cron');
const client = new Discord.Client();
client.login(process.env.BOT_TOKEN);
const job = new cron.CronJob("00 00 10 * * *", () => {
client.channels.cache.get("[channel id]").send("Tick tock");
});
job.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment