fix: show private reasons for bans in summaries
vi v@vt3e.cat
Wed, 04 Mar 2026 17:44:35 +0000
2 files changed,
4 insertions(+),
15 deletions(-)
M
src/utils/profile.ts
→
src/utils/profile.ts
@@ -350,12 +350,6 @@ .addSectionComponents(section)
.addSeparatorComponents(new SeparatorBuilder()) .addTextDisplayComponents(aboutText); - const bans = await constructBansContainer(extras?.bans ?? null, { - limit: 5, - userId: profile.id, - showPrivate: extras?.showPrivate ?? false, - }); - const profileButton = new ButtonBuilder() .setLabel("View Profile") .setStyle(ButtonStyle.Link)@@ -365,7 +359,5 @@ mainContainer.addActionRowComponents(
new ActionRowBuilder<ButtonBuilder>().addComponents(profileButton), ); - return { mainContainer, bans, buttons: [profileButton] }; + return { mainContainer, buttons: [profileButton] }; } - -await constructBansSummaryContainer("7492141728");
M
src/utils/robloxUser.ts
→
src/utils/robloxUser.ts
@@ -37,10 +37,6 @@ );
const [thumbnailRes] = await roblox.getThumbnail(id, { shape: "SQUARE" }); const thumbnailUri = thumbnailRes ? thumbnailRes.response.imageUri : null; - await interaction.editReply(`Fetching bans for user with ID ${id}...`); - const [bansRes] = await roblox.getUserRestrictionLogs("21449357", id); - const bans = bansRes ?? null; - const randomMessages = [ "grok is this true", "<:swagong:1176858666452922469>",@@ -54,12 +50,13 @@ randomMessages[Math.floor(Math.random() * randomMessages.length)];
await interaction.editReply(message); const { mainContainer } = await constructUserContainer(user, { - bans, thumbnailUri, showPrivate: isModerator, }); - const banSummary = await constructBansSummaryContainer(id); + const banSummary = await constructBansSummaryContainer(id, { + showPrivate: isModerator, + }); await interaction.editReply(user.id); await interaction.followUp({