mirror of https://github.com/kami-blue/client
[fix] DiscordNotifs color and detection bug
Signed-off-by: Dominika <sokolov.dominika@gmail.com>
This commit is contained in:
parent
4c70d675d0
commit
36c15751ff
|
@ -31,6 +31,9 @@ internal object ChatTimestamp : Module(
|
|||
val formattedTime: String
|
||||
get() = "${separator.left}${color format TimeUtils.getTime(timeFormat, timeUnit)}${separator.right} "
|
||||
|
||||
val time: String
|
||||
get() = "${separator.left}${TimeUtils.getTime(timeFormat, timeUnit)}${separator.right}"
|
||||
|
||||
@Suppress("unused")
|
||||
private enum class Separator(override val displayName: String, val left: String, val right: String) : DisplayEnum {
|
||||
ARROWS("< >", "<", ">"),
|
||||
|
|
|
@ -80,7 +80,6 @@ internal object DiscordNotifs : Module(
|
|||
|| direct.value && MessageDetection.Direct.ANY detect message
|
||||
|| restart.value && MessageDetection.Server.RESTART detect message
|
||||
|| queue.value && MessageDetection.Server.QUEUE detect message
|
||||
|| importantPings.value && MessageDetection.Server.QUEUE detect message
|
||||
}
|
||||
|
||||
private fun getMessageType(message: String, server: String): String {
|
||||
|
@ -109,7 +108,7 @@ internal object DiscordNotifs : Module(
|
|||
|
||||
private fun getTime() =
|
||||
if (!time.value) ""
|
||||
else ChatTimestamp.formattedTime
|
||||
else ChatTimestamp.time
|
||||
|
||||
private fun sendMessage(content: String, avatarUrl: String) {
|
||||
val tm = TemmieWebhook(url.value)
|
||||
|
|
Loading…
Reference in New Issue