Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Next (WIP)

- Fixed notices getting created and deleted in a loop.

## 5.1.0

- Fixed modal composers not passing through the right data.
Expand Down
7 changes: 6 additions & 1 deletion source/library/services/notices/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,13 @@ abstract class NoticeService<Generic extends { type: NoticeTypes }> extends Loca
return;
}

// If embeds are absent from the update payload (partial update unrelated to embeds), do nothing.
if (message.embeds === undefined) {
return;
}

// If the embed is still present, it wasn't an embed having been deleted. Do not do anything.
if ((message.embeds?.length ?? 0) > 0) {
if (message.embeds.length > 0) {
return;
}

Expand Down
7 changes: 6 additions & 1 deletion source/library/services/prompts/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,13 @@ abstract class PromptService<
return;
}

// If embeds are absent from the update payload (partial update unrelated to embeds), do nothing.
if (message.embeds === undefined) {
return;
}

// If the embed is still present, it wasn't an embed having been deleted. Do not do anything.
if (message.embeds?.length === 1) {
if (message.embeds.length === 1) {
return;
}

Expand Down
Loading