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:
21
bot.js
21
bot.js
@@ -35,25 +35,14 @@ function shouldRun(promptConfig) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (promptConfig.frequency === "2x_week") {
|
if (promptConfig.frequency === "random" && promptConfig.minDays) {
|
||||||
// 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 (history.length > 0) {
|
if (history.length > 0) {
|
||||||
const lastPost = new Date(history[history.length - 1].date);
|
const lastPost = new Date(history[history.length - 1].date);
|
||||||
const daysSinceLast = (now - lastPost) / (1000 * 60 * 60 * 24);
|
const daysSinceLast = (now - lastPost) / (1000 * 60 * 60 * 24);
|
||||||
if (daysSinceLast < 2) return false;
|
if (daysSinceLast < promptConfig.minDays) return false;
|
||||||
}
|
}
|
||||||
|
// Random chance so it doesn't always fire on the minimum day
|
||||||
return true;
|
return Math.random() < 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -236,7 +225,7 @@ async function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!shouldRun(promptConfig)) {
|
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);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name": "tease",
|
"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",
|
"link": "https://onlyfans.com/juniper_sky",
|
||||||
"frequency": "2x_week",
|
"frequency": "random",
|
||||||
"startHour": 8,
|
"startHour": 8,
|
||||||
"endHour": 20
|
"endHour": 20,
|
||||||
|
"minDays": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "personality",
|
"name": "personality",
|
||||||
|
|||||||
Reference in New Issue
Block a user