forked from DiscordBots/lilJudd
chore: improved logging messages of features
Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
c65e4031d9
commit
404e043da1
3 changed files with 7 additions and 7 deletions
|
@ -70,7 +70,7 @@ object AvailabilityManager : IFeature {
|
||||||
}
|
}
|
||||||
this.updateInChannel(snf, data, roleData)
|
this.updateInChannel(snf, data, roleData)
|
||||||
}
|
}
|
||||||
Logger.out("Done! Until tomorrow! <3 ")
|
Logger.out("Finished updating roles")
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun updateInChannel(snf: Snowflake) {
|
suspend fun updateInChannel(snf: Snowflake) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import net.moonleay.liljudd.util.Logger
|
||||||
|
|
||||||
object MatchManager {
|
object MatchManager {
|
||||||
suspend fun update() {
|
suspend fun update() {
|
||||||
Logger.out("Updating match roles...")
|
Logger.out("Updating matches")
|
||||||
val dataList = MatchPlanningDataRepository.getAll()
|
val dataList = MatchPlanningDataRepository.getAll()
|
||||||
|
|
||||||
for (data in dataList) {
|
for (data in dataList) {
|
||||||
|
@ -41,7 +41,7 @@ object MatchManager {
|
||||||
}
|
}
|
||||||
this.registerJob(data)
|
this.registerJob(data)
|
||||||
}
|
}
|
||||||
Logger.out("Done. Until next time! <3 ")
|
Logger.out("Finished updating matches")
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun registerJob(data: MatchPlanningDataData) {
|
private fun registerJob(data: MatchPlanningDataData) {
|
||||||
|
|
|
@ -60,7 +60,7 @@ object TimeManager : IFeature {
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun runThread() {
|
private suspend fun runThread() {
|
||||||
Logger.out("Starting to notify...")
|
Logger.out("Starting to send out weekly planning messages")
|
||||||
|
|
||||||
// ChannelID -> Data
|
// ChannelID -> Data
|
||||||
val targetedChannels = TimePlanningChannelsRepository.getAll().associateBy { it.channelID }
|
val targetedChannels = TimePlanningChannelsRepository.getAll().associateBy { it.channelID }
|
||||||
|
@ -72,7 +72,7 @@ object TimeManager : IFeature {
|
||||||
for (ch2 in targetedChannels.keys) {
|
for (ch2 in targetedChannels.keys) {
|
||||||
val ch = Snowflake(ch2)
|
val ch = Snowflake(ch2)
|
||||||
if (Bot.bot.kordRef.getChannel(ch) == null)
|
if (Bot.bot.kordRef.getChannel(ch) == null)
|
||||||
continue // TODO: Check if the channel is valid in another shard
|
continue
|
||||||
val c = Bot.bot.kordRef.getChannelOf<MessageChannel>(ch)!!
|
val c = Bot.bot.kordRef.getChannelOf<MessageChannel>(ch)!!
|
||||||
msgStr = ""
|
msgStr = ""
|
||||||
if (targetedRoles != null && targetedRoles.keys.contains(ch2) && targetedRoles[ch2] != null) {
|
if (targetedRoles != null && targetedRoles.keys.contains(ch2) && targetedRoles[ch2] != null) {
|
||||||
|
@ -133,7 +133,7 @@ object TimeManager : IFeature {
|
||||||
}
|
}
|
||||||
msgStr += "${it}:${msg.id.value};"
|
msgStr += "${it}:${msg.id.value};"
|
||||||
then = then.plusDays(1).withHour(4).withMinute(0).withSecond(0)
|
then = then.plusDays(1).withHour(4).withMinute(0).withSecond(0)
|
||||||
Logger.out("Finished sending day $it")
|
Logger.out("Finished sending day $it in $ch")
|
||||||
|
|
||||||
delay(1000)
|
delay(1000)
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ object TimeManager : IFeature {
|
||||||
): EmbedBuilder {
|
): EmbedBuilder {
|
||||||
// Check if entry exists in db
|
// Check if entry exists in db
|
||||||
if (TimePlanningChannelsRepository.exists(cID, gID)) {
|
if (TimePlanningChannelsRepository.exists(cID, gID)) {
|
||||||
// delete all entrys for this channel
|
// delete all entries for this channel
|
||||||
TimePlanningChannelsRepository.deleteFromChannelInServer(cID, gID)
|
TimePlanningChannelsRepository.deleteFromChannelInServer(cID, gID)
|
||||||
return MessageUtil.getEmbed(
|
return MessageUtil.getEmbed(
|
||||||
EmbedColor.SUCCESS,
|
EmbedColor.SUCCESS,
|
||||||
|
|
Loading…
Reference in a new issue