Skip to content

Commit e899d4e

Browse files
committed
add comments for component type and style
1 parent 05f60c1 commit e899d4e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

discord-bot/app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ function createMessageWithButtons(index, chunks) {
5959
content: chunks[index],
6060
components: [
6161
{
62-
type: 1,
62+
type: 1, // Action Row container for buttons
6363
components: [
6464
{
65-
type: 2,
65+
type: 2, // Button Object
6666
label: 'Previous',
67-
style: 1,
67+
style: 1, // Primary color
6868
custom_id: `prev_${index}`,
6969
disabled: index === 0, // Disable if on the first chunk
7070
},
7171
{
72-
type: 2,
72+
type: 2, // Button Object
7373
label: 'Next',
74-
style: 1,
74+
style: 1,// Primary color
7575
custom_id: `next_${index}`,
7676
disabled: index === chunks.length - 1, // Disable if on the last chunk
7777
},

0 commit comments

Comments
 (0)