@@ -335,21 +335,21 @@ class Command {
335
335
* @param {Number } [duration] inactivity timeout in ms (default: 60s)
336
336
*/
337
337
async multiPageResponse ( generatePage , pages , duration = 60000 ) {
338
- const nextButton = new MessageButton ( {
338
+ const previousButton = new MessageButton ( {
339
339
customId : 'previous' ,
340
340
style : 'SECONDARY' ,
341
341
emoji : icons . left ,
342
342
disabled : true ,
343
343
} ) ,
344
- previousButton = new MessageButton ( {
344
+ nextButton = new MessageButton ( {
345
345
customId : 'next' ,
346
346
style : 'SECONDARY' ,
347
347
emoji : icons . right ,
348
348
disabled : pages === 1
349
349
} ) ;
350
350
await this . reply ( {
351
351
components : [ new MessageActionRow ( {
352
- components : [ nextButton , previousButton ]
352
+ components : [ previousButton , nextButton ]
353
353
} ) ]
354
354
} , await generatePage ( 0 ) ) ;
355
355
const message = this . response ;
@@ -393,8 +393,8 @@ class Command {
393
393
embeds : [ await generatePage ( index ) ] ,
394
394
components : [ new MessageActionRow ( {
395
395
components : [
396
- nextButton . setDisabled ( index === pages - 1 ) ,
397
- previousButton . setDisabled ( index === 0 )
396
+ previousButton . setDisabled ( index === 0 ) ,
397
+ nextButton . setDisabled ( index === pages - 1 )
398
398
]
399
399
} ) ]
400
400
} ) ;
@@ -407,8 +407,8 @@ class Command {
407
407
components . stop ( 'TIME' ) ;
408
408
await message . edit ( {
409
409
components : [
410
- nextButton . setDisabled ( true ) ,
411
- previousButton . setDisabled ( true )
410
+ previousButton . setDisabled ( true ) ,
411
+ nextButton . setDisabled ( true )
412
412
] } ) ;
413
413
}
414
414
}
0 commit comments