fix: fixed weekstamp

Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
moonleay 2023-09-06 22:03:50 +02:00
parent a3d3005ff0
commit 6ab6aa1279
Signed by: moonleay
GPG key ID: 82667543CCD715FB

View file

@ -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<MessageChannel>(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
}