diff --git a/src/commands/utils/dumpMemory.ts b/src/commands/utils/dumpMemory.ts new file mode 100644 index 0000000..36af793 --- /dev/null +++ b/src/commands/utils/dumpMemory.ts @@ -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) { + 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;