constmessage=awaitinteraction.reply({content:"You have requested to start a madlib game in the current channel. I will intercept any message sent in this channel as game input until the game is over. Please refrain from using this in a busy channel, as it can be annoying for others. Would you like to continue?",fetchReply:true,components:[row], allowedMentions:{repliedUser:false,}});
constmessage=awaitinteraction.reply({content:"You have requested to start a madlib game in the current channel. I will intercept any message sent in this channel as game input until the game is over. Please refrain from using this in a busy channel, as it can be annoying for others. Would you like to continue?",fetchReply:true,components:[row]});
client.on(Events.InteractionCreate,interaction=>{
if(!interaction.isButton())return;
if(interaction.customId=='yes'){
console.log("User selected yes");
if(interaction.channel.id!=undefined){
constrow=newActionRowBuilder()
.addComponents(
newStringSelectMenuBuilder()
.setCustomId('selectstory')
.setPlaceholder('Automatically pick a random story')
.setMaxValues(global.madlibState.numberOfStories)
.addOptions(
buildOptionJSON().toString()
),
);
interaction.reply({content:'Select a story',components:[row]});