Skip to content

Commit

Permalink
feat: seperate offer and request colors
Browse files Browse the repository at this point in the history
  • Loading branch information
SantioMC committed Dec 18, 2024
1 parent cd47a67 commit ebaa45d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ class MarketplaceCommand : SlashCommand {
"Listing made by ${event.user.name} (${event.user.id})",
event.user.avatarUrl
)

it.setColor(getEmbedColor(type))
}

channel.sendMessage("Listing posted by ${event.user.asMention}")
Expand All @@ -175,4 +177,12 @@ class MarketplaceCommand : SlashCommand {
CooldownManager.set(event.user.id, Cooldown.getMarketplaceType(type), settings.marketplaceCooldown.seconds)
}

private fun getEmbedColor(type: String): Int {
return when (type) {
"offer" -> 0x70b560
"request" -> 0xA160B5
else -> error("Invalid type provided")
}
}

}

0 comments on commit ebaa45d

Please sign in to comment.