mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 21:40:51 +02:00
Fix
This commit is contained in:
@@ -48,7 +48,7 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
const gameMsg = await msg.reply('Welcome to Akinator! Think of a character, and I will try to guess it.', {
|
const gameMsg = await msg.reply('Welcome to Akinator! Think of a character, and I will try to guess it.', {
|
||||||
components: [initialRow]
|
components: [initialRow]
|
||||||
});
|
});
|
||||||
const initialVerify = await gameMsg.awaitMessageComponentInteractions(res => res.user.id === msg.author.id, {
|
const initialVerify = await gameMsg.awaitMessageComponent(res => res.user.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 30000
|
time: 30000
|
||||||
});
|
});
|
||||||
@@ -86,7 +86,7 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
`**${aki.currentStep + 1}.** ${aki.question} (${Math.round(Number.parseInt(aki.progress, 10))}%)`,
|
`**${aki.currentStep + 1}.** ${aki.question} (${Math.round(Number.parseInt(aki.progress, 10))}%)`,
|
||||||
{ components: [row, sRow] }
|
{ components: [row, sRow] }
|
||||||
);
|
);
|
||||||
const interactions = await gameMsg.awaitMessageComponentInteractions(res => res.user.id === msg.author.id, {
|
const interactions = await gameMsg.awaitMessageComponent(res => res.user.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 30000
|
time: 30000
|
||||||
});
|
});
|
||||||
@@ -128,7 +128,7 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
new MessageButton().setCustomId('false').setLabel('No').setStyle('DANGER')
|
new MessageButton().setCustomId('false').setLabel('No').setStyle('DANGER')
|
||||||
);
|
);
|
||||||
await buttonPress.editReply('Is this your character?', { embeds: [embed], components: [guessRow] });
|
await buttonPress.editReply('Is this your character?', { embeds: [embed], components: [guessRow] });
|
||||||
const verification = await gameMsg.awaitMessageComponentInteractions(res => res.user.id === msg.author.id, {
|
const verification = await gameMsg.awaitMessageComponent(res => res.user.id === msg.author.id, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 30000
|
time: 30000
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ module.exports = class TrueOrFalseCommand extends Command {
|
|||||||
${decodeURIComponent(body.results[0].question)}
|
${decodeURIComponent(body.results[0].question)}
|
||||||
`, { components: [row] });
|
`, { components: [row] });
|
||||||
const filter = res => res.user.id === msg.author.id;
|
const filter = res => res.user.id === msg.author.id;
|
||||||
const interactions = await questionMsg.awaitMessageComponentInteractions(filter, {
|
const interactions = await questionMsg.awaitMessageComponent(filter, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 15000
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ module.exports = class KinoCommand extends Command {
|
|||||||
Press "End" at any time to stop reading.
|
Press "End" at any time to stop reading.
|
||||||
`, { components: [row] });
|
`, { components: [row] });
|
||||||
const filter = res => res.user.id === msg.author.id;
|
const filter = res => res.user.id === msg.author.id;
|
||||||
const initialInteractions = await initialMsg.awaitMessageComponentInteractions(filter, {
|
const initialInteractions = await initialMsg.awaitMessageComponent(filter, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 15000
|
time: 15000
|
||||||
});
|
});
|
||||||
@@ -95,7 +95,7 @@ module.exports = class KinoCommand extends Command {
|
|||||||
|
|
||||||
${escapeMarkdown(line.trim())}
|
${escapeMarkdown(line.trim())}
|
||||||
`, { components: [row] });
|
`, { components: [row] });
|
||||||
const interactions = await initialMsg.awaitMessageComponentInteractions(filter, {
|
const interactions = await initialMsg.awaitMessageComponent(filter, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 120000
|
time: 120000
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user