Skip to content

Commit 1e1d1b9

Browse files
authored
feat: lock starter post managed by bot (#62)
1 parent 95aaf40 commit 1e1d1b9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/features/showcase/send-pinned-message.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export const sendShowcasePinnedMessage = createSlashCommand({
5959
);
6060

6161
if (pinnedThread) {
62+
if (!pinnedThread.locked) {
63+
await pinnedThread.setLocked(true);
64+
}
6265
const message = await pinnedThread.fetchStarterMessage();
6366
if (message !== null) {
6467
await message.edit({
@@ -81,6 +84,7 @@ export const sendShowcasePinnedMessage = createSlashCommand({
8184
},
8285
});
8386
thread.pin();
87+
thread.setLocked(true);
8488

8589
await interaction.editReply({
8690
content: 'Showcase pinned message sent successfully.',

0 commit comments

Comments
 (0)