Skip to content

Commit 31327f5

Browse files
tjjfvickiee
andauthored
helpthread: Truncate long titles (#200)
Co-authored-by: ckie <[email protected]>
1 parent 3471c2e commit 31327f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modules/helpthread.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,8 @@ export class HelpThreadModule extends Module {
373373
HelpThread.update(thread.id, {
374374
titleSetTimestamp: Date.now() + '',
375375
}),
376-
msg.channel.setName(`${username} - ${title}`),
376+
// Truncate if longer than 100, the max thread title length
377+
msg.channel.setName(`${username} - ${title}`.slice(0, 100)),
377378
]);
378379
}
379380

0 commit comments

Comments
 (0)