feat: add a way to show memory for debugging purposes

This commit is contained in:
HerozDotExe 2025-06-20 19:09:29 +02:00
parent fe91bfc813
commit 420c66c6e1

View file

@ -0,0 +1,24 @@
import {
CacheType,
ChatInputCommandInteraction,
MessageFlags,
SlashCommandBuilder,
} from "npm:discord.js";
import { Command } from "../../types.ts";
import { memory } from "../../memory.ts";
export default {
data: new SlashCommandBuilder()
.setName("dump")
.setDescription("Dump memory (DEV ONLY)"),
async execute(interaction: ChatInputCommandInteraction<CacheType>) {
if (interaction.user.id === "586959027934724100") {
await interaction.reply({
content: JSON.stringify(memory),
flags: MessageFlags.Ephemeral,
});
} else {
await interaction.reply("You're not allow to do that.");
}
},
} as Command;