From 925398db650de3680cf566ddf9bb976f0c3b735e Mon Sep 17 00:00:00 2001 From: moonleay Date: Wed, 6 Sep 2023 22:03:50 +0200 Subject: [PATCH] fix: fixed weekstamp Signed-off-by: moonleay --- src/main/kotlin/net/moonleay/lilJudd/features/TimeManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/net/moonleay/lilJudd/features/TimeManager.kt b/src/main/kotlin/net/moonleay/lilJudd/features/TimeManager.kt index 0ac7b1b..9acbc33 100644 --- a/src/main/kotlin/net/moonleay/lilJudd/features/TimeManager.kt +++ b/src/main/kotlin/net/moonleay/lilJudd/features/TimeManager.kt @@ -94,6 +94,7 @@ object TimeManager : IFeature { if (Bot.bot.kordRef.getChannel(ch) == null) continue // TODO: Check if the channel is valid in another shard val c = Bot.bot.kordRef.getChannelOf(ch)!! + msgStr = "" if (roleMap != null && roleMap.keys.contains(ch) && roleMap[ch] != null) { c.createMessage { this.content = @@ -152,7 +153,7 @@ object TimeManager : IFeature { TimePlanningMessages.insert { it[TimePlanningMessages.serverid] = c.data.guildId.value.toString() it[TimePlanningMessages.channelid] = c.id.value.toString() - it[TimePlanningMessages.weekstamp] = TimeUtil.getWeekStamp().toOffsetDateTime().toString() + it[TimePlanningMessages.weekstamp] = (TimeUtil.getWeekStamp().toEpochSecond() * 1000).toString() it[TimePlanningMessages.messageids] = msgStr } get TimePlanningMessages.id }