diff --git a/commands/endMadlib.cjs b/commands/endMadlib.cjs new file mode 100644 index 0000000..8ae8861 --- /dev/null +++ b/commands/endMadlib.cjs @@ -0,0 +1,12 @@ +const { SlashCommandBuilder, Discord } = require('discord.js'); + +module.exports = { + data: new SlashCommandBuilder() + .setName('endmadlib') + .setDescription('Ends an existing madlib session.'), + async execute(interaction, client) { + await interaction.reply('Game aborted.'); + global.madlibState = { gameChannel: undefined, storyTitle:undefined, currentStory: undefined, storyIterate: 0, storyReplaceContent: [], storyLength: undefined}; + console.log("User " + interaction.user.tag + " ran /ping"); + }, +};