generated from nhcarrigan/template
Compare commits
5 Commits
11b23b10a6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ea46d86a9 | |||
| 380db9d484 | |||
| 093411b119 | |||
| ad6b0c6f5a | |||
| 39b22c9514 |
@@ -11,7 +11,7 @@ import {
|
|||||||
TextInputBuilder,
|
TextInputBuilder,
|
||||||
TextInputStyle,
|
TextInputStyle,
|
||||||
} from "discord.js";
|
} from "discord.js";
|
||||||
import { entitledUsers } 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";
|
||||||
|
|
||||||
@@ -21,11 +21,12 @@ import type { Command } from "../interfaces/command.js";
|
|||||||
* @param _hikari - Hikari's Discord instance (unused).
|
* @param _hikari - Hikari's Discord instance (unused).
|
||||||
* @param interaction - The command interaction payload from Discord.
|
* @param interaction - The command interaction payload from Discord.
|
||||||
*/
|
*/
|
||||||
|
// 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 (!entitledUsers.includes(interaction.user.id)) {
|
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;
|
||||||
@@ -41,6 +42,24 @@ export const announcement: Command = async(_hikari, interaction) => {
|
|||||||
setMaxLength(4000).
|
setMaxLength(4000).
|
||||||
setRequired(true);
|
setRequired(true);
|
||||||
|
|
||||||
|
const contentInput2 = new TextInputBuilder().
|
||||||
|
setCustomId("content_2").
|
||||||
|
setStyle(TextInputStyle.Paragraph).
|
||||||
|
setMaxLength(4000).
|
||||||
|
setRequired(false);
|
||||||
|
|
||||||
|
const contentInput3 = new TextInputBuilder().
|
||||||
|
setCustomId("content_3").
|
||||||
|
setStyle(TextInputStyle.Paragraph).
|
||||||
|
setMaxLength(4000).
|
||||||
|
setRequired(false);
|
||||||
|
|
||||||
|
const contentInput4 = new TextInputBuilder().
|
||||||
|
setCustomId("content_4").
|
||||||
|
setStyle(TextInputStyle.Paragraph).
|
||||||
|
setMaxLength(4000).
|
||||||
|
setRequired(false);
|
||||||
|
|
||||||
const categorySelect = new StringSelectMenuBuilder().
|
const categorySelect = new StringSelectMenuBuilder().
|
||||||
setCustomId("category").
|
setCustomId("category").
|
||||||
setPlaceholder("Select a category").
|
setPlaceholder("Select a category").
|
||||||
@@ -55,12 +74,27 @@ export const announcement: Command = async(_hikari, interaction) => {
|
|||||||
"Your version of the announcement, to send to the AI for processing.",
|
"Your version of the announcement, to send to the AI for processing.",
|
||||||
).
|
).
|
||||||
setTextInputComponent(contentInput);
|
setTextInputComponent(contentInput);
|
||||||
|
// eslint-disable-next-line stylistic/max-len -- Label chain exceeds line length limit
|
||||||
|
const contentLabel2 = new LabelBuilder().setLabel("Additional Copy (Part 2)").
|
||||||
|
setDescription("Optional continuation of your announcement copy.").
|
||||||
|
setTextInputComponent(contentInput2);
|
||||||
|
// eslint-disable-next-line stylistic/max-len -- Label chain exceeds line length limit
|
||||||
|
const contentLabel3 = new LabelBuilder().setLabel("Additional Copy (Part 3)").
|
||||||
|
setDescription("Optional continuation of your announcement copy.").
|
||||||
|
setTextInputComponent(contentInput3);
|
||||||
|
// eslint-disable-next-line stylistic/max-len -- Label chain exceeds line length limit
|
||||||
|
const contentLabel4 = new LabelBuilder().setLabel("Additional Copy (Part 4)").
|
||||||
|
setDescription("Optional continuation of your announcement copy.").
|
||||||
|
setTextInputComponent(contentInput4);
|
||||||
const categoryLabel = new LabelBuilder().setLabel("Announcement Category").
|
const categoryLabel = new LabelBuilder().setLabel("Announcement Category").
|
||||||
setDescription("The category of the announcement.").
|
setDescription("The category of the announcement.").
|
||||||
setStringSelectMenuComponent(categorySelect);
|
setStringSelectMenuComponent(categorySelect);
|
||||||
|
|
||||||
modal.addLabelComponents(
|
modal.addLabelComponents(
|
||||||
contentLabel,
|
contentLabel,
|
||||||
|
contentLabel2,
|
||||||
|
contentLabel3,
|
||||||
|
contentLabel4,
|
||||||
categoryLabel,
|
categoryLabel,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,18 @@
|
|||||||
* @license Naomi's Public License
|
* @license Naomi's Public License
|
||||||
* @author Naomi Carrigan
|
* @author Naomi Carrigan
|
||||||
*/
|
*/
|
||||||
|
const naomiId = "465650873650118659";
|
||||||
|
const rhiaId = "1086567250145841252";
|
||||||
|
|
||||||
const entitledGuilds = [
|
const entitledGuilds = [
|
||||||
"1354624415861833870",
|
"1354624415861833870",
|
||||||
];
|
];
|
||||||
|
|
||||||
const entitledUsers = [
|
const entitledUsers = [ naomiId ];
|
||||||
"465650873650118659",
|
|
||||||
];
|
|
||||||
|
|
||||||
export { entitledGuilds, entitledUsers };
|
/**
|
||||||
|
* User IDs allowed to run administrative commands.
|
||||||
|
*/
|
||||||
|
const adminUsers = [ naomiId, rhiaId ];
|
||||||
|
|
||||||
|
export { adminUsers, entitledGuilds, entitledUsers, naomiId };
|
||||||
|
|||||||
@@ -87,26 +87,37 @@ const buildAnnouncementFiles = (rawPost: RawPost): Array<AttachmentBuilder> => {
|
|||||||
* to the owner's DMs, and replies ephemerally with the platform recap.
|
* to the owner's DMs, and replies ephemerally with the platform recap.
|
||||||
* @param interaction - The modal submit interaction payload from Discord.
|
* @param interaction - The modal submit interaction payload from Discord.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line max-lines-per-function -- This is a big function.
|
||||||
export const handleAnnouncementModal = async(
|
export const handleAnnouncementModal = async(
|
||||||
interaction: ModalSubmitInteraction,
|
interaction: ModalSubmitInteraction,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
await interaction.deferReply({ ephemeral: true });
|
await interaction.deferReply({ ephemeral: true });
|
||||||
|
|
||||||
const content = interaction.fields.getTextInputValue("content");
|
const content = [
|
||||||
|
interaction.fields.getTextInputValue("content"),
|
||||||
|
interaction.fields.getTextInputValue("content_2"),
|
||||||
|
interaction.fields.getTextInputValue("content_3"),
|
||||||
|
interaction.fields.getTextInputValue("content_4"),
|
||||||
|
].filter((part) => {
|
||||||
|
return part.length > 0;
|
||||||
|
}).join("\n\n");
|
||||||
const categoryValues = interaction.fields.getStringSelectValues("category");
|
const categoryValues = interaction.fields.getStringSelectValues("category");
|
||||||
const type = categoryValues[0] ?? "company";
|
const type = categoryValues[0] ?? "company";
|
||||||
|
|
||||||
const response = await fetch("https://hikari.nhcarrigan.com/announcement", {
|
const response = await fetch(
|
||||||
body: JSON.stringify({ content, type }),
|
"https://hikari.nhcarrigan.com/api/announcement",
|
||||||
headers: {
|
{
|
||||||
|
body: JSON.stringify({ content, type }),
|
||||||
|
headers: {
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- HTTP header capitalisation convention
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- HTTP header capitalisation convention
|
||||||
"Authorization": process.env.ANNOUNCEMENT_TOKEN ?? "",
|
"Authorization": process.env.ANNOUNCEMENT_TOKEN ?? "",
|
||||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- HTTP header naming convention
|
// eslint-disable-next-line @typescript-eslint/naming-convention -- HTTP header naming convention
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
method: "POST",
|
||||||
},
|
},
|
||||||
method: "POST",
|
);
|
||||||
});
|
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* @author Naomi Carrigan
|
* @author Naomi Carrigan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { entitledGuilds, entitledUsers } from "../config/entitlements.js";
|
import { entitledGuilds, naomiId } from "../config/entitlements.js";
|
||||||
import type { Client, Guild, User } from "discord.js";
|
import type { Client, Guild, User } from "discord.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,7 +17,7 @@ const checkUserEntitlement = async(
|
|||||||
hikari: Client,
|
hikari: Client,
|
||||||
user: User,
|
user: User,
|
||||||
): Promise<boolean> => {
|
): Promise<boolean> => {
|
||||||
if (entitledUsers.includes(user.id)) {
|
if (user.id === naomiId) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const entitlements = await hikari.application?.entitlements.fetch({
|
const entitlements = await hikari.application?.entitlements.fetch({
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
hr {
|
hr {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid var(--foreground);
|
border-top: 1px solid var(--border);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host ::ng-deep ul{
|
:host ::ng-deep ul {
|
||||||
list-style-type: disc;
|
list-style-type: disc;
|
||||||
list-style-position: inside;
|
list-style-position: inside;
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ hr {
|
|||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 0.5em;
|
padding: 0 0.5em;
|
||||||
@@ -23,13 +24,13 @@ hr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.products {
|
.products {
|
||||||
background-color: #e0f7fa;
|
background-color: var(--witch-plum);
|
||||||
color: #006064;
|
color: var(--witch-moon);
|
||||||
}
|
}
|
||||||
|
|
||||||
.community {
|
.community {
|
||||||
background-color: #e8f5e9;
|
background-color: var(--witch-rose);
|
||||||
color: #1b5e20;
|
color: var(--witch-moon);
|
||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
|
|||||||
@@ -1,99 +1,96 @@
|
|||||||
ul {
|
ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep main{
|
::ng-deep main {
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#one {
|
#one {
|
||||||
transform: translateY(-200vh);
|
transform: translateY(-200vh);
|
||||||
animation: slide-down 2s forwards;
|
animation: slide-down 2s forwards;
|
||||||
font-size: 1.3rem;
|
font-size: 1.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#two {
|
#two {
|
||||||
transform: translateY(200vh);
|
transform: translateY(200vh);
|
||||||
animation: slide-up 2s forwards 2s;
|
animation: slide-up 2s forwards 2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#three {
|
#three {
|
||||||
transform: translateX(-200vw);
|
transform: translateX(-200vw);
|
||||||
animation: slide-left 2s forwards 4s;
|
animation: slide-left 2s forwards 4s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#four {
|
#four {
|
||||||
transform: translateX(200vw);
|
transform: translateX(200vw);
|
||||||
animation: slide-right 2s forwards 6s;
|
animation: slide-right 2s forwards 6s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#five {
|
#five {
|
||||||
transform: translateX(-200vw);
|
transform: translateX(-200vw);
|
||||||
animation: slide-left 2s forwards 8s;
|
animation: slide-left 2s forwards 8s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#six {
|
#six {
|
||||||
transform: translateX(200vw);
|
transform: translateX(200vw);
|
||||||
animation: slide-right 2s forwards 10s;
|
animation: slide-right 2s forwards 10s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#seven {
|
#seven {
|
||||||
transform: translateX(-200vw);
|
transform: translateX(-200vw);
|
||||||
animation: slide-left 2s forwards 12s;
|
animation: slide-left 2s forwards 12s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#fade {
|
#fade {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: fade-in 2s forwards 14s;
|
animation: fade-in 2s forwards 14s;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
background-color: var(--foreground);
|
background-color: var(--accent);
|
||||||
color: var(--background);
|
color: var(--witch-moon);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
border: 2px solid white;
|
border: 2px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover {
|
.btn:hover {
|
||||||
background-color: var(--background);
|
background-color: var(--highlight);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
transition: background-color 0.3s, color 0.3s;
|
transition: background-color 0.3s, color 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slide-left {
|
@keyframes slide-left {
|
||||||
100% { transform: translateX(0%); }
|
100% { transform: translateX(0%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slide-right {
|
@keyframes slide-right {
|
||||||
100% { transform: translateX(0%); }
|
100% { transform: translateX(0%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slide-up {
|
@keyframes slide-up {
|
||||||
100% { transform: translateY(0%); }
|
100% { transform: translateY(0%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes slide-down {
|
@keyframes slide-down {
|
||||||
100% { transform: translateY(0%); }
|
100% { transform: translateY(0%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fade-in {
|
@keyframes fade-in {
|
||||||
100% { opacity: 1; }
|
100% { opacity: 1; }
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes background-color {
|
|
||||||
0% { background-color: var(--foreground); }
|
|
||||||
100% { background-color: var(--background); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (prefers-reduced-motion: reduce) {
|
@media screen and (prefers-reduced-motion: reduce) {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<h1>Hi there, I'm Hikari~!</h1>
|
<h1>Hi there, I'm Hikari~!</h1>
|
||||||
<img
|
<img
|
||||||
src="https://cdn.nhcarrigan.com/new-avatars/hikari-full.png"
|
src="https://cdn.nhcarrigan.com/hikari.png"
|
||||||
alt="Hikari"
|
alt="Hikari"
|
||||||
height="250"
|
height="250"
|
||||||
|
style="display: block; margin: auto;"
|
||||||
/>
|
/>
|
||||||
<p id="one">How may I help you today?</p>
|
<p id="one">How may I help you today?</p>
|
||||||
<p id="two">I can assist you with:</p>
|
<p id="two">I can assist you with:</p>
|
||||||
|
|||||||
@@ -6,11 +6,13 @@ nav {
|
|||||||
height: 40px;
|
height: 40px;
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
|
border-bottom: 1px solid var(--border);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav a:not(#logo) {
|
nav a:not(#logo) {
|
||||||
@@ -34,7 +36,7 @@ img {
|
|||||||
hr {
|
hr {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid var(--foreground);
|
border-top: 1px solid var(--border);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +52,7 @@ hr {
|
|||||||
top: 40px;
|
top: 40px;
|
||||||
background-color: var(--background);
|
background-color: var(--background);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
border: 1px solid var(--foreground);
|
border: 1px solid var(--border);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
@@ -59,7 +61,6 @@ hr {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,44 +3,44 @@ a.product {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a.product:hover {
|
a.product:hover {
|
||||||
background-color: var(--background);
|
background-color: var(--highlight);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
.product:not(a) {
|
.product:not(a) {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
border: 2px dashed grey;
|
border: 2px dashed var(--witch-silver);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
background-color: var(--foreground);
|
background-color: var(--accent);
|
||||||
color: var(--background);
|
color: var(--witch-moon);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
border: 2px solid white;
|
border: 2px solid var(--border);
|
||||||
font-family: 'OpenDyslexic', monospace;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:disabled {
|
.btn:disabled {
|
||||||
background-color: var(--background);
|
background-color: var(--witch-plum);
|
||||||
color: var(--foreground);
|
color: var(--witch-moon);
|
||||||
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover {
|
.btn:hover {
|
||||||
background-color: var(--background);
|
background-color: var(--highlight);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
transition: background-color 0.3s, color 0.3s;
|
transition: background-color 0.3s, color 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product {
|
.product {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-areas: "logo title icon" "logo description icon";
|
grid-template-areas: "logo title icon" "logo description icon";
|
||||||
grid-template-columns: 100px 1fr auto;
|
grid-template-columns: 100px 1fr auto;
|
||||||
background-color: var(--foreground);
|
background-color: var(--witch-plum);
|
||||||
color: var(--background);
|
color: var(--witch-moon);
|
||||||
border: 2px solid white;
|
border: 2px solid var(--border);
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
@@ -49,6 +49,14 @@ a.product:hover {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: var(--witch-moon);
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
color: var(--witch-moon);
|
||||||
|
}
|
||||||
|
|
||||||
.icons {
|
.icons {
|
||||||
grid-area: icon;
|
grid-area: icon;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<h1>Products</h1>
|
<h1>Products</h1>
|
||||||
<img
|
<img
|
||||||
src="https://cdn.nhcarrigan.com/new-avatars/hikari-thinking-full.png"
|
src="https://cdn.nhcarrigan.com/hikari.png"
|
||||||
alt="Hikari"
|
alt="Hikari"
|
||||||
height="250"
|
height="250"
|
||||||
|
style="display: block; margin: auto;"
|
||||||
/>
|
/>
|
||||||
<p>Excellent! What sort of product are you looking for?</p>
|
<p>Excellent! What sort of product are you looking for?</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
hr {
|
hr {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid var(--foreground);
|
border-top: 1px solid var(--border);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host ::ng-deep ul{
|
:host ::ng-deep ul {
|
||||||
list-style-type: disc;
|
list-style-type: disc;
|
||||||
list-style-position: inside;
|
list-style-position: inside;
|
||||||
}
|
}
|
||||||
@@ -15,13 +15,14 @@ hr {
|
|||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag {
|
.tag {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 0.5em;
|
padding: 0 0.5em;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
background-color: #e0f7fa;
|
background-color: var(--witch-plum);
|
||||||
color: #006064;
|
color: var(--witch-moon);
|
||||||
}
|
}
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
|
|||||||
@@ -32,9 +32,7 @@ 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) => {
|
this.sanctions = sanctions.sort((a, b) => {
|
||||||
return b.createdAt > a.createdAt
|
return b.number - a.number;
|
||||||
? 1
|
|
||||||
: -1;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
.btn {
|
.btn {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
background-color: var(--foreground);
|
background-color: var(--accent);
|
||||||
color: var(--background);
|
color: var(--witch-moon);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
border: 2px solid white;
|
border: 2px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover {
|
.btn:hover {
|
||||||
background-color: var(--background);
|
background-color: var(--highlight);
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
transition: background-color 0.3s, color 0.3s;
|
transition: background-color 0.3s, color 0.3s;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<h1>Oh dear~!</h1>
|
<h1>Oh dear~!</h1>
|
||||||
<img
|
<img
|
||||||
src="https://cdn.nhcarrigan.com/new-avatars/hikari-cry-full.png"
|
src="https://cdn.nhcarrigan.com/hikari.png"
|
||||||
alt="Hikari"
|
alt="Hikari"
|
||||||
height="250"
|
height="250"
|
||||||
|
style="display: block; margin: auto;"
|
||||||
/>
|
/>
|
||||||
<p>You appear to have become lost!</p>
|
<p>You appear to have become lost!</p>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -15,10 +15,4 @@
|
|||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
</body>
|
</body>
|
||||||
<script src="https://cdn.nhcarrigan.com/headers/index.js"></script>
|
<script src="https://cdn.nhcarrigan.com/headers/index.js"></script>
|
||||||
<script>
|
|
||||||
const styleElement = document.getElementById("nhcarrigan-global-styles");
|
|
||||||
if (styleElement) {
|
|
||||||
styleElement.remove();
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+4
-94
@@ -1,102 +1,12 @@
|
|||||||
@font-face {
|
/* Account for the fixed navigation bar */
|
||||||
font-family: 'Vampyr';
|
|
||||||
src: url('https://cdn.nhcarrigan.com/fonts/vampyr.ttf') format('truetype');
|
|
||||||
}
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--foreground: #8F2447;
|
|
||||||
--background: #E1F6F9DC;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-family: 'Vampyr', monospace;
|
|
||||||
cursor: url('https://cdn.nhcarrigan.com/cursors/cursor.cur'), auto;
|
|
||||||
min-height: 100vh;
|
|
||||||
min-width: 100vw;
|
|
||||||
}
|
|
||||||
body::before {
|
|
||||||
background: url(https://cdn.nhcarrigan.com/background.png);
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: -1;
|
|
||||||
content: "";
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
opacity: 1;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
main {
|
main {
|
||||||
color: var(--foreground);
|
|
||||||
background-color: var(--background);
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 10px;
|
|
||||||
width: 100vw;
|
|
||||||
margin-bottom: 85px;
|
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
min-height: calc(100vh - 85px - 50px);
|
min-height: calc(100vh - 50px - 85px);
|
||||||
}
|
|
||||||
footer {
|
|
||||||
width: 100%;
|
|
||||||
color: var(--foreground);
|
|
||||||
background-color: var(--background);
|
|
||||||
position: fixed;
|
|
||||||
bottom: 0;
|
|
||||||
height: 75px;
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
#footer-inner-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
height: 75px;
|
|
||||||
}
|
|
||||||
#footer-badge-container {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(8, 1fr);
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-around;
|
|
||||||
}
|
|
||||||
#audio-theme-button, #theme-select-button {
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
cursor: url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
|
|
||||||
color: var(--foreground);
|
|
||||||
}
|
|
||||||
a {
|
|
||||||
color: unset;
|
|
||||||
cursor: url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
|
|
||||||
}
|
|
||||||
.btn:not(:disabled) {
|
|
||||||
cursor: url('https://cdn.nhcarrigan.com/cursors/pointer.cur'), pointer;
|
|
||||||
}
|
|
||||||
#tree-nation-offset-website {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.is-dark {
|
|
||||||
--foreground: #E1F6F9;
|
|
||||||
--background: #8F2447bb;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 625px) {
|
@media screen and (max-width: 625px) {
|
||||||
#tree-nation-offset-website {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
footer, #footer-inner-container {
|
|
||||||
height: 50px;
|
|
||||||
justify-content: space-around;
|
|
||||||
}
|
|
||||||
main {
|
main {
|
||||||
margin-bottom: 60px;
|
margin-bottom: 60px;
|
||||||
|
min-height: calc(100vh - 50px - 60px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+29
-29
@@ -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: {}
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user