Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ai": {
"enabled": true,
"systemPrompt": "You are Volvox Bot, the friendly AI assistant for the Volvox developer community Discord server.\n\nYou're witty, snarky (but warm), and deeply knowledgeable about programming, software development, and tech.\n\nKey traits:\n- Helpful but not boring\n- Can roast people lightly when appropriate\n- Enthusiastic about cool tech and projects\n- Supportive of beginners learning to code\n- Concise - this is Discord, not an essay\n\nIf asked about your own infrastructure, model, or internals \u2014 say you don't know the specifics\nand suggest asking a server admin. Don't guess or speculate about what you run on.\n\nCRITICAL RULES:\n- NEVER type @everyone or @here \u2014 these ping hundreds of people\n- NEVER use mass mention pings under any circumstances\n- If you need to address the group, say \"everyone\" or \"folks\" without the @ symbol\n\nKeep responses under 2000 chars. Use Discord markdown when helpful.",
"systemPrompt": "You are Volvox Bot, the friendly AI assistant for the Volvox developer community Discord server.\n\nYou're witty, snarky (but warm), and deeply knowledgeable about programming, software development, and tech.\n\nKey traits:\n- Helpful but not boring\n- Can roast people lightly when appropriate\n- Enthusiastic about cool tech and projects\n- Supportive of beginners learning to code\n- Concise - this is Discord, not an essay\n\nIf asked about your own infrastructure, model, or internals say you don't know the specifics\nand suggest asking a server admin. Don't guess or speculate about what you run on.\n\nCRITICAL RULES:\n- NEVER type @everyone or @here these ping hundreds of people\n- NEVER use mass mention pings under any circumstances\n- If you need to address the group, say \"everyone\" or \"folks\" without the @ symbol\n\nKeep responses under 2000 chars. Use Discord markdown when helpful.",
"channels": [],
"historyLength": 20,
"historyTTLDays": 30,
Expand Down Expand Up @@ -43,7 +43,7 @@
"welcome": {
"enabled": true,
"channelId": "1438631182379253814",
"message": "Welcome to Volvox, {user}! \ud83c\udf31 You're member #{memberCount}!\n\nWe're a community of developers building cool stuff together. Feel free to introduce yourself!\n\nCheck out <#1446317676988465242> to see what we're working on, share your projects in <#1444154471704957069>, or just say hi in <#1438631182379253814>.\n\nHave questions? Just ask \u2014 we're here to help. \ud83d\udc9a",
"message": "Welcome to Volvox, {user}! 🌱 You're member #{memberCount}!\n\nWe're a community of developers building cool stuff together. Feel free to introduce yourself!\n\nCheck out <#1446317676988465242> to see what we're working on, share your projects in <#1444154471704957069>, or just say hi in <#1438631182379253814>.\n\nHave questions? Just ask we're here to help. 💚",
"dynamic": {
"enabled": true,
"timezone": "America/New_York",
Expand Down Expand Up @@ -162,6 +162,7 @@
"rank": "everyone",
"leaderboard": "everyone",
"profile": "everyone",
"remind": "everyone",
"challenge": "everyone",
"review": "everyone",
"showcase": "everyone"
Expand Down Expand Up @@ -211,19 +212,19 @@
"activityBadges": [
{
"days": 90,
"label": "\ud83d\udc51 Legend"
"label": "👑 Legend"
},
{
"days": 30,
"label": "\ud83c\udf33 Veteran"
"label": "🌳 Veteran"
},
{
"days": 7,
"label": "\ud83c\udf3f Regular"
"label": "🌿 Regular"
},
{
"days": 0,
"label": "\ud83c\udf31 Newcomer"
"label": "🌱 Newcomer"
}
]
},
Expand Down Expand Up @@ -264,5 +265,9 @@
"auditLog": {
"enabled": true,
"retentionDays": 90
},
"reminders": {
"enabled": false,
"maxPerUser": 25
}
}
}
46 changes: 46 additions & 0 deletions migrations/015_reminders.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* Migration 015 — Reminders
* Creates the reminders table for the personal reminder system.
*
* @see https://github.com/VolvoxLLC/volvox-bot/issues/137
*/

'use strict';

/**
* @param {import('pg').Pool} pool
*/
async function up(pool) {
await pool.query(`
CREATE TABLE IF NOT EXISTS reminders (
id SERIAL PRIMARY KEY,
guild_id VARCHAR NOT NULL,
user_id VARCHAR NOT NULL,
channel_id VARCHAR NOT NULL,
message TEXT NOT NULL,
remind_at TIMESTAMPTZ NOT NULL,
recurring_cron VARCHAR,
snoozed_count INT NOT NULL DEFAULT 0,
failed_delivery_count INT NOT NULL DEFAULT 0,
completed BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
`);

await pool.query(`
CREATE INDEX IF NOT EXISTS idx_reminders_due
ON reminders(remind_at) WHERE completed = false;
`);

await pool.query(`
CREATE INDEX IF NOT EXISTS idx_reminders_user_active
ON reminders(guild_id, user_id) WHERE completed = false;
`);

await pool.query(`
CREATE INDEX IF NOT EXISTS idx_reminders_user
ON reminders(guild_id, user_id, completed);
`);
}

module.exports = { up };
1 change: 1 addition & 0 deletions src/api/utils/configAllowlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const SAFE_CONFIG_KEYS = new Set([
'challenges',
'review',
'auditLog',
'reminders',
]);

export const READABLE_CONFIG_KEYS = [...SAFE_CONFIG_KEYS, 'logging'];
Expand Down
7 changes: 7 additions & 0 deletions src/api/utils/configValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ export const CONFIG_SCHEMA = {
retentionDays: { type: 'number' },
},
},
reminders: {
type: 'object',
properties: {
enabled: { type: 'boolean' },
maxPerUser: { type: 'number' },
},
},
};

/**
Expand Down
Loading
Loading