i'm pushing because i have no idea what i changed and ima work on this from a laptop
This commit is contained in:
parent
b45f74894f
commit
bb0c56e888
|
@ -1,6 +1,6 @@
|
||||||
import { ApplyOptions } from '@sapphire/decorators';
|
import { ApplyOptions } from '@sapphire/decorators';
|
||||||
import { Listener, ListenerOptions } from '@sapphire/framework';
|
import { Listener, ListenerOptions } from '@sapphire/framework';
|
||||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, GuildMember, Interaction, InteractionType } from 'discord.js';
|
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ComponentType, GuildMember, Interaction, InteractionType, MessageActionRowComponentBuilder } from 'discord.js';
|
||||||
import { RolesMessage } from '../lib/types';
|
import { RolesMessage } from '../lib/types';
|
||||||
|
|
||||||
@ApplyOptions<ListenerOptions>({
|
@ApplyOptions<ListenerOptions>({
|
||||||
|
@ -41,10 +41,10 @@ export class UserEvent extends Listener {
|
||||||
|
|
||||||
// arrays with all the buttons and if the user has them are now in arrayOfArrays, figure out how to get that in a message later:tm:
|
// arrays with all the buttons and if the user has them are now in arrayOfArrays, figure out how to get that in a message later:tm:
|
||||||
|
|
||||||
let rows: ActionRowBuilder[] = [];
|
let rows: ActionRowBuilder<MessageActionRowComponentBuilder>[] = [];
|
||||||
|
|
||||||
for (const roles of arrayOfArrays) {
|
for (const roles of arrayOfArrays) {
|
||||||
let row = new ActionRowBuilder();
|
let row = new ActionRowBuilder<MessageActionRowComponentBuilder>();
|
||||||
|
|
||||||
for (const role of roles) {
|
for (const role of roles) {
|
||||||
row.addComponents(
|
row.addComponents(
|
||||||
|
@ -58,7 +58,7 @@ export class UserEvent extends Listener {
|
||||||
rows.push(row);
|
rows.push(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
await interaction.reply({ content: undefined, components: rows as any, ephemeral: true });
|
await interaction.reply({ content: undefined, components: rows, ephemeral: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue