mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
Fix
This commit is contained in:
@@ -71,7 +71,8 @@ module.exports = class KinoCommand extends Command {
|
|||||||
Press the "Next" button to go to the next page, and "Prev" to go back.
|
Press the "Next" button to go to the next page, and "Prev" to go back.
|
||||||
Press "End" at any time to stop reading.
|
Press "End" at any time to stop reading.
|
||||||
`, { components: [row] });
|
`, { components: [row] });
|
||||||
const initialInteractions = await initialMsg.awaitMessageComponentInteractions(res => res.user.id === msg.author.id, {
|
const filter = res => res.user.id === msg.author.id;
|
||||||
|
const initialInteractions = await initialMsg.awaitMessageComponentInteractions(filter, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 15000
|
||||||
});
|
});
|
||||||
@@ -94,14 +95,14 @@ module.exports = class KinoCommand extends Command {
|
|||||||
|
|
||||||
${escapeMarkdown(line.trim())}
|
${escapeMarkdown(line.trim())}
|
||||||
`, { components: [row] });
|
`, { components: [row] });
|
||||||
const interactions = await initialMsg.awaitMessageComponentInteractions(res => res.user.id === msg.author.id, {
|
const interactions = await initialMsg.awaitMessageComponentInteractions(filter, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 15000
|
||||||
});
|
});
|
||||||
if (!interactions.size) break;
|
if (!interactions.size) break;
|
||||||
choice = interactions.first();
|
choice = interactions.first();
|
||||||
if (choice.customID === 'next') {
|
if (choice.customID === 'next') {
|
||||||
i++
|
i++;
|
||||||
} else if (choice.customID === 'prev') {
|
} else if (choice.customID === 'prev') {
|
||||||
i--;
|
i--;
|
||||||
} else if (choice.customID === 'end') {
|
} else if (choice.customID === 'end') {
|
||||||
|
|||||||
Reference in New Issue
Block a user