{name:'Using this wizard',value:'Throughout this setup wizard, you will be asked to fill out information. After completing a page, hit the Next button to continue.\nYou can also return to a previous page with the Back Button. Using this button will reset the page you were on, and the page you moved to, so only use it if you need to.'},
// { name: '\u200B', value: '\u200B' },
// { name: 'Inline field title', value: 'Some value here', inline: true },
{name:'Please Note',value:'There is a theoretical maximum of 15 minutes to finish setup.\nAfter 15 minutes from use of the command, this interaction will stop working.',inline:true},
),
// .addFields({ name: 'Inline field title', value: 'Some value here', inline: true })
// .setImage('https://i.imgur.com/AfFp7pu.png')
// .setTimestamp()
// .setFooter({ text: 'Some footer text here', iconURL: 'https://i.imgur.com/AfFp7pu.png' }),
'channelSelect':
newEmbedBuilder()
.setColor(0x00FFFF)
.setTitle('Reaction Role Setup Wizard')
.setDescription('Please choose the channel to create the reaction role message in.'),
'roleSelect':
newEmbedBuilder()
.setColor(0x00FFFF)
.setTitle('Reaction Role Setup Wizard')
.setDescription('Please choose the roles for the reaction message.\nPlease note: There is a hard limit of 25 roles per message. This is a Discord limitation.'),
'preEmbedModal':
newEmbedBuilder()
.setColor(0x00FFFF)
.setTitle('Reaction Role Setup Wizard')
.setDescription('A popup will appear on the next page. Please fill out the information requested.\nIf you accidently close the popup, come back to this page then click Next again to reopen it.'),
'embedModal':
newEmbedBuilder()
.setColor(0x00FFFF)
.setTitle('Reaction Role Setup Wizard')
.setDescription('A popup should have appeared. Please fill out the information requested.\nIf you accidently closed the popup, go back a page then click Next again to reopen it.'),
'postEmbedModal':
newEmbedBuilder()
.setColor(0x00FFFF)
.setTitle('Reaction Role Setup Wizard')
.setDescription('If you accidently closed the popup, return now. Otherwise, continue.'),
'finalStatus':
newEmbedBuilder()
.setColor(0x00FFFF)
.setTitle('Reaction Role Setup Wizard')
.setDescription('Welcome to the Reaction Role Setup Wizard!')
.addFields(
{name:'Using this wizard',value:'Throughout wizard, you will be asked to fill out information. After completing a page, hit the Next button to continue.\nYou can also return to a previous page with the Back Button. Using this button will reset the page you were on, and the page you moved to, so only use it if you need to.'},
{name:'Please Note',value:'There is a theoretical maximum of 15 minutes to finish setup.\nAfter 15 minutes from use of the command, this interaction will stop working.',inline:true},
),
};
// The following is a list of all possible component rows the bot will go through when setting up reaction roles.
// Despite the variable name, this isn't an array. It's easy to refer to it that way however.
// For the actual code, scroll down to "module.exports".
// For a list of content embeds, scroll up to "embedArray"
// For a list of components, scroll down to "componentArray"
constrowArray={
'introButtonRow':
newActionRowBuilder()
.addComponents(
newButtonBuilder()
.setCustomId('nextPage')
.setLabel('Begin')
.setStyle('Primary'),
),
'navigationButtonRow':
newActionRowBuilder()
.addComponents(
newButtonBuilder()
.setCustomId('previousPage')
.setLabel('Back')
.setStyle('Danger'),
newButtonBuilder()
.setCustomId('nextPage')
.setLabel('Next')
.setStyle('Primary'),
),
'modalNextButtonRow':
newActionRowBuilder()
.addComponents(
newButtonBuilder()
.setCustomId('previousPage')
.setLabel('Back')
.setStyle('Danger'),
newButtonBuilder()
.setCustomId('nextPageWithModal')
.setLabel('Next')
.setStyle('Primary'),
),
'modalPreviousToFinishRow':
newActionRowBuilder()
.addComponents(
newButtonBuilder()
.setCustomId('previousPageWithModal')
.setLabel('Back')
.setStyle('Danger'),
newButtonBuilder()
.setCustomId('finalPage')
.setLabel('Next')
.setStyle('Primary'),
),
'finalButtonRow':
newActionRowBuilder()
.addComponents(
newButtonBuilder()
.setCustomId('previousPage')
.setLabel('Back')
.setStyle('Danger'),
newButtonBuilder()
.setCustomId('finishButton')
.setLabel('Finish')
.setStyle('Success'),
),
'channelListSelectRow':
newActionRowBuilder()
.addComponents(
newChannelSelectMenuBuilder({
custom_id:'channelSelect',
max_values:1,
min_values:1,
channel_types:[ChannelType.GuildText],
}),
),
'roleListSelectRow':
newActionRowBuilder()
.addComponents(
newRoleSelectMenuBuilder({
custom_id:'roleSelect',
max_values:25,
min_values:1,
}),
),
'embedModal':
newModalBuilder()
.setCustomId('embedModal')
.setTitle('Write a message to go alongside the roles')
.addComponents(
newActionRowBuilder().addComponents(
newTextInputBuilder()
.setCustomId('embedTitle')
.setLabel('Title')
.setValue('Pick your roles!')
.setStyle(TextInputStyle.Short)
.setMaxLength(40)
.setRequired(true),
),
newActionRowBuilder().addComponents(
newTextInputBuilder()
.setCustomId('embedDescription')
.setLabel('Description / Information / Funny Quip')
.setValue('Click the buttons below to be assigned the listed role.')
.setStyle(TextInputStyle.Paragraph)
.setMaxLength(1000)
.setRequired(true),
),
newActionRowBuilder().addComponents(
newTextInputBuilder()
.setCustomId('embedColor')
.setLabel('Accent Color (Optional) - Use hexcodes, no #.')
.setValue('00FFFF')
.setStyle(TextInputStyle.Short)
.setMinLength(6)
.setMaxLength(6)
.setRequired(false),
),
newActionRowBuilder().addComponents(
newTextInputBuilder()
.setCustomId('embedFooter')
.setLabel('Footer (Optional)')
.setStyle(TextInputStyle.Short)
.setMaxLength(40)
.setRequired(false),
),
),
};
// The following is a list of all possible pages the bot will go through when setting up reaction roles.
// Despite the variable name, this isn't an array. It's easy to refer to it that way however.
// For the actual code, scroll down to "module.exports".
// For a list of content embeds, scroll up to "embedArray"
// For a list of component rows, scroll up to "rowArray"
this.editReply(interaction,pages[currPage],'You\'ve reached the last page!\nBelow is a status readout. Please ensure all non-optional items are marked Green. If a required item is marked Red, go back and start from that page again.\n\n'+nullCheckResponse);
}
if(i.customId==='finishButton'){
i.deferUpdate();
interaction.deleteReply();
this.createReactRoleMessage(interaction);
}
// Second Page: Determine the channel for the role message
if(i.customId==='channelSelect'){
channelID=i.values[0];
i.deferUpdate();
}
// Third Page: Determine the roles for the message
return[currentPage,'Missing the Send Messages permission in that channel. Please ensure the bot has the proper permissions to talk in that channel.\n'];
return[currentPage,'You are missing the Send Messages permission in that channel. Please ensure you have the proper permissions to talk in that channel.\n'];
return[currentPage,`The role ${role.name} is higher in the role hierarchy than your highest role. Please ensure you have the proper permissions to modify this role.\n`];