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
|
val formattedTime: String
|
||||||
get() = "${separator.left}${color format TimeUtils.getTime(timeFormat, timeUnit)}${separator.right} "
|
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")
|
@Suppress("unused")
|
||||||
private enum class Separator(override val displayName: String, val left: String, val right: String) : DisplayEnum {
|
private enum class Separator(override val displayName: String, val left: String, val right: String) : DisplayEnum {
|
||||||
ARROWS("< >", "<", ">"),
|
ARROWS("< >", "<", ">"),
|
||||||
|
|
|
@ -80,7 +80,6 @@ internal object DiscordNotifs : Module(
|
||||||
|| direct.value && MessageDetection.Direct.ANY detect message
|
|| direct.value && MessageDetection.Direct.ANY detect message
|
||||||
|| restart.value && MessageDetection.Server.RESTART detect message
|
|| restart.value && MessageDetection.Server.RESTART detect message
|
||||||
|| queue.value && MessageDetection.Server.QUEUE detect message
|
|| queue.value && MessageDetection.Server.QUEUE detect message
|
||||||
|| importantPings.value && MessageDetection.Server.QUEUE detect message
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getMessageType(message: String, server: String): String {
|
private fun getMessageType(message: String, server: String): String {
|
||||||
|
@ -109,7 +108,7 @@ internal object DiscordNotifs : Module(
|
||||||
|
|
||||||
private fun getTime() =
|
private fun getTime() =
|
||||||
if (!time.value) ""
|
if (!time.value) ""
|
||||||
else ChatTimestamp.formattedTime
|
else ChatTimestamp.time
|
||||||
|
|
||||||
private fun sendMessage(content: String, avatarUrl: String) {
|
private fun sendMessage(content: String, avatarUrl: String) {
|
||||||
val tm = TemmieWebhook(url.value)
|
val tm = TemmieWebhook(url.value)
|
||||||
|
|
Loading…
Reference in New Issue