Post "Good morning ☀️" in #general every day at 9am UTC
Posts "Good morning ☀️" to a configured channel every day at 9:00 AM UTC.
/morning setup to start the daily scheduleThe greeting will then post automatically at 9am UTC every day.
Made by MEE6. Remix it to get a copy of your own and change anything you like.
✅ Morning greetings will now post every day at 9:00 AM UTC!
Good morning ☀️
// Daily morning greeting - posts "Good morning ☀️" at 9am UTC every day
mee6.settings({
channel: {
type: 'channel',
label: 'Morning greeting channel',
required: true,
sample: 'general',
},
});
// Setup command to start the daily schedule
mee6.command('morning setup', { description: 'Start daily morning greetings' }, async (ctx) => {
const channelId = ctx.settings.channel;
if (!channelId) {
await ctx.reply('Please configure the morning greeting channel in the dashboard first.');
return;
}
// Schedule the morning greeting to run every day at 9am UTC
// Cron format: minute hour day month weekday (all in UTC)
await mee6.schedule.cron('daily_morning', '0 9 * * *', { channelId });
await ctx.reply('✅ Morning greetings will now post every day at 9:00 AM UTC!');
});
// Handle the scheduled event
mee6.on('scheduled', async (ctx) => {
if (ctx.scheduleKey === 'daily_morning') {
const payload = ctx.payload as { channelId: string } | null;
if (!payload?.channelId) {
mee6.log('Morning schedule fired but no channel in payload');
return;
}
await ctx.send(payload.channelId, 'Good morning ☀️');
}
});