Development (#98)

dependabot/npm_and_yarn/word-wrap-1.2.4
PineappleFan 3 years ago committed by GitHub
commit d53a2060b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -185,8 +185,16 @@ export async function callback(interaction: CommandInteraction | ButtonInteracti
const selectedRoles: string[][] = [];
const maxPage = options.length;
const completedPages: boolean[] = options.map((option) => option.min === 0);
for (let i = 0; i < maxPage; i++) {
selectedRoles.push([]);
let memberRoleIDs = interaction.member.roles;
if (memberRoleIDs instanceof GuildMemberRoleManager) {
memberRoleIDs = memberRoleIDs.cache.map((r) => r.id);
}
for (const page of options) {
selectedRoles.push(
page.options
.filter((option) => (memberRoleIDs as string[]).includes(option.role))
.map((option) => option.role)
);
}
let page = 0;

Loading…
Cancel
Save