emergency fix: discord message with attachment having no space when it should

This commit is contained in:
ChomeNS
2025-01-03 18:40:23 +07:00
parent 693cfe0f42
commit da998c050a
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +1 @@
1421
1422

View File

@@ -224,7 +224,7 @@ public class DiscordPlugin {
Component attachmentsComponent = Component.empty();
if (!message.getAttachments().isEmpty()) {
if (message.getContentDisplay().isEmpty()) attachmentsComponent = attachmentsComponent.append(Component.space());
if (!message.getContentDisplay().isEmpty()) attachmentsComponent = attachmentsComponent.append(Component.space());
for (Message.Attachment attachment : message.getAttachments()) {
attachmentsComponent = attachmentsComponent
@@ -240,7 +240,7 @@ public class DiscordPlugin {
Component embedsComponent = Component.empty();
if (!message.getEmbeds().isEmpty()) {
if (message.getAttachments().isEmpty()) embedsComponent = embedsComponent.append(Component.space());
if (message.getAttachments().isEmpty() || !message.getContentDisplay().isEmpty()) embedsComponent = embedsComponent.append(Component.space());
for (MessageEmbed embed : message.getEmbeds()) {
final Component hoverEvent = Component.translatable(