diff --git a/common/src/main/java/com/discordsrv/common/config/main/channels/DiscordToMinecraftChatConfig.java b/common/src/main/java/com/discordsrv/common/config/main/channels/DiscordToMinecraftChatConfig.java index fae209a7..9c2489a3 100644 --- a/common/src/main/java/com/discordsrv/common/config/main/channels/DiscordToMinecraftChatConfig.java +++ b/common/src/main/java/com/discordsrv/common/config/main/channels/DiscordToMinecraftChatConfig.java @@ -39,7 +39,7 @@ public class DiscordToMinecraftChatConfig { @Comment("The Discord to Minecraft message format for webhook messages (if enabled)") @Untranslated(Untranslated.Type.VALUE) - public String webhookFormat = "[ᛩF2Discord&r] [hover:show_text:Webhook message]%user_name%&r » %message%%message_attachments_ %"; + public String webhookFormat = "[ᛩF2Discord&r] [hover:show_text:Webhook message]%user_name%&r » %message%%message_attachments:' '%"; @Comment("Attachment format") @Untranslated(Untranslated.Type.VALUE) diff --git a/common/src/main/java/com/discordsrv/common/discord/api/entity/message/ReceivedDiscordMessageImpl.java b/common/src/main/java/com/discordsrv/common/discord/api/entity/message/ReceivedDiscordMessageImpl.java index 176b33dd..2023ac6c 100644 --- a/common/src/main/java/com/discordsrv/common/discord/api/entity/message/ReceivedDiscordMessageImpl.java +++ b/common/src/main/java/com/discordsrv/common/discord/api/entity/message/ReceivedDiscordMessageImpl.java @@ -324,11 +324,14 @@ public class ReceivedDiscordMessageImpl implements ReceivedDiscordMessage { @Placeholder("message_attachments") public Component _attachments(BaseChannelConfig config, @PlaceholderRemainder String suffix) { - if (suffix.startsWith("_")) { + if (suffix.startsWith(":")) { suffix = suffix.substring(1); } else if (!suffix.isEmpty()) { return null; } + if (suffix.startsWith("'") && suffix.endsWith("'")) { + suffix = suffix.substring(1, suffix.length() - 1); + } String attachmentFormat = config.discordToMinecraft.attachmentFormat; List components = new ArrayList<>();