5 Commits

Author SHA1 Message Date
naomi 7ea46d86a9 feat: add Rhia as admin user for announcement command
Node.js CI / CI (push) Successful in 42s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m7s
Add Rhia's Discord ID to the admin users list, allowing her to run the /announcement command alongside Naomi. Updated the permission check to use a shared adminUsers array.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-16 02:11:16 -07:00
hikari 380db9d484 feat(announcements): remove threads posting and peerlist reminder (#23)
Node.js CI / CI (push) Successful in 50s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m17s
## Summary

- Removes automated announcement posting to Threads (moving to manual cross-posting as part of social engagement strategy)
- Removes Peerlist from the manual posting reminder (moving to social engagement rather than product announcements)
- Updates system prompt and JSON schema descriptions to reflect the current set of platforms

## Test Plan

- [ ] Trigger an announcement and confirm Threads is no longer called
- [ ] Confirm the alert in the response no longer mentions Peerlist
- [ ] Confirm lint and build pass (verified locally)

 This issue was created with help from Hikari~ 🌸

Reviewed-on: #23
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-04-20 12:56:55 -07:00
minori 093411b119 deps: update turbo to 2.8.12 (#19)
Node.js CI / CI (push) Successful in 43s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 2m21s
## Dependency Update

Updates **turbo** from `2.8.11` to `2.8.12`.

### Type
devDependencies

### Changelog
Updated from 2.8.11 to 2.8.12

---
 This PR was created by Minori, your friendly dependency updater! 🌸

Reviewed-on: #19
Reviewed-by: Naomi Carrigan <accounts@nhcarrigan.com>
Co-authored-by: Minori <minori@nhcarrigan.com>
Co-committed-by: Minori <minori@nhcarrigan.com>
2026-03-31 18:04:35 -07:00
hikari ad6b0c6f5a fix: web client styling and nav updates (#21)
Node.js CI / CI (push) Has been cancelled
Security Scan and Upload / Security & DefectDojo Upload (push) Has been cancelled
## Summary

- Aligns the client with the NHCarrigan style guide (witch palette, Griffy/Kalam fonts, shared stylesheet)
- Fixes sanctions page to sort by case number descending
- Updates all Hikari image URLs to `cdn.nhcarrigan.com/hikari.png`
- Adds Support link to nav (https://support.nhcarrigan.com)
- Fixes Chat nav link to point to https://chat.nhcarrigan.com

 This issue was created with help from Hikari~ 🌸

Reviewed-on: #21
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-31 18:04:10 -07:00
hikari 39b22c9514 fix: correct announcement API endpoint and add optional content fields (#20)
Node.js CI / CI (push) Successful in 43s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m50s
## Summary

- Fixes the announcement API URL from `/announcement` to `/api/announcement`
- Adds three optional additional content text inputs (Parts 2–4) to the announcement modal
- The bot concatenates all non-empty content fields with double newlines before forwarding to the API
- Only the first content field and the category selector remain required

## Test Plan

- [ ] Run `/announcement` and verify the modal opens with four content fields and a category selector
- [ ] Submit with only the first content field filled — verify it sends correctly
- [ ] Submit with multiple content fields filled — verify they are concatenated in the API request
- [ ] Verify the API no longer returns HTTP 405

Reviewed-on: #20
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-23 15:59:42 -07:00
8 changed files with 54 additions and 47 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ import {
TextInputBuilder, TextInputBuilder,
TextInputStyle, TextInputStyle,
} from "discord.js"; } from "discord.js";
import { naomiId } from "../config/entitlements.js"; import { adminUsers } from "../config/entitlements.js";
import { errorHandler } from "../utils/errorHandler.js"; import { errorHandler } from "../utils/errorHandler.js";
import type { Command } from "../interfaces/command.js"; import type { Command } from "../interfaces/command.js";
@@ -24,9 +24,9 @@ import type { Command } from "../interfaces/command.js";
// eslint-disable-next-line max-lines-per-function -- Modal requires many input components // eslint-disable-next-line max-lines-per-function -- Modal requires many input components
export const announcement: Command = async(_hikari, interaction) => { export const announcement: Command = async(_hikari, interaction) => {
try { try {
if (interaction.user.id !== naomiId) { if (!adminUsers.includes(interaction.user.id)) {
await interaction.reply({ await interaction.reply({
content: "This command is restricted to the owner.", content: "This command is restricted to administrators.",
ephemeral: true, ephemeral: true,
}); });
return; return;
+7 -1
View File
@@ -4,6 +4,7 @@
* @author Naomi Carrigan * @author Naomi Carrigan
*/ */
const naomiId = "465650873650118659"; const naomiId = "465650873650118659";
const rhiaId = "1086567250145841252";
const entitledGuilds = [ const entitledGuilds = [
"1354624415861833870", "1354624415861833870",
@@ -11,4 +12,9 @@ const entitledGuilds = [
const entitledUsers = [ naomiId ]; const entitledUsers = [ naomiId ];
export { entitledGuilds, entitledUsers, naomiId }; /**
* User IDs allowed to run administrative commands.
*/
const adminUsers = [ naomiId, rhiaId ];
export { adminUsers, entitledGuilds, entitledUsers, naomiId };
+3 -1
View File
@@ -15,7 +15,9 @@
<hr /> <hr />
<a routerLink="/settings" class="nav-link">Settings</a> <a routerLink="/settings" class="nav-link">Settings</a>
<hr /> <hr />
<a routerLink="/chat" class="nav-link">Chat</a> <a href="https://chat.nhcarrigan.com" target="_blank" class="nav-link">Chat</a>
<hr />
<a href="https://support.nhcarrigan.com" target="_blank" class="nav-link">Support</a>
<hr /> <hr />
</div> </div>
<i class="fa-solid fa-bars" *ngIf="!navOpen" (click)="toggleNav()"></i> <i class="fa-solid fa-bars" *ngIf="!navOpen" (click)="toggleNav()"></i>
+3 -1
View File
@@ -31,6 +31,8 @@ export class Sanctions {
private async loadSanctions(): Promise<void> { private async loadSanctions(): Promise<void> {
const sanctions = await this.sanctionsService.getSanctions(); const sanctions = await this.sanctionsService.getSanctions();
this.sanctions = sanctions.sort((a, b) => b.number - a.number); this.sanctions = sanctions.sort((a, b) => {
return b.number - a.number;
});
} }
} }
+1 -1
View File
@@ -18,7 +18,7 @@
"@nhcarrigan/eslint-config": "5.2.0", "@nhcarrigan/eslint-config": "5.2.0",
"@nhcarrigan/typescript-config": "4.0.0", "@nhcarrigan/typescript-config": "4.0.0",
"eslint": "9.30.1", "eslint": "9.30.1",
"turbo": "2.8.11", "turbo": "2.8.12",
"typescript": "5.8.3" "typescript": "5.8.3"
} }
} }
+29 -29
View File
@@ -18,8 +18,8 @@ importers:
specifier: 9.30.1 specifier: 9.30.1
version: 9.30.1(jiti@2.4.2) version: 9.30.1(jiti@2.4.2)
turbo: turbo:
specifier: 2.8.11 specifier: 2.8.12
version: 2.8.11 version: 2.8.12
typescript: typescript:
specifier: 5.8.3 specifier: 5.8.3
version: 5.8.3 version: 5.8.3
@@ -4618,38 +4618,38 @@ packages:
resolution: {integrity: sha512-3T3T04WzowbwV2FDiGXBbr81t64g1MUGGJRgT4x5o97N+8ArdhVCAF9IxFrxuSJmM3E5Asn7nKHkao0ibcZXAg==} resolution: {integrity: sha512-3T3T04WzowbwV2FDiGXBbr81t64g1MUGGJRgT4x5o97N+8ArdhVCAF9IxFrxuSJmM3E5Asn7nKHkao0ibcZXAg==}
engines: {node: ^18.17.0 || >=20.5.0} engines: {node: ^18.17.0 || >=20.5.0}
turbo-darwin-64@2.8.11: turbo-darwin-64@2.8.12:
resolution: {integrity: sha512-XKaCWaz4OCt77oYYvGCIRpvYD4c/aNaKjRkUpv+e8rN3RZb+5Xsyew4yRO+gaHdMIUhQznXNXfHlhs+/p7lIhA==} resolution: {integrity: sha512-EiHJmW2MeQQx+21x8hjMHw/uPhXt9PIxvDrxzOtyVwrXzL0tQmsxtO4qHf2l7uA+K6PUJ4+TjY1MHZDuCvWXrw==}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
turbo-darwin-arm64@2.8.11: turbo-darwin-arm64@2.8.12:
resolution: {integrity: sha512-VvynLHGUNvQ9k7GZjRPSsRcK4VkioTfFb7O7liAk4nHKjEcMdls7GqxzjVWgJiKz3hWmQGaP9hRa9UUnhVWCxA==} resolution: {integrity: sha512-cbqqGN0vd7ly2TeuaM8k9AK9u1CABO4kBA5KPSqovTiLL3sORccn/mZzJSbvQf0EsYRfU34MgW5FotfwW3kx8Q==}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
turbo-linux-64@2.8.11: turbo-linux-64@2.8.12:
resolution: {integrity: sha512-cbSn37dcm+EmkQ7DD0euy7xV7o2el4GAOr1XujvkAyKjjNvQ+6QIUeDgQcwAx3D17zPpDvfDMJY2dLQadWnkmQ==} resolution: {integrity: sha512-jXKw9j4r4q6s0goSXuKI3aKbQK2qiNeP25lGGEnq018TM6SWRW1CCpPMxyG91aCKrub7wDm/K45sGNT4ZFBcFQ==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
turbo-linux-arm64@2.8.11: turbo-linux-arm64@2.8.12:
resolution: {integrity: sha512-+trymp2s2aBrhS04l6qFxcExzZ8ffndevuUB9c5RCeqsVpZeiWuGQlWNm5XjOmzoMayxRARZ5ma7yiWbGMiLqQ==} resolution: {integrity: sha512-BRJCMdyXjyBoL0GYpvj9d2WNfMHwc3tKmJG5ATn2Efvil9LsiOsd/93/NxDqW0jACtHFNVOPnd/CBwXRPiRbwA==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
turbo-windows-64@2.8.11: turbo-windows-64@2.8.12:
resolution: {integrity: sha512-3kJjFSM4yw1n9Uzmi+XkAUgCae19l/bH6RJ442xo7mnZm0tpOjo33F+FYHoSVpIWVMd0HG0LDccyafPSdylQbA==} resolution: {integrity: sha512-vyFOlpFFzQFkikvSVhVkESEfzIopgs2J7J1rYvtSwSHQ4zmHxkC95Q8Kjkus8gg+8X2mZyP1GS5jirmaypGiPw==}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
turbo-windows-arm64@2.8.11: turbo-windows-arm64@2.8.12:
resolution: {integrity: sha512-JOM4uF2vuLsJUvibdR6X9QqdZr6BhC6Nhlrw4LKFPsXZZI/9HHLoqAiYRpE4MuzIwldCH/jVySnWXrI1SKto0g==} resolution: {integrity: sha512-9nRnlw5DF0LkJClkIws1evaIF36dmmMEO84J5Uj4oQ8C0QTHwlH7DNe5Kq2Jdmu8GXESCNDNuUYG8Cx6W/vm3g==}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
turbo@2.8.11: turbo@2.8.12:
resolution: {integrity: sha512-H+rwSHHPLoyPOSoHdmI1zY0zy0GGj1Dmr7SeJW+nZiWLz2nex8EJ+fkdVabxXFMNEux+aywI4Sae8EqhmnOv4A==} resolution: {integrity: sha512-auUAMLmi0eJhxDhQrxzvuhfEbICnVt0CTiYQYY8WyRJ5nwCDZxD0JG8bCSxT4nusI2CwJzmZAay5BfF6LmK7Hw==}
hasBin: true hasBin: true
twitter-api-v2@1.28.0: twitter-api-v2@1.28.0:
@@ -10192,32 +10192,32 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
turbo-darwin-64@2.8.11: turbo-darwin-64@2.8.12:
optional: true optional: true
turbo-darwin-arm64@2.8.11: turbo-darwin-arm64@2.8.12:
optional: true optional: true
turbo-linux-64@2.8.11: turbo-linux-64@2.8.12:
optional: true optional: true
turbo-linux-arm64@2.8.11: turbo-linux-arm64@2.8.12:
optional: true optional: true
turbo-windows-64@2.8.11: turbo-windows-64@2.8.12:
optional: true optional: true
turbo-windows-arm64@2.8.11: turbo-windows-arm64@2.8.12:
optional: true optional: true
turbo@2.8.11: turbo@2.8.12:
optionalDependencies: optionalDependencies:
turbo-darwin-64: 2.8.11 turbo-darwin-64: 2.8.12
turbo-darwin-arm64: 2.8.11 turbo-darwin-arm64: 2.8.12
turbo-linux-64: 2.8.11 turbo-linux-64: 2.8.12
turbo-linux-arm64: 2.8.11 turbo-linux-arm64: 2.8.12
turbo-windows-64: 2.8.11 turbo-windows-64: 2.8.12
turbo-windows-arm64: 2.8.11 turbo-windows-arm64: 2.8.12
twitter-api-v2@1.28.0: {} twitter-api-v2@1.28.0: {}
+6 -6
View File
@@ -24,7 +24,7 @@ Platform-specific requirements:
- Include clear calls to action - Include clear calls to action
- The same content will be used for Discord, Reddit, Ko-fi, and Patreon, so make it work well for all these platforms - The same content will be used for Discord, Reddit, Ko-fi, and Patreon, so make it work well for all these platforms
**Threaded (for Threads, Twitter, Bluesky, and Mastodon):** **Threaded (for Twitter, Bluesky, and Mastodon):**
- Break content into a thread of individual posts - Break content into a thread of individual posts
- Each post should be under 280 characters (to work for Twitter's limit, which is the most restrictive) - Each post should be under 280 characters (to work for Twitter's limit, which is the most restrictive)
- Posts should flow naturally from one to the next - Posts should flow naturally from one to the next
@@ -32,14 +32,14 @@ Platform-specific requirements:
- Make the first post compelling to encourage thread reading - Make the first post compelling to encourage thread reading
- Do NOT include post numbers or thread indicators (e.g., "1/5" or "🧵") - Do NOT include post numbers or thread indicators (e.g., "1/5" or "🧵")
- Plain text format (no markdown) - Plain text format (no markdown)
- The same thread will be used for Threads, Twitter, Bluesky, and Mastodon - The same thread will be used for Twitter, Bluesky, and Mastodon
**Plaintext (for LinkedIn, Facebook, and Peerlist):** **Plaintext (for LinkedIn and Facebook):**
- Plain text format (no markdown) - Plain text format (no markdown)
- Professional yet friendly tone, conversational style suitable for a broader audience - Professional yet friendly tone, conversational style suitable for a broader audience
- Include 3-5 relevant hashtags - Include 3-5 relevant hashtags
- Keep it concise but informative - Keep it concise but informative
- The same content will be used for LinkedIn, Facebook, and Peerlist - The same content will be used for LinkedIn and Facebook
**Universal requirements:** **Universal requirements:**
- All announcements must include a call to action to donate (https://donate.nhcarrigan.com) - All announcements must include a call to action to donate (https://donate.nhcarrigan.com)
@@ -71,13 +71,13 @@ const announcementJsonSchema = {
type: "object", type: "object",
}, },
plaintext: { plaintext: {
description: "Plain text announcement for LinkedIn, Facebook, and Peerlist (shared content). Should be professional yet friendly, conversational style suitable for a broader audience. Include 3-5 relevant hashtags and calls to action for donating and joining Discord.", description: "Plain text announcement for LinkedIn and Facebook (shared content). Should be professional yet friendly, conversational style suitable for a broader audience. Include 3-5 relevant hashtags and calls to action for donating and joining Discord.",
maxLength: 1900, maxLength: 1900,
minLength: 100, minLength: 100,
type: "string", type: "string",
}, },
threaded: { threaded: {
description: "Array of individual posts that form a thread. Will be used for Threads, Twitter, Bluesky, and Mastodon. Each post should be under 280 characters (Twitter's limit) and flow naturally from one to the next.", description: "Array of individual posts that form a thread. Will be used for Twitter, Bluesky, and Mastodon. Each post should be under 280 characters (Twitter's limit) and flow naturally from one to the next.",
items: { items: {
description: "A single post in the thread (max 280 characters, no post numbers or thread indicators)", description: "A single post in the thread (max 280 characters, no post numbers or thread indicators)",
maxLength: 280, maxLength: 280,
+2 -5
View File
@@ -12,7 +12,6 @@ import { announceOnDiscourse } from "../modules/announceOnDiscourse.js";
import { announceOnFacebook } from "../modules/announceOnFacebook.js"; import { announceOnFacebook } from "../modules/announceOnFacebook.js";
import { announceOnMastodon } from "../modules/announceOnMastodon.js"; import { announceOnMastodon } from "../modules/announceOnMastodon.js";
import { announceOnReddit } from "../modules/announceOnReddit.js"; import { announceOnReddit } from "../modules/announceOnReddit.js";
import { announceOnThreads } from "../modules/announceOnThreads.js";
import { announceOnTwitter } from "../modules/announceOnTwitter.js"; import { announceOnTwitter } from "../modules/announceOnTwitter.js";
import { generateAnnouncements } from "../modules/generateAnnouncements.js"; import { generateAnnouncements } from "../modules/generateAnnouncements.js";
import { getIpFromRequest } from "../modules/getIpFromRequest.js"; import { getIpFromRequest } from "../modules/getIpFromRequest.js";
@@ -116,7 +115,6 @@ export const announcementRoutes: FastifyPluginAsync = async(server) => {
blueskyResult, blueskyResult,
twitterResult, twitterResult,
facebookResult, facebookResult,
threadsResult,
mastodonResult, mastodonResult,
discourseResult, discourseResult,
] = await Promise.allSettled([ ] = await Promise.allSettled([
@@ -125,15 +123,14 @@ export const announcementRoutes: FastifyPluginAsync = async(server) => {
announceOnBluesky(threaded), announceOnBluesky(threaded),
announceOnTwitter(threaded), announceOnTwitter(threaded),
announceOnFacebook(plaintext), announceOnFacebook(plaintext),
announceOnThreads(threaded),
announceOnMastodon(threaded), announceOnMastodon(threaded),
announceOnDiscourse(markdownTitle, markdownContent, type), announceOnDiscourse(markdownTitle, markdownContent, type),
]); ]);
return await reply.status(201).send({ return await reply.status(201).send({
alert: `Please remember to manually post to: LinkedIn, Peerlist, Ko-fi, and Patreon.`, alert: `Please remember to manually post to: LinkedIn, Ko-fi, and Patreon.`,
cost: announcement.cost, cost: announcement.cost,
message: `Announcement processed. Discord: ${getPlatformResult(discordResult)}, Reddit: ${getPlatformResult(redditResult)}, Bluesky: ${getPlatformResult(blueskyResult)}, Twitter: ${getPlatformResult(twitterResult)}, Facebook: ${getPlatformResult(facebookResult)}, Threads: ${getPlatformResult(threadsResult)}, Mastodon: ${getPlatformResult(mastodonResult)}, Discourse: ${getPlatformResult(discourseResult)}`, message: `Announcement processed. Discord: ${getPlatformResult(discordResult)}, Reddit: ${getPlatformResult(redditResult)}, Bluesky: ${getPlatformResult(blueskyResult)}, Twitter: ${getPlatformResult(twitterResult)}, Facebook: ${getPlatformResult(facebookResult)}, Mastodon: ${getPlatformResult(mastodonResult)}, Discourse: ${getPlatformResult(discourseResult)}`,
rawPost: announcement.response, rawPost: announcement.response,
}); });
}, },