feat: Introduce dynamic JSON-based configuration for game settings and command toggling via a new admin command.

This commit is contained in:
syntaxbullet
2025-12-15 21:59:28 +01:00
parent 1eace32aa1
commit ac6283e60c
12 changed files with 257 additions and 48 deletions

View File

@@ -2,7 +2,7 @@ import { createCommand } from "@/lib/utils";
import { SlashCommandBuilder, EmbedBuilder } from "discord.js";
import { economyService } from "@/modules/economy/economy.service";
import { userService } from "@/modules/user/user.service";
import { GameConfig } from "@/config/game";
import { config } from "@/lib/config";
import { createErrorEmbed, createWarningEmbed } from "@lib/embeds";
export const pay = createCommand({
@@ -26,8 +26,8 @@ export const pay = createCommand({
const senderId = interaction.user.id;
const receiverId = targetUser.id;
if (amount < GameConfig.economy.transfers.minAmount) {
await interaction.reply({ embeds: [createWarningEmbed(`Amount must be at least ${GameConfig.economy.transfers.minAmount}.`)], ephemeral: true });
if (amount < config.economy.transfers.minAmount) {
await interaction.reply({ embeds: [createWarningEmbed(`Amount must be at least ${config.economy.transfers.minAmount}.`)], ephemeral: true });
return;
}