From aae46cffd4194bc064687b3d70da82d2e13f5a74 Mon Sep 17 00:00:00 2001 From: MrPowerGamerBR Date: Fri, 3 Jan 2025 13:02:11 -0300 Subject: [PATCH] Fix custom commands' & other things guild placeholders --- .../loritta/morenitta/utils/MessageUtils.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/loritta-bot-discord/src/main/kotlin/net/perfectdreams/loritta/morenitta/utils/MessageUtils.kt b/loritta-bot-discord/src/main/kotlin/net/perfectdreams/loritta/morenitta/utils/MessageUtils.kt index 31e9d29d8c..14219dc6f7 100644 --- a/loritta-bot-discord/src/main/kotlin/net/perfectdreams/loritta/morenitta/utils/MessageUtils.kt +++ b/loritta-bot-discord/src/main/kotlin/net/perfectdreams/loritta/morenitta/utils/MessageUtils.kt @@ -332,7 +332,14 @@ object MessageUtils { val guildSize = source.memberCount.toString() val mentionOwner = source.owner?.asMention ?: "???" val owner = source.owner?.effectiveName ?: "???" - tokens["guild"] = source.name + + + tokens[Placeholders.GUILD_NAME_SHORT.name] = source.name + tokens[Placeholders.GUILD_NAME.name] = source.name + tokens[Placeholders.GUILD_SIZE.name] = guildSize + tokens[Placeholders.GUILD_ICON_URL.name] = source.iconUrl?.replace("jpg", "png") + + // Deprecated stuff tokens["guildsize"] = guildSize tokens["guild-size"] = guildSize tokens["@owner"] = mentionOwner