Change tease to random frequency with 2-day minimum spacing

Replaces 2x_week cap with random posting: enforces minDays gap
then 50% chance each eligible day for natural randomness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Jackson
2026-03-07 23:05:31 +00:00
parent aba0415fe5
commit 1067ec2f78
2 changed files with 9 additions and 19 deletions

21
bot.js
View File

@@ -35,25 +35,14 @@ function shouldRun(promptConfig) {
return true;
}
if (promptConfig.frequency === "2x_week") {
// Max 2 per week
const dayOfWeek = now.getDay();
const mondayOffset = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
const monday = new Date(now);
monday.setDate(monday.getDate() - mondayOffset);
monday.setHours(0, 0, 0, 0);
const thisWeekPosts = history.filter((h) => new Date(h.date) >= monday);
if (thisWeekPosts.length >= 2) return false;
// Min 2 days between posts
if (promptConfig.frequency === "random" && promptConfig.minDays) {
if (history.length > 0) {
const lastPost = new Date(history[history.length - 1].date);
const daysSinceLast = (now - lastPost) / (1000 * 60 * 60 * 24);
if (daysSinceLast < 2) return false;
if (daysSinceLast < promptConfig.minDays) return false;
}
return true;
// Random chance so it doesn't always fire on the minimum day
return Math.random() < 0.5;
}
return true;
@@ -236,7 +225,7 @@ async function main() {
}
if (!shouldRun(promptConfig)) {
console.log(`"${promptName}" already hit its limit this week. Skipping.`);
console.log(`"${promptName}" skipped (too soon or random skip). Next time.`);
process.exit(0);
}

View File

@@ -1,11 +1,12 @@
[
{
"name": "tease",
"prompt": "You are writing a tweet for a woman who is quietly building a creative portfolio and wants people to visit her site out of curiosity.\n\nTone: casual, understated, real. Like she is just talking not performing, not selling, not trying too hard. No hashtags. No emojis unless they feel completely natural. Never use the word \"model\" or any fashion/influencer language.\n\nThe goal is to make someone curious enough to click the link. The best tweets hint at something without explaining it. They feel personal but not oversharing. Confident but not loud.",
"prompt": "You are writing a tweet for a woman who is quietly building a creative portfolio and wants people to visit her site out of curiosity.\n\nTone: casual, understated, real. Like she is just talking \u2014 not performing, not selling, not trying too hard. No hashtags. No emojis unless they feel completely natural. Never use the word \"model\" or any fashion/influencer language.\n\nThe goal is to make someone curious enough to click the link. The best tweets hint at something without explaining it. They feel personal but not oversharing. Confident but not loud.",
"link": "https://onlyfans.com/juniper_sky",
"frequency": "2x_week",
"frequency": "random",
"startHour": 8,
"endHour": 20
"endHour": 20,
"minDays": 2
},
{
"name": "personality",