Created
April 17, 2022 07:44
-
-
Save mikkipastel/d6dc62ca3010afadc1821faed3e2a980 to your computer and use it in GitHub Desktop.
ping standup meeting to discord text channel by channel id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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