Skip to content

Commit d2f92b5

Browse files
fix: shorten channel name length when it is too long for modals
1 parent 405e958 commit d2f92b5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "message-manager-backend",
3-
"version": "2.3.1",
3+
"version": "2.3.2",
44
"description": "Backend for the message manager site",
55
"main": "./dist/index.js",
66
"exports": "./dist/index.js",

src/interactions/commands/chatInput/send.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ export default async function handleSendCommand(
8888
});
8989
if (contentOnly) {
9090
return createModal({
91-
title: `Sending a message to #${channel.name}`,
91+
title: `Sending a message to #${
92+
channel.name.length > 23
93+
? `${channel.name.substring(0, 20)}...`
94+
: channel.name
95+
}`,
9296
custom_id: `send:${channelId}`,
9397
components: [
9498
createTextInputWithRow({

0 commit comments

Comments
 (0)