From Friday 6pm to Sunday midnight UTC, give every member 15 extra XP per message on a one-minute cooldown, announce the start and the end in a channel I choose, and /doublexp shows whether it is on and when it changes
Automatically awards bonus XP during weekends
Every Friday at 6pm UTC through Sunday midnight, members earn +15 XP per message (on a 1-minute cooldown).
The creation announces when the weekend boost starts and ends in your chosen channel, and /doublexp shows the current status and next transition time.
Setup: Choose an announcement channel in the settings.
Made by MEE6. Remix it to get a copy of your own and change anything you like.
Not active. Returns Friday 6pm UTC.
Schedule: Friday 6pm - Sunday midnight UTC
2 months ago
You are level 7 with 2615 XP.
You are level 2 with 395 XP.
Active now! Earn +15 XP per message (1min cooldown).
Schedule: Friday 6pm - Sunday midnight UTC
2 months ago
// Weekend Double XP: Friday 6pm - Sunday midnight UTC
// Bonus XP on messages, with announcements and status command
mee6.settings({
channel: { type: 'channel', label: 'Announcement channel', required: true, sample: 'announcements' },
});
/** Check if a UTC timestamp falls within weekend hours (Fri 18:00 - Sun 23:59:59) */
function isWeekend(timestamp: number): boolean {
const d = new Date(timestamp);
const day = d.getUTCDay(); // 0=Sun, 5=Fri, 6=Sat
const hour = d.getUTCHours();
// Friday from 18:00 onwards
if (day === 5 && hour >= 18) return true;
// All day Saturday
if (day === 6) return true;
// Sunday before midnight
if (day === 0) return true;
return false;
}
/** Get the next transition time (start or end of weekend) */
function getNextTransition(now: number): { time: number; isStart: boolean } {
const d = new Date(now);
const day = d.getUTCDay();
const hour = d.getUTCHours();
// Calculate milliseconds to next Friday 18:00 UTC
let daysUntilFriday = (5 - day + 7) % 7;
if (day === 5 && hour >= 18) daysUntilFriday = 7; // Already past this Friday
if (day === 6 || day === 0) daysUntilFriday = (5 - day + 7) % 7; // Weekend ongoing
const nextFriday = new Date(d);
nextFriday.setUTCDate(d.getUTCDate() + daysUntilFriday);
nextFriday.setUTCHours(18, 0, 0, 0);
// Calculate milliseconds to next Monday 00:00 UTC
let daysUntilMonday = (1 - day + 7) % 7;
if (daysUntilMonday === 0) daysUntilMonday = 7; // If today is Monday, next Monday
const nextMonday = new Date(d);
nextMonday.setUTCDate(d.getUTCDate() + daysUntilMonday);
nextMonday.setUTCHours(0, 0, 0, 0);
// Which comes first?
if (isWeekend(now)) {
return { time: nextMonday.getTime(), isStart: false };
} else {
return { time: nextFriday.getTime(), isStart: true };
}
}
/** Format a timestamp as a Discord relative timestamp */
function formatTime(timestamp: number): string {
return `<t:${Math.floor(timestamp / 1000)}:R>`;
}
// Award bonus XP on messages during weekend
mee6.on('message', async (ctx) => {
if (!isWeekend(Date.now())) return;
const m = mee6.store.member(ctx.author.id);
const lastXp = await m.get<number>('weekend_xp_last', 0);
const now = Date.now();
// One-minute cooldown
if (now - lastXp < 60000) return;
await mee6.xp.give(ctx.author.id, 15);
await m.set('weekend_xp_last', now);
});
// Status command
mee6.command('doublexp', { description: 'Check weekend double XP status' }, async (ctx) => {
const now = Date.now();
const active = isWeekend(now);
const { time, isStart } = getNextTransition(now);
await ctx.reply({
embed: {
title: '⚡ Weekend Double XP',
description: active
? '**Active now!** Earn +15 XP per message (1min cooldown).\n\nSchedule: Friday 6pm - Sunday midnight UTC'
: '**Not active.** Returns Friday 6pm UTC.\n\nSchedule: Friday 6pm - Sunday midnight UTC',
color: active ? 0x57f287 : 0x5865f2,
fields: [
{
name: active ? '⏰ Ends' : '⏰ Starts',
value: formatTime(time),
inline: true,
},
],
footer: { text: 'All times in UTC' },
},
});
});
// Announcements at both ends of the weekend: Friday 18:00 and Monday 00:00 UTC
mee6.schedule.cron('weekend_start', '0 18 * * 5');
mee6.schedule.cron('weekend_end', '0 0 * * 1');
// Handle scheduled announcements
mee6.on('scheduled', async (ctx) => {
const channelId = ctx.settings.channel;
if (!channelId) return;
if (ctx.scheduleKey === 'weekend_start') {
await ctx.send(channelId, {
embed: {
title: '⚡ Weekend Double XP Started!',
description: 'Earn **+15 XP per message** until Sunday midnight UTC!\n\nCooldown: 1 minute per message',
color: 0x57f287,
footer: { text: 'Active until Monday 00:00 UTC' },
},
});
}
if (ctx.scheduleKey === 'weekend_end') {
await ctx.send(channelId, {
embed: {
title: '⏰ Weekend Double XP Ended',
description: 'Thanks for participating! Double XP returns Friday at 6pm UTC.',
color: 0x5865f2,
footer: { text: 'See you next weekend!' },
},
});
}
});