Skip to content

Instantly share code, notes, and snippets.

@mikkipastel
Created April 17, 2022 07:44
Show Gist options
  • Save mikkipastel/d6dc62ca3010afadc1821faed3e2a980 to your computer and use it in GitHub Desktop.
Save mikkipastel/d6dc62ca3010afadc1821faed3e2a980 to your computer and use it in GitHub Desktop.
ping standup meeting to discord text channel by channel id
client.once('ready', async () => {
console.log('Ready!');
try {
const channel = client.channels.cache.get(process.env.GENERAL_CHANNEL_ID);
await cron.schedule('00 10 * * Mon-Fri', async () => {
channel.send('@everyone, standup meeting', {});
});
} catch (error) {
console.error('Error trying to send a message: ', error);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment