const { buildProfileOverview, buildProfileButtons } = require("../../utils/profileSystem"); const { temporaryEphemeralReply } = require("../../utils/cookieEconomy"); module.exports = { name: "crumbSaucerProfile", async execute(interaction) { const footer = interaction.message ?.embeds?.[0] ?.footer ?.text; const [ type, ownerId ] = footer?.split(":") ?? []; if ( type !== "crumbSaucer" || ownerId !== interaction.user.id ) { return temporaryEphemeralReply( interaction, { content: "This isn't your Crumb Saucer session." } ); } const embed = await buildProfileOverview( interaction.guildId, interaction.user, interaction.user.id ); return interaction.update({ embeds: [embed], components: buildProfileButtons( "overview", 0, 1 ) }); } };