···319 "fetch_failed": "Failed to fetch trivia questions: {error}",
320 "api_error": "Trivia API error: {code}"
321 }
322+ },
323+ "social": {
324+ "name": "social",
325+ "description": "Get notifications of posts from Fediverse and Bluesky accounts",
326+ "invalidChannel": "❌ Invalid channel selected.",
327+ "notInitializedThrow": "Social media features are not properly initialized.",
328+ "addSuccess": "✅ Now tracking {platform} account {account}. New posts will be posted in {channel}.",
329+ "notInitialized": "❌ Social media features are not initialized.",
330+ "refreshSuccess": "🔄 Refresh complete. {count} new post(s) notified.",
331+ "refreshFailed": "❌ Refresh failed: {message}",
332+ "removeSuccess": "✅ Removed {platform} account {account} from tracking.",
333+ "removeNotFound": "❌ Could not find a subscription for {platform} account {account}.",
334+ "listNone": "No social media accounts are being tracked in this server.",
335+ "listTitle": "📱 Tracked Social Media Accounts",
336+ "listDescription": "Here are all the social media accounts being tracked in this server:",
337+ "channelUnset": "No channel set",
338+ "fieldNoAccounts": "No accounts",
339+ "guildOnly": "This command can only be used in a server.",
340+ "unknownSubcommand": "Unknown subcommand.",
341+ "failedAction": "❌ Failed to {action} subscription: {message}"
342 }
343 },
344 "categories": {
+30
migrations/008_create_social_media_tables.sql
···000000000000000000000000000000
···1+CREATE TYPE social_platform AS ENUM ('bluesky', 'fediverse');
2+3+CREATE TABLE IF NOT EXISTS server_social_subscriptions (
4+ id SERIAL PRIMARY KEY,
5+ guild_id TEXT NOT NULL,
6+ platform social_platform NOT NULL,
7+ account_handle TEXT NOT NULL,
8+ last_post_uri TEXT,
9+ last_post_timestamp TIMESTAMPTZ,
10+ channel_id TEXT NOT NULL,
11+ created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
12+ updated_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
13+ UNIQUE(guild_id, platform, account_handle)
14+);
15+16+CREATE INDEX IF NOT EXISTS idx_server_social_subscriptions_guild ON server_social_subscriptions(guild_id);
17+CREATE INDEX IF NOT EXISTS idx_server_social_subscriptions_platform ON server_social_subscriptions(platform);
18+19+CREATE OR REPLACE FUNCTION update_updated_at_column()
20+RETURNS TRIGGER AS $$
21+BEGIN
22+ NEW.updated_at = NOW();
23+ RETURN NEW;
24+END;
25+$$ LANGUAGE plpgsql;
26+27+CREATE TRIGGER update_server_social_subscriptions_updated_at
28+BEFORE UPDATE ON server_social_subscriptions
29+FOR EACH ROW
30+EXECUTE FUNCTION update_updated_at_column();