Skip to content

Commit 6f99fdd

Browse files
authored
Merge pull request #385 from aternosorg/moderations
disable the correct buttons
2 parents a834f00 + fbde6c0 commit 6f99fdd

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@google-cloud/logging": "^9.1.1",
2525
"@googleapis/youtube": "^2.0.0",
2626
"diff": "^4.0.2",
27-
"discord.js": "^13.2.0-dev.1631620977.be8912a",
27+
"discord.js": "^13.2.0-dev.1632916991.fe95005",
2828
"fuse.js": "^6.4.6",
2929
"got": "^11.8.2",
3030
"mysql": "^2.18.1",

src/Command.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,21 +335,21 @@ class Command {
335335
* @param {Number} [duration] inactivity timeout in ms (default: 60s)
336336
*/
337337
async multiPageResponse(generatePage, pages, duration = 60000) {
338-
const nextButton = new MessageButton({
338+
const previousButton = new MessageButton({
339339
customId: 'previous',
340340
style: 'SECONDARY',
341341
emoji: icons.left,
342342
disabled: true,
343343
}),
344-
previousButton = new MessageButton({
344+
nextButton = new MessageButton({
345345
customId: 'next',
346346
style: 'SECONDARY',
347347
emoji: icons.right,
348348
disabled: pages === 1
349349
});
350350
await this.reply({
351351
components: [new MessageActionRow({
352-
components: [nextButton, previousButton]
352+
components: [previousButton, nextButton]
353353
})]
354354
}, await generatePage(0));
355355
const message = this.response;
@@ -393,8 +393,8 @@ class Command {
393393
embeds: [await generatePage(index)],
394394
components: [new MessageActionRow({
395395
components: [
396-
nextButton.setDisabled(index === pages -1),
397-
previousButton.setDisabled(index === 0)
396+
previousButton.setDisabled(index === 0),
397+
nextButton.setDisabled(index === pages -1)
398398
]
399399
})]
400400
});
@@ -407,8 +407,8 @@ class Command {
407407
components.stop('TIME');
408408
await message.edit({
409409
components: [
410-
nextButton.setDisabled(true),
411-
previousButton.setDisabled(true)
410+
previousButton.setDisabled(true),
411+
nextButton.setDisabled(true)
412412
]});
413413
}
414414
}

0 commit comments

Comments
 (0)