mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 19:33:43 +00:00
Discord: add reusable component option
This commit is contained in:
@@ -935,7 +935,10 @@ async function handleDiscordComponentEvent(params: {
|
||||
return;
|
||||
}
|
||||
|
||||
const consumed = resolveDiscordComponentEntry({ id: parsed.componentId });
|
||||
const consumed = resolveDiscordComponentEntry({
|
||||
id: parsed.componentId,
|
||||
consume: !entry.reusable,
|
||||
});
|
||||
if (!consumed) {
|
||||
try {
|
||||
await params.interaction.reply({
|
||||
@@ -1069,7 +1072,10 @@ async function handleDiscordModalTrigger(params: {
|
||||
return;
|
||||
}
|
||||
|
||||
const consumed = resolveDiscordComponentEntry({ id: parsed.componentId });
|
||||
const consumed = resolveDiscordComponentEntry({
|
||||
id: parsed.componentId,
|
||||
consume: !entry.reusable,
|
||||
});
|
||||
if (!consumed) {
|
||||
try {
|
||||
await params.interaction.reply({
|
||||
@@ -1501,7 +1507,10 @@ class DiscordComponentModal extends Modal {
|
||||
return;
|
||||
}
|
||||
|
||||
const consumed = resolveDiscordModalEntry({ id: modalId });
|
||||
const consumed = resolveDiscordModalEntry({
|
||||
id: modalId,
|
||||
consume: !modalEntry.reusable,
|
||||
});
|
||||
if (!consumed) {
|
||||
try {
|
||||
await interaction.reply({
|
||||
|
||||
Reference in New Issue
Block a user