feat: add trading system with dedicated modules and centralize embed creation for commands

This commit is contained in:
syntaxbullet
2025-12-13 12:43:27 +01:00
parent 5f4efd372f
commit 421bb26ceb
13 changed files with 667 additions and 41 deletions

29
src/lib/embeds.ts Normal file
View File

@@ -0,0 +1,29 @@
import { EmbedBuilder, Colors } from "discord.js";
/**
* Creates a standardized error embed.
* @param message The error message to display.
* @param title Optional title for the embed. Defaults to "Error".
* @returns An EmbedBuilder instance configured as an error.
*/
export function createErrorEmbed(message: string, title: string = "Error"): EmbedBuilder {
return new EmbedBuilder()
.setTitle(`${title}`)
.setDescription(message)
.setColor(Colors.Red)
.setTimestamp();
}
/**
* Creates a standardized warning embed.
* @param message The warning message to display.
* @param title Optional title for the embed. Defaults to "Warning".
* @returns An EmbedBuilder instance configured as a warning.
*/
export function createWarningEmbed(message: string, title: string = "Warning"): EmbedBuilder {
return new EmbedBuilder()
.setTitle(`⚠️ ${title}`)
.setDescription(message)
.setColor(Colors.Yellow)
.setTimestamp();
}