4 Commits
v1.2.0 ... main

Author SHA1 Message Date
930d705504 feat: add to discord button
Some checks failed
Code Analysis / SonarQube (push) Failing after 16s
Node.js CI / Lint and Test (push) Successful in 46s
2025-07-04 17:55:06 -07:00
f50bb8c85d feat: avatar
All checks were successful
Node.js CI / Lint and Test (push) Successful in 1m17s
Code Analysis / SonarQube (push) Successful in 1m26s
2025-05-22 19:40:09 -07:00
344d4d0de7 chore: add sonar workflow
All checks were successful
Node.js CI / Lint and Test (push) Successful in 1m3s
Code Analysis / SonarQube (push) Successful in 1m12s
2025-02-26 13:29:23 -08:00
d3770103e1 fix: show button to get help
All checks were successful
Node.js CI / Lint and Test (push) Successful in 40s
2025-02-10 21:46:58 -08:00
3 changed files with 58 additions and 6 deletions

View File

@ -0,0 +1,34 @@
name: Code Analysis
on:
push:
branches:
- main
jobs:
sonar:
name: SonarQube
steps:
- name: Checkout Source Files
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarCube Scan
uses: SonarSource/sonarqube-scan-action@v4
timeout-minutes: 10
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: "https://quality.nhcarrigan.com"
with:
args: >
-Dsonar.sources=.
-Dsonar.projectKey=aria-iuvo
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@v1
with:
pollingTimeoutSec: 600
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: "https://quality.nhcarrigan.com"

View File

@ -19,8 +19,12 @@ const html = `<!DOCTYPE html>
<body> <body>
<main> <main>
<h1>Aria Iuvo</h1> <h1>Aria Iuvo</h1>
<img src="https://cdn.nhcarrigan.com/new-avatars/aria-full.png" width="250" alt="Aria" />
<section> <section>
<p>Bot to translate your messages on Discord!</p> <p>Bot to translate your messages on Discord!</p>
<a href="https://discord.com/oauth2/authorize?client_id=1338596130207957035s" class="social-button discord-button" style="display: inline-block; background-color: #5865F2; color: white; padding: 10px 20px; text-decoration: none; border-radius: 4px; margin: 5px;">
<i class="fab fa-discord"></i> Add to Discord
</a>
</section> </section>
<section> <section>
<h2>Links</h2> <h2>Links</h2>

View File

@ -3,11 +3,14 @@
* @license Naomi's Public License * @license Naomi's Public License
* @author Naomi Carrigan * @author Naomi Carrigan
*/ */
import { i18n } from "./i18n.js"; import {
import type { ActionRowBuilder,
ChatInputCommandInteraction, ButtonBuilder,
MessageContextMenuCommandInteraction, ButtonStyle,
type ChatInputCommandInteraction,
type MessageContextMenuCommandInteraction,
} from "discord.js"; } from "discord.js";
import { i18n } from "./i18n.js";
/** /**
* Responds to an interaction with a generic error message. * Responds to an interaction with a generic error message.
@ -20,9 +23,20 @@ export const replyToError = async(
| MessageContextMenuCommandInteraction, | MessageContextMenuCommandInteraction,
locale: string, locale: string,
): Promise<void> => { ): Promise<void> => {
const button = new ButtonBuilder().
setLabel(i18n("button.support", locale)).
setStyle(ButtonStyle.Link).
setURL("https://chat.nhcarrigan.com");
const row = new ActionRowBuilder<ButtonBuilder>().addComponents(button);
if (interaction.deferred || interaction.replied) { if (interaction.deferred || interaction.replied) {
await interaction.editReply(i18n("command-error", locale)); await interaction.editReply({
components: [ row ],
content: i18n("command-error", locale),
});
return; return;
} }
await interaction.reply(i18n("command-error", locale)); await interaction.reply({
components: [ row ],
content: i18n("command-error", locale),
});
}; };