content: "You are already verified!",
ephemeral: true,
});
}
} else if (interaction.customId === "giverole") {
const userPoints = await findUser(interaction.member.id);
await interaction.reply({
content: "Give role!",
ephemeral: true,
});
};
但是我收到 DiscordAPIError[10062]: 未知交互 错误。我想获得用户积分。
我想获取用户点并打印到控制台。
interaction
必须延迟或在 3 秒内回复,否则 API 将返回此错误。如果您知道应用程序的逻辑将花费超过 3 秒,请使用 interaction.deferReply()
,然后使用 interaction.editReply(/* ... */)
进行回复。