Skip to content

Commit ae29685

Browse files
committed
refactor(devforum-role-info): Trim content
1 parent 3beab8a commit ae29685

2 files changed

Lines changed: 7 additions & 43 deletions

File tree

data/DevForumRoleMessageStrings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"overview": "### Developer Forum Member Role\nClick the `Update Roles` button below to claim your developer forum member role if you meet the eligibility criteria.\n\n- <@&526819675959459852> - Your **trust level** on the Roblox developer forum is `Member` (not to be confused with `Visitor`)\n- <@&150076122598604801> - Your **trust level** on the Roblox developer forum is `Regular`",
2+
"overview": "### Developer Forum Member Role(s)\nClick the `Update Roles` button below to claim your developer forum member role if you meet the eligibility criteria.\n\n- <@&526819675959459852> - Your **trust level** on the Roblox developer forum is `Member` (not to be confused with `Visitor`)\n- <@&150076122598604801> - Your **trust level** on the Roblox developer forum is `Regular`",
33
"level_up_title": "**How do I \"level up\"?**",
44
"level_up_description": "> To get posting access and “level up”, you need to be logged in to your account and spend some time reading content made by others on the forum. You will automatically be granted posting access once you meet the threshold.",
55
"level_up_article": "https://devforum.roblox.com/t/roblox-developer-forum-rules-international-communities/3170997",

src/commands/DevForumReactionRole.ts

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ import {
1212
MessageFlagsBitField,
1313
PermissionFlagsBits,
1414
SectionBuilder,
15-
SeparatorBuilder,
16-
SeparatorSpacingSize,
1715
TextDisplayBuilder,
18-
ThumbnailBuilder,
19-
time,
20-
TimestampStyles
16+
ThumbnailBuilder
2117
} from "discord.js";
2218

2319
// noinspection JSUnusedGlobalSymbols
@@ -61,55 +57,23 @@ export default class DevForumReactionRole extends Command<ChatInputCommandIntera
6157
const overviewSection = new SectionBuilder()
6258
.addTextDisplayComponents(overviewText)
6359
.setThumbnailAccessory(devforumLogo);
64-
const separator = new SeparatorBuilder()
65-
.setDivider(true)
66-
.setSpacing(SeparatorSpacingSize.Large);
67-
const container = new ContainerBuilder()
68-
.addSectionComponents(overviewSection)
69-
.addSeparatorComponents(separator);
60+
const container = new ContainerBuilder().addSectionComponents(overviewSection);
7061

71-
// DevForum info section
72-
const devforumInfoTitle = new TextDisplayBuilder().setContent(content.devforum_info_title);
73-
const devforumInfoDescription = new TextDisplayBuilder().setContent(content.devforum_info_description);
62+
// Buttons
7463
const devforumInfoArticleLink = new ButtonBuilder()
75-
.setLabel("Learn more")
64+
.setLabel("What is the developer forum?")
7665
.setURL(content.devforum_info_article)
7766
.setStyle(ButtonStyle.Link);
78-
const devforumInfoSection = new SectionBuilder()
79-
.addTextDisplayComponents(devforumInfoDescription)
80-
.setButtonAccessory(devforumInfoArticleLink);
81-
container
82-
.addTextDisplayComponents(devforumInfoTitle)
83-
.addSectionComponents(devforumInfoSection);
84-
85-
// Level up info section
86-
const levelUpTitle = new TextDisplayBuilder().setContent(content.level_up_title);
87-
const levelUpDescription = new TextDisplayBuilder().setContent(content.level_up_description);
8867
const levelUpArticleLink = new ButtonBuilder()
89-
.setLabel("Learn more")
68+
.setLabel("How do I level up?")
9069
.setURL(content.level_up_article)
9170
.setStyle(ButtonStyle.Link);
92-
const levelUpSection = new SectionBuilder()
93-
.addTextDisplayComponents(levelUpDescription)
94-
.setButtonAccessory(levelUpArticleLink);
95-
container
96-
.addTextDisplayComponents(levelUpTitle)
97-
.addSectionComponents(levelUpSection);
98-
99-
// Last updated footer
100-
const timestamp = time(new Date(), TimestampStyles.RelativeTime);
101-
const lastUpdatedText = new TextDisplayBuilder().setContent(`-# Last updated ${timestamp}`);
102-
container
103-
.addSeparatorComponents(separator)
104-
.addTextDisplayComponents(lastUpdatedText);
105-
106-
// Update roles button
10771
const updateRolesButton = new ButtonBuilder()
10872
.setCustomId("verify-devforum-rank")
10973
.setLabel("Update Roles")
11074
.setStyle(ButtonStyle.Primary);
11175
const actionRow = new ActionRowBuilder<ButtonBuilder>()
112-
.setComponents(updateRolesButton);
76+
.setComponents(updateRolesButton, devforumInfoArticleLink, levelUpArticleLink);
11377

11478
await interaction.reply({
11579
flags: MessageFlagsBitField.Flags.IsComponentsV2,

0 commit comments

Comments
 (0)