Compare commits

1 Commits

Author SHA1 Message Date
hikari 2fa1fa1801 docs: update feedback section to use support forum
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m35s
2026-01-26 12:38:03 -08:00
13 changed files with 14 additions and 4614 deletions
-40
View File
@@ -1,40 +0,0 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check dependency pinning
uses: naomi-lgbt/dependency-pin-check@main
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Run linter
run: pnpm lint
- name: Build project
run: pnpm build
- name: Run tests
run: pnpm test
-2
View File
@@ -1,2 +0,0 @@
node_modules
prod
+14 -4
View File
@@ -1,6 +1,16 @@
# Rondelle
# New Repository Template
A Discord bot to facilitate coffee chats or breakouts.
This template contains all of our basic files for a new GitHub repository. There is also a handy workflow that will create an issue on a new repository made from this template, with a checklist for the steps we usually take in setting up a new repository.
If you're starting a Node.JS project with TypeScript, we have a [specific template](https://github.com/naomi-lgbt/nodejs-typescript-template) for that purpose.
## Readme
Delete all of the above text (including this line), and uncomment the below text to use our standard readme template.
<!-- # Project Name
Project Description
## Live Version
@@ -8,7 +18,7 @@ This page is currently deployed. [View the live website.]
## Feedback and Bugs
If you have feedback or a bug report, please feel free to open a GitHub issue!
If you have feedback or a bug report, please [log a ticket on our forum](https://support.nhcarrigan.com).
## Contributing
@@ -26,4 +36,4 @@ Copyright held by Naomi Carrigan.
## Contact
We may be contacted through our [Chat Server](http://chat.nhcarrigan.com) or via email at `contact@nhcarrigan.com`.
We may be contacted through our [Chat Server](http://chat.nhcarrigan.com) or via email at `contact@nhcarrigan.com`. -->
-5
View File
@@ -1,5 +0,0 @@
import NaomisConfig from "@nhcarrigan/eslint-config";
export default [
...NaomisConfig,
];
-35
View File
@@ -1,35 +0,0 @@
{
"name": "rondelle",
"pnpm": {
"onlyBuiltDependencies": [
"@prisma/engines",
"esbuild",
"prisma"
]
},
"version": "0.0.0",
"description": "",
"main": "./prod/index.js",
"scripts": {
"build": "tsc",
"start": "op run --env-file=prod.env -- node prod/index.js",
"lint": "eslint src --max-warnings 0",
"test": "echo \"No tests yet\" && exit 0"
},
"keywords": [],
"author": "Naomi Carrigan <contact@nhcarrigan.com>",
"license": "See LICENSE.md",
"type": "module",
"devDependencies": {
"@nhcarrigan/eslint-config": "5.2.0",
"@nhcarrigan/typescript-config": "4.0.0",
"@types/node": "22.10.6",
"prisma": "6.8.2",
"typescript": "5.7.3"
},
"dependencies": {
"@nhcarrigan/logger": "1.1.1",
"@prisma/client": "6.8.2",
"discord.js": "14.25.1"
}
}
-4397
View File
File diff suppressed because it is too large Load Diff
-35
View File
@@ -1,35 +0,0 @@
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mongodb"
url = env("MONGO_URI")
}
model ServerEvent {
id String @id @default(auto()) @map("_id") @db.ObjectId
serverId String
eventId String
eventName String
createdAt DateTime @default(now())
createdBy String
@@unique([serverId, eventId])
@@index([serverId])
}
model UserPairingHistory {
id String @id @default(auto()) @map("_id") @db.ObjectId
userId String
serverId String
pairings PairingRecord[]
@@unique([userId, serverId])
}
type PairingRecord {
recipientId String
eventId String
sessionDate DateTime
}
-7
View File
@@ -1,7 +0,0 @@
# 1Password vault references - safe to commit
# Run with: op run --env-file=prod.env -- <command>
# Example environment variables
DATABASE_URL=op://Development/rondelle-database/connection-string
API_KEY=op://Development/rondelle-api/api-key
SECRET_TOKEN=op://Development/rondelle-secrets/token
-34
View File
@@ -1,34 +0,0 @@
/**
* @copyright 2026
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { Client, GatewayIntentBits } from "discord.js";
import { instantiatePrisma } from "./utils/database.js";
import { logger } from "./utils/logger.js";
import type { Rondelle } from "./interfaces/rondelle.js";
/**
* Starts the Discord bot and connects to the database.
*/
const startBot = async(): Promise<void> => {
const rondelle: Rondelle = {
database: await instantiatePrisma(),
discord: new Client({
intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates ],
}),
};
rondelle.discord.once("ready", () => {
void logger.log("info", `Logged in as ${rondelle.discord.user?.tag ?? "unknown"}`);
});
await rondelle.discord.login(process.env.DISCORD_TOKEN);
};
await startBot().catch(async(error: unknown) => {
const actualError = error instanceof Error
? error
: new Error(String(error));
await logger.error("startBot", actualError);
});
-14
View File
@@ -1,14 +0,0 @@
/**
* @copyright 2026
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import type { PrismaClient } from "@prisma/client";
import type { Client } from "discord.js";
interface Rondelle {
database: PrismaClient;
discord: Client;
}
export type { Rondelle };
-20
View File
@@ -1,20 +0,0 @@
/**
* @copyright 2026
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { PrismaClient } from "@prisma/client";
import { logger } from "./logger.js";
/**
* Creates and connects a Prisma client instance.
* @returns The connected Prisma client.
*/
const instantiatePrisma = async(): Promise<PrismaClient> => {
const client = new PrismaClient();
await client.$connect();
await logger.log("info", "Connected to database.");
return client;
};
export { instantiatePrisma };
-13
View File
@@ -1,13 +0,0 @@
/**
* @copyright 2026
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import { Logger } from "@nhcarrigan/logger";
const logger = new Logger(
"rondelle",
process.env.LOG_TOKEN ?? "",
);
export { logger };
-8
View File
@@ -1,8 +0,0 @@
{
"extends": "@nhcarrigan/typescript-config",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./prod",
},
"include": ["src/**/*"]
}