Compare commits

..

14 commits

Author SHA1 Message Date
4b46d34f45
chore: improved logging further
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 2m54s
Signed-off-by: moonleay <contact@moonleay.net>
2024-02-13 20:07:50 +01:00
0cd3e4d6a8
fix: fixed issue with cloned embeds not implementing the footer correctly
Signed-off-by: moonleay <contact@moonleay.net>
2024-02-13 20:04:13 +01:00
a7e656bcbe
refactor: renamed ownerID to creatorID
Signed-off-by: moonleay <contact@moonleay.net>
2024-02-13 19:44:09 +01:00
404e043da1
chore: improved logging messages of features
Signed-off-by: moonleay <contact@moonleay.net>
2024-02-13 19:43:09 +01:00
c65e4031d9
chore: update copyright
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 2m55s
Signed-off-by: moonleay <contact@moonleay.net>
2024-02-13 19:24:48 +01:00
ab7016cdb3
feat: added little note at boot
Some checks failed
Build Gradle project / build-gradle-project (push) Failing after 15m48s
fix!: fixed compilation issues on Winblows (This resulted in a new base package.)

Signed-off-by: moonleay <contact@moonleay.net>
2024-02-13 18:47:24 +01:00
d928258028
Merge remote-tracking branch 'origin/master'
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 3m55s
2024-02-13 08:57:32 +01:00
8e1551cd6c
feat: added NewsManager, made bot dm news, when there are any at boot 2024-02-13 08:57:18 +01:00
4dceef6a1f feat!: (temp) dropped the Splatoon3ink api support
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 3m57s
2024-02-01 23:15:04 +01:00
906c41be88
feat: make the bot save a stacktrace, if an error occurs during a command or interaction
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 2m55s
Signed-off-by: moonleay <contact@moonleay.net>
2024-01-31 13:47:14 +01:00
0f399cb58c
chore: bump version
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 2m43s
Signed-off-by: moonleay <contact@moonleay.net>
2024-01-29 16:41:09 +01:00
95321b4895
fix: fixed schedules not being deserialized correctly
Some checks failed
Build Gradle project / build-gradle-project (push) Has been cancelled
Signed-off-by: moonleay <contact@moonleay.net>
2024-01-29 16:40:38 +01:00
d0ae43e420
chore: updated README.md
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 2m53s
Signed-off-by: moonleay <contact@moonleay.net>
2024-01-21 02:03:46 +01:00
46ee799760
fix: fixed ci pipeline 2024-01-21 02:03:37 +01:00
104 changed files with 648 additions and 319 deletions

View file

@ -5,12 +5,10 @@ on:
jobs: jobs:
build-gradle-project: build-gradle-project:
runs-on: ubuntu-latest runs-on: docker
steps: steps:
- name: apt update - name: apt update
run: apt update run: apt update
- name: apt upgrade
run: apt upgrade -y
- name: install prerequisits - name: install prerequisits
run: apt install openjdk-17-jdk ca-certificates-java ssl-cert openssl ca-certificates -y run: apt install openjdk-17-jdk ca-certificates-java ssl-cert openssl ca-certificates -y
- name: Checkout project sources - name: Checkout project sources

View file

@ -4,15 +4,13 @@
A Discord Bot for Splatoon Teams. A Discord Bot for Splatoon Teams.
More information can be found on the [Homepage](https://liljudd.ink).
## Contributors ## Contributors
[![Developer](https://img.shields.io/badge/moonleay-Developer-red)](https://gitlab.com/moonleay) [![Developer](https://img.shields.io/badge/moonleay-Developer-red)](https://gitlab.com/moonleay)
## Known issues ## Known issues
##### If you encounter any bugs, message me on Discord (@moonleay) or send me a mail (issues@moonleay.net). You can also open a ticket [on the support server](https://discord.gg/HTZRktfH4A). ##### If you encounter any bugs, message me on Discord (@moonleay) or email me (issues@moonleay.net). You can also open a ticket [on the support server](https://discord.gg/HTZRktfH4A).
## Commands & Features ## Commands & Features
@ -22,12 +20,13 @@ More information can be found on the [Homepage](https://liljudd.ink).
- match -- Create a new match - match -- Create a new match
- updateroles -- Update the roles of all users - updateroles -- Update the roles of all users
- sendplanner -- Send the planner message - sendplanner -- Send the planner message
- rotation -- See the current rotation
- Features - Features
- Time Planner -- Make the bot send messages and reactions into a selected channel in order to make planning easier - Time Planner -- Make the bot send messages and reactions into a selected channel in order to make planning easier
- Availability Manager -- Make the bot assign users roles every day, so it is possible to notify available people - Availability Manager -- Make the bot assign users roles every day, so it is possible to notify available people
- Match Planner -- Make a match, for which players can sign up and the bot will assign teams and roles to them - Match Planner -- Make a match, for which players can sign up and the bot will assign teams and roles to them
## (Maybe) upcoming features ## The todo list
##### See the [todo list](https://todo.moonleay.net/share/OmisuzgPDdsrCAXKjGrTfYzWwqNDNclOMGJWeMsi/auth?view=kanban) for more information. ##### See the [todo list](https://todo.moonleay.net/share/OmisuzgPDdsrCAXKjGrTfYzWwqNDNclOMGJWeMsi/auth?view=kanban) for more information.

View file

@ -29,11 +29,11 @@ plugins {
} }
//lilJudd version 2 //lilJudd version 2
val ownerID = 372703841151614976L val creatorID = 372703841151614976L
group = "net.moonleay.liljudd" group = "net.moonleay.liljudd"
version = System.getenv("CI_COMMIT_TAG")?.let { "$it-${System.getenv("CI_COMMIT_SHORT_SHA")}-prod" } version = System.getenv("CI_COMMIT_TAG")?.let { "$it-${System.getenv("CI_COMMIT_SHORT_SHA")}-prod" }
?: System.getenv("CI_COMMIT_SHORT_SHA")?.let { "$it-dev" } ?: System.getenv("CI_COMMIT_SHORT_SHA")?.let { "$it-dev" }
?: "2.7.0" ?: "2.7.2"
val kordver = "1.7.1-SNAPSHOT" val kordver = "1.7.1-SNAPSHOT"
val coroutinesver = "1.7.3" val coroutinesver = "1.7.3"
@ -120,7 +120,7 @@ val templateSrc = project.rootDir.resolve("src/main/templates")
val templateDest = project.projectDir.resolve("build/generated/templates") val templateDest = project.projectDir.resolve("build/generated/templates")
val templateProps = mapOf( val templateProps = mapOf(
"version" to project.version as String, "version" to project.version as String,
"ownerID" to ownerID, "creatorID" to creatorID,
"kordversion" to kordver, "kordversion" to kordver,
"coroutinesversion" to coroutinesver, "coroutinesversion" to coroutinesver,
"ktorversion" to ktorver, "ktorversion" to ktorver,

View file

@ -16,9 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd package net.moonleay.liljudd
import com.kotlindiscord.kord.extensions.ExtensibleBot import com.kotlindiscord.kord.extensions.ExtensibleBot
import com.kotlindiscord.kord.extensions.utils.dm
import dev.kord.common.entity.PresenceStatus import dev.kord.common.entity.PresenceStatus
import dev.kord.core.behavior.interaction.response.respond import dev.kord.core.behavior.interaction.response.respond
import dev.kord.core.event.gateway.ReadyEvent import dev.kord.core.event.gateway.ReadyEvent
@ -26,27 +27,28 @@ import dev.kord.core.event.interaction.ButtonInteractionCreateEvent
import dev.kord.core.on import dev.kord.core.on
import dev.kord.gateway.Intent import dev.kord.gateway.Intent
import dev.kord.gateway.PrivilegedIntent import dev.kord.gateway.PrivilegedIntent
import dev.kord.gateway.builder.Shards
import dev.kord.rest.builder.message.embed
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import net.moonleay.lilJudd.buttons.component.EditButtonManager
import net.moonleay.lilJudd.data.CredentialManager
import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3Api
import net.moonleay.lilJudd.data.database.DB
import net.moonleay.lilJudd.extensions.*
import net.moonleay.lilJudd.features.AvailabilityManager
import net.moonleay.lilJudd.features.MatchManager
import net.moonleay.lilJudd.features.TimeManager
import net.moonleay.lilJudd.jobs.Splatoon3ApiScheduleUpdateScheduler
import net.moonleay.lilJudd.jobs.StatusUpdater
import net.moonleay.lilJudd.jobs.component.JobManager
import net.moonleay.lilJudd.util.EmbedColor
import net.moonleay.lilJudd.util.Logger
import net.moonleay.lilJudd.util.MessageUtil
import net.moonleay.liljudd.build.BuildConstants import net.moonleay.liljudd.build.BuildConstants
import net.moonleay.liljudd.buttons.component.EditButtonManager
import net.moonleay.liljudd.data.CredentialManager
import net.moonleay.liljudd.data.NewsManager
import net.moonleay.liljudd.data.StacktraceSaver
import net.moonleay.liljudd.data.database.DB
import net.moonleay.liljudd.extensions.*
import net.moonleay.liljudd.features.AvailabilityManager
import net.moonleay.liljudd.features.MatchManager
import net.moonleay.liljudd.features.TimeManager
import net.moonleay.liljudd.util.EmbedColor
import net.moonleay.liljudd.util.Logger
import net.moonleay.liljudd.util.MessageUtil
import kotlin.system.exitProcess import kotlin.system.exitProcess
object Bot { object Bot {
//The kord object gets set at app launch //The kord object gets set at app launch
lateinit var bot: ExtensibleBot lateinit var bot: ExtensibleBot
@ -72,6 +74,7 @@ object Bot {
exitProcess(3) exitProcess(3)
} }
// Check if there are api credentials
if (CredentialManager.apiDomain == "empty" || CredentialManager.apiToken == "empty") { if (CredentialManager.apiDomain == "empty" || CredentialManager.apiToken == "empty") {
Logger.out("The config does not contain the whole API credentials.") Logger.out("The config does not contain the whole API credentials.")
exitProcess(3) exitProcess(3)
@ -125,11 +128,26 @@ object Bot {
+Intent.GuildMembers +Intent.GuildMembers
} }
// Will add Sharding someday, I promise errorResponse { _, type ->
/* val stamp = System.currentTimeMillis()
sharding { recommended -> this.embed {
this.title = "Oops. Something went wrong."
this.description = "The bot encountered an error during execution.\n" +
"Please report this to <@${BuildConstants.creatorID}>.\n" +
"The errorid is \"$stamp.stk\""
this.field {
this.name = "Error message:"
this.value = type.error.message.toString()
this.inline = false
}
}
StacktraceSaver.saveStacktrace(type.error, stamp)
}
this.sharding { recommended ->
Shards(recommended) Shards(recommended)
} */ }
} }
// Register button presses // Register button presses
@ -167,13 +185,39 @@ object Bot {
bot.kordRef.on<ReadyEvent> { bot.kordRef.on<ReadyEvent> {
AvailabilityManager.runThread() // Update Availabilities AvailabilityManager.runThread() // Update Availabilities
MatchManager.update() // Update Matches MatchManager.update() // Update Matches
// Load news
NewsManager.load()
if(NewsManager.shouldPost == "yes"){
val contactedOwners = mutableListOf<ULong>()
bot.kordRef.guilds.collect {
val owner = it.owner.asUser()
if (!contactedOwners.contains(owner.id.value)) {
Logger.out("Sent News to ${owner.username} from ${it.name}")
owner.dm {
this.embed {
this.title = NewsManager.title
this.description = NewsManager.news
this.footer {
this.icon = bot.kordRef.getSelf().avatar?.cdnUrl?.toUrl()
this.text = MessageUtil.getFooter()
}
}
}
contactedOwners.add(owner.id.value)
}
}
NewsManager.shouldPost = "no"
NewsManager.update()
}
// Make the bot update the status every 6 seconds // Make the bot update the status every 6 seconds
JobManager.addJob(StatusUpdater) // JobManager.addJob(StatusUpdater)
} }
// Update the Splatoon 3 api data and make sure it stays up-to-date // Update the Splatoon 3 api data and make sure it stays up-to-date
Splatoon3Api.updateSchedule() // Splatoon3Api.updateSchedule()
JobManager.addJob(Splatoon3ApiScheduleUpdateScheduler) // JobManager.addJob(Splatoon3ApiScheduleUpdateScheduler)
/* /*
Other caches will be added when implemented Other caches will be added when implemented
its not used yet in order to reduce load on the api, its not used yet in order to reduce load on the api,

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -15,9 +15,10 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd package net.moonleay.liljudd
import net.moonleay.liljudd.build.BuildConstants import net.moonleay.liljudd.build.BuildConstants
import net.moonleay.liljudd.util.Logger
suspend fun main() { suspend fun main() {
@ -27,9 +28,11 @@ suspend fun main() {
"| |_| |__| |_ _ _| |_| |\n" + "| |_| |__| |_ _ _| |_| |\n" +
"| | | | | | | | . | . |\n" + "| | | | | | | | . | . |\n" +
"|_|_|_|_____|___|___|___|\n" + "|_|_|_|_____|___|___|___|\n" +
" " "v.${BuildConstants.version}\n"
) )
println("v.${BuildConstants.version}")
Logger.out("li'l Judd made by moonleay (https://moonleay.net). Web UI made by aronmal (https://mal-noh.de).")
Logger.out("For more information check out https://liljudd.ink and https://git.moonleay.net/DiscordBots/lilJudd")
Bot.start() Bot.start()
} }

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,14 +16,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.buttons.component package net.moonleay.liljudd.buttons.component
import net.moonleay.lilJudd.buttons.matchplanner.AcceptEditButton import net.moonleay.liljudd.buttons.matchplanner.AcceptEditButton
import net.moonleay.lilJudd.buttons.matchplanner.CancelEditButton import net.moonleay.liljudd.buttons.matchplanner.CancelEditButton
import net.moonleay.lilJudd.buttons.matchplanner.DeclineEditButton import net.moonleay.liljudd.buttons.matchplanner.DeclineEditButton
import net.moonleay.lilJudd.buttons.timeplanner.IsAvailableEditButton import net.moonleay.liljudd.buttons.timeplanner.IsAvailableEditButton
import net.moonleay.lilJudd.buttons.timeplanner.MaybeAvailableEditButton import net.moonleay.liljudd.buttons.timeplanner.MaybeAvailableEditButton
import net.moonleay.lilJudd.buttons.timeplanner.NotAvailableEditButton import net.moonleay.liljudd.buttons.timeplanner.NotAvailableEditButton
object EditButtonManager { object EditButtonManager {
val buttons = listOf( val buttons = listOf(

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.buttons.component package net.moonleay.liljudd.buttons.component
import dev.kord.core.behavior.interaction.response.PublicMessageInteractionResponseBehavior import dev.kord.core.behavior.interaction.response.PublicMessageInteractionResponseBehavior
import dev.kord.core.entity.Guild import dev.kord.core.entity.Guild

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.buttons.matchplanner package net.moonleay.liljudd.buttons.matchplanner
import dev.kord.common.entity.Snowflake import dev.kord.common.entity.Snowflake
import dev.kord.core.behavior.edit import dev.kord.core.behavior.edit
@ -27,12 +27,12 @@ import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.EmbedBuilder import dev.kord.rest.builder.message.EmbedBuilder
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.buttons.component.IEditButton import net.moonleay.liljudd.buttons.component.IEditButton
import net.moonleay.lilJudd.data.database.repository.MatchPlanningDataRepository import net.moonleay.liljudd.data.database.repository.MatchPlanningDataRepository
import net.moonleay.lilJudd.util.EmbedUtil import net.moonleay.liljudd.util.EmbedUtil
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
import net.moonleay.lilJudd.util.MessageUtil import net.moonleay.liljudd.util.MessageUtil
class AcceptEditButton : IEditButton { class AcceptEditButton : IEditButton {
override val id: String = "public.edit.btn.matchmanagement.accept" override val id: String = "public.edit.btn.matchmanagement.accept"

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.buttons.matchplanner package net.moonleay.liljudd.buttons.matchplanner
import dev.kord.common.entity.Snowflake import dev.kord.common.entity.Snowflake
import dev.kord.core.behavior.edit import dev.kord.core.behavior.edit
@ -27,11 +27,11 @@ import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.EmbedBuilder import dev.kord.rest.builder.message.EmbedBuilder
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.buttons.component.IEditButton import net.moonleay.liljudd.buttons.component.IEditButton
import net.moonleay.lilJudd.data.database.repository.MatchPlanningDataRepository import net.moonleay.liljudd.data.database.repository.MatchPlanningDataRepository
import net.moonleay.lilJudd.util.EmbedUtil import net.moonleay.liljudd.util.EmbedUtil
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
class CancelEditButton : IEditButton { class CancelEditButton : IEditButton {
override val id: String = "public.edit.btn.matchmanagement.cancel" override val id: String = "public.edit.btn.matchmanagement.cancel"

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.buttons.matchplanner package net.moonleay.liljudd.buttons.matchplanner
import dev.kord.common.entity.Snowflake import dev.kord.common.entity.Snowflake
import dev.kord.core.behavior.edit import dev.kord.core.behavior.edit
@ -27,12 +27,12 @@ import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.EmbedBuilder import dev.kord.rest.builder.message.EmbedBuilder
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.buttons.component.IEditButton import net.moonleay.liljudd.buttons.component.IEditButton
import net.moonleay.lilJudd.data.database.repository.MatchPlanningDataRepository import net.moonleay.liljudd.data.database.repository.MatchPlanningDataRepository
import net.moonleay.lilJudd.util.EmbedUtil import net.moonleay.liljudd.util.EmbedUtil
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
import net.moonleay.lilJudd.util.MessageUtil import net.moonleay.liljudd.util.MessageUtil
class DeclineEditButton : IEditButton { class DeclineEditButton : IEditButton {
override val id: String = "public.edit.btn.matchmanagement.decline" override val id: String = "public.edit.btn.matchmanagement.decline"

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.buttons.timeplanner package net.moonleay.liljudd.buttons.timeplanner
import dev.kord.core.behavior.edit import dev.kord.core.behavior.edit
import dev.kord.core.behavior.interaction.response.PublicMessageInteractionResponseBehavior import dev.kord.core.behavior.interaction.response.PublicMessageInteractionResponseBehavior
@ -25,10 +25,10 @@ import dev.kord.core.entity.User
import dev.kord.core.entity.channel.MessageChannel import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.buttons.component.IEditButton import net.moonleay.liljudd.buttons.component.IEditButton
import net.moonleay.lilJudd.features.AvailabilityManager import net.moonleay.liljudd.features.AvailabilityManager
import net.moonleay.lilJudd.util.EmbedUtil import net.moonleay.liljudd.util.EmbedUtil
class IsAvailableEditButton : IEditButton { class IsAvailableEditButton : IEditButton {
override val id: String = "public.edit.btn.timemanagement.available" override val id: String = "public.edit.btn.timemanagement.available"

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.buttons.timeplanner package net.moonleay.liljudd.buttons.timeplanner
import dev.kord.core.behavior.edit import dev.kord.core.behavior.edit
import dev.kord.core.behavior.interaction.response.PublicMessageInteractionResponseBehavior import dev.kord.core.behavior.interaction.response.PublicMessageInteractionResponseBehavior
@ -25,10 +25,10 @@ import dev.kord.core.entity.User
import dev.kord.core.entity.channel.MessageChannel import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.buttons.component.IEditButton import net.moonleay.liljudd.buttons.component.IEditButton
import net.moonleay.lilJudd.features.AvailabilityManager import net.moonleay.liljudd.features.AvailabilityManager
import net.moonleay.lilJudd.util.EmbedUtil import net.moonleay.liljudd.util.EmbedUtil
class MaybeAvailableEditButton : IEditButton { class MaybeAvailableEditButton : IEditButton {
override val id: String = "public.edit.btn.timemanagement.maybeavailable" override val id: String = "public.edit.btn.timemanagement.maybeavailable"

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.buttons.timeplanner package net.moonleay.liljudd.buttons.timeplanner
import dev.kord.core.behavior.edit import dev.kord.core.behavior.edit
import dev.kord.core.behavior.interaction.response.PublicMessageInteractionResponseBehavior import dev.kord.core.behavior.interaction.response.PublicMessageInteractionResponseBehavior
@ -25,10 +25,10 @@ import dev.kord.core.entity.User
import dev.kord.core.entity.channel.MessageChannel import dev.kord.core.entity.channel.MessageChannel
import dev.kord.core.entity.interaction.ButtonInteraction import dev.kord.core.entity.interaction.ButtonInteraction
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.buttons.component.IEditButton import net.moonleay.liljudd.buttons.component.IEditButton
import net.moonleay.lilJudd.features.AvailabilityManager import net.moonleay.liljudd.features.AvailabilityManager
import net.moonleay.lilJudd.util.EmbedUtil import net.moonleay.liljudd.util.EmbedUtil
class NotAvailableEditButton : IEditButton { class NotAvailableEditButton : IEditButton {
override val id: String = "public.edit.btn.timemanagement.notavailable" override val id: String = "public.edit.btn.timemanagement.notavailable"

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data package net.moonleay.liljudd.data
import java.io.* import java.io.*
import java.util.* import java.util.*

View file

@ -0,0 +1,120 @@
/*
* lilJudd
* Copyright (C) 2024 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.moonleay.liljudd.data
import java.io.*
import java.util.*
object NewsManager {
private const val foldername = "data"
private const val filename = "news.nick"
lateinit var shouldPost: String
lateinit var title: String
lateinit var news: String
///Load the needed credentials, generate a config if there is none
fun load() {
val folder = File(foldername)
if (!folder.exists()) {
save()
return
}
val configFile = File(folder, filename)
if (!configFile.exists()) {
save()
return
}
try {
val input: InputStream = FileInputStream(foldername + File.separator + filename)
val prop = Properties()
prop.load(input)
shouldPost = prop.getProperty("shouldPost")
title = prop.getProperty("title")
news = prop.getProperty("news")
input.close()
} catch (e: IOException) {
e.printStackTrace()
}
}
fun update(){
val folder = File(foldername)
if (!folder.exists()) {
try {
folder.mkdirs()
} catch (e: IOException) {
e.printStackTrace()
}
}
val configFile = File(foldername + File.separator + filename)
if (!configFile.exists()) {
try {
configFile.createNewFile()
} catch (e: IOException) {
e.printStackTrace()
}
}
try {
val output: OutputStream = FileOutputStream(foldername + File.separator + filename)
val prop = Properties()
prop.setProperty("shouldPost", shouldPost)
prop.setProperty("title", title)
prop.setProperty("news", news)
prop.store(output, null)
output.close()
} catch (e: IOException) {
e.printStackTrace()
}
}
///generate a new sample config
private fun save() {
val folder = File(foldername)
if (!folder.exists()) {
try {
folder.mkdirs()
} catch (e: IOException) {
e.printStackTrace()
}
}
val configFile = File(foldername + File.separator + filename)
if (!configFile.exists()) {
try {
configFile.createNewFile()
} catch (e: IOException) {
e.printStackTrace()
}
}
try {
val output: OutputStream = FileOutputStream(foldername + File.separator + filename)
val prop = Properties()
prop.setProperty("shouldPost", "no")
prop.setProperty("title", "empty")
prop.setProperty("news", "empty")
prop.store(output, null)
output.close()
shouldPost = "no"
title = "empty"
news = "empty"
} catch (e: IOException) {
e.printStackTrace()
}
}
}

View file

@ -0,0 +1,37 @@
/*
* lilJudd
* Copyright (C) 2024 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.moonleay.liljudd.data
import java.io.File
object StacktraceSaver {
fun saveStacktrace(stacktrace: Throwable, timestamp: Long) {
createFolder()
val dir = File("data", "stacktraces")
File(dir, "$timestamp.stk").bufferedWriter().use { out ->
out.write(stacktrace.stackTraceToString())
}
}
private fun createFolder() {
val dir = File("data", "stacktraces")
if (!dir.exists())
dir.mkdir()
}
}

View file

@ -16,12 +16,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink package net.moonleay.liljudd.data.api.splatoon3ink
import kotlinx.serialization.json.Json import kotlinx.serialization.json.Json
import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.Schedules
import net.moonleay.lilJudd.util.NetUtil
import net.moonleay.liljudd.build.BuildConstants import net.moonleay.liljudd.build.BuildConstants
import net.moonleay.liljudd.data.api.splatoon3ink.schedules.Schedules
import net.moonleay.liljudd.util.NetUtil
object Splatoon3Api { object Splatoon3Api {

View file

@ -16,13 +16,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink package net.moonleay.liljudd.data.api.splatoon3ink
import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.BankaraNode import net.moonleay.liljudd.data.api.splatoon3ink.schedules.BankaraNode
import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.RegularNode import net.moonleay.liljudd.data.api.splatoon3ink.schedules.RegularNode
import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.SalmonRunNode import net.moonleay.liljudd.data.api.splatoon3ink.schedules.SalmonRunNode
import net.moonleay.lilJudd.data.api.splatoon3ink.schedules.XNode import net.moonleay.liljudd.data.api.splatoon3ink.schedules.XNode
import net.moonleay.lilJudd.util.TimeUtil import net.moonleay.liljudd.util.TimeUtil
object Splatoon3ApiDataGrabber { object Splatoon3ApiDataGrabber {
fun getRegularMode(timestamp: Long): RegularNode { fun getRegularMode(timestamp: Long): RegularNode {

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -0,0 +1,29 @@
/*
* lilJudd
* Copyright (C) 2024 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class BannerImage(
@SerialName("url")
val url: String,
)

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
@ -25,7 +25,7 @@ import kotlinx.serialization.Serializable
@Serializable @Serializable
data class CoopGroupingSchedule( data class CoopGroupingSchedule(
@SerialName("bannerImage") @SerialName("bannerImage")
val bannerImage: String?, // is null val bannerImage: BannerImage?, // is null
@SerialName("bigRunSchedules") @SerialName("bigRunSchedules")
val bigRunSchedules: BigRunSchedules, val bigRunSchedules: BigRunSchedules,
@SerialName("regularSchedules") @SerialName("regularSchedules")

View file

@ -0,0 +1,39 @@
/*
* lilJudd
* Copyright (C) 2024 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class CoopSetting(
@SerialName("boss")
val boss: String?, // Not really String, but idk
@SerialName("coopStage")
val coopStage: CoopStage,
@SerialName("__isCoopSetting")
val isCoopSetting: String,
@SerialName("rule")
val rule: String,
@SerialName("__typename")
val typename: String,
@SerialName("weapons")
val weapons: List<Weapon>
)

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -0,0 +1,33 @@
/*
* lilJudd
* Copyright (C) 2024 moonleay
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
data class TeamContestNode(
@SerialName("endTime")
val endTime: String,
@SerialName("setting")
val setting: CoopSetting,
@SerialName("startTime")
val startTime: String
)

View file

@ -16,15 +16,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable import kotlinx.serialization.Serializable
@Serializable @Serializable
// TODO: Please check what goes here.
data class TeamContestSchedules( data class TeamContestSchedules(
@SerialName("nodes") @SerialName("nodes")
val nodes: List<Int> // This is a placeholder. val nodes: List<TeamContestNode> // This is a placeholder.
) )

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.api.splatoon3ink.schedules package net.moonleay.liljudd.data.api.splatoon3ink.schedules
import kotlinx.serialization.SerialName import kotlinx.serialization.SerialName

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,13 +16,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database package net.moonleay.liljudd.data.database
import net.moonleay.lilJudd.data.database.tables.MatchPlanningData import net.moonleay.liljudd.data.database.tables.MatchPlanningData
import net.moonleay.lilJudd.data.database.tables.PlanningNotifierRoles import net.moonleay.liljudd.data.database.tables.PlanningNotifierRoles
import net.moonleay.lilJudd.data.database.tables.TimePlanningChannels import net.moonleay.liljudd.data.database.tables.TimePlanningChannels
import net.moonleay.lilJudd.data.database.tables.TimePlanningMessages import net.moonleay.liljudd.data.database.tables.TimePlanningMessages
import org.jetbrains.exposed.sql.Database import org.jetbrains.exposed.sql.Database
import org.jetbrains.exposed.sql.SchemaUtils import org.jetbrains.exposed.sql.SchemaUtils
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.entry package net.moonleay.liljudd.data.database.entry
data class MatchPlanningDataData( data class MatchPlanningDataData(
val id: Int, val id: Int,

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.entry package net.moonleay.liljudd.data.database.entry
data class PlanningNotifierRolesData( data class PlanningNotifierRolesData(
val id: Int, // The id of the entry val id: Int, // The id of the entry

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.entry package net.moonleay.liljudd.data.database.entry
data class TimePlanningChannelsData( data class TimePlanningChannelsData(
val id: Int, val id: Int,

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.entry package net.moonleay.liljudd.data.database.entry
data class TimePlanningMessagesData( data class TimePlanningMessagesData(
val id: Int, // The id of the entry val id: Int, // The id of the entry

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,12 +16,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.repository package net.moonleay.liljudd.data.database.repository
import net.moonleay.lilJudd.data.database.entry.MatchPlanningDataData import net.moonleay.liljudd.data.database.entry.MatchPlanningDataData
import net.moonleay.lilJudd.data.database.tables.MatchPlanningData import net.moonleay.liljudd.data.database.tables.MatchPlanningData
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.and
import org.jetbrains.exposed.sql.deleteWhere
import org.jetbrains.exposed.sql.insert
import org.jetbrains.exposed.sql.selectAll
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
object MatchPlanningDataRepository { object MatchPlanningDataRepository {

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,12 +16,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.repository package net.moonleay.liljudd.data.database.repository
import net.moonleay.lilJudd.data.database.entry.PlanningNotifierRolesData import net.moonleay.liljudd.data.database.entry.PlanningNotifierRolesData
import net.moonleay.lilJudd.data.database.tables.PlanningNotifierRoles import net.moonleay.liljudd.data.database.tables.PlanningNotifierRoles
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.and
import org.jetbrains.exposed.sql.deleteWhere
import org.jetbrains.exposed.sql.insert
import org.jetbrains.exposed.sql.selectAll
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
object PlanningNotifierRolesRepository { object PlanningNotifierRolesRepository {

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,12 +16,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.repository package net.moonleay.liljudd.data.database.repository
import net.moonleay.lilJudd.data.database.entry.TimePlanningChannelsData import net.moonleay.liljudd.data.database.entry.TimePlanningChannelsData
import net.moonleay.lilJudd.data.database.tables.TimePlanningChannels import net.moonleay.liljudd.data.database.tables.TimePlanningChannels
import org.jetbrains.exposed.sql.*
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
import org.jetbrains.exposed.sql.and
import org.jetbrains.exposed.sql.deleteWhere
import org.jetbrains.exposed.sql.insert
import org.jetbrains.exposed.sql.selectAll
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
object TimePlanningChannelsRepository { object TimePlanningChannelsRepository {

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,12 +16,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.repository package net.moonleay.liljudd.data.database.repository
import net.moonleay.lilJudd.data.database.entry.TimePlanningMessagesData import net.moonleay.liljudd.data.database.entry.TimePlanningMessagesData
import net.moonleay.lilJudd.data.database.tables.TimePlanningMessages import net.moonleay.liljudd.data.database.tables.TimePlanningMessages
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.and
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq import org.jetbrains.exposed.sql.insert
import org.jetbrains.exposed.sql.selectAll
import org.jetbrains.exposed.sql.transactions.transaction import org.jetbrains.exposed.sql.transactions.transaction
object TimePlanningMessagesRepository { object TimePlanningMessagesRepository {

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.tables package net.moonleay.liljudd.data.database.tables
import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.Table

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.tables package net.moonleay.liljudd.data.database.tables
import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.Table

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.tables package net.moonleay.liljudd.data.database.tables
import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.Table

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.data.database.tables package net.moonleay.liljudd.data.database.tables
import org.jetbrains.exposed.sql.Table import org.jetbrains.exposed.sql.Table

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions package net.moonleay.liljudd.extensions
import com.kotlindiscord.kord.extensions.commands.Arguments import com.kotlindiscord.kord.extensions.commands.Arguments
import com.kotlindiscord.kord.extensions.commands.application.slash.converters.impl.enumChoice import com.kotlindiscord.kord.extensions.commands.application.slash.converters.impl.enumChoice
@ -26,12 +26,12 @@ import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand
import com.kotlindiscord.kord.extensions.utils.hasPermission import com.kotlindiscord.kord.extensions.utils.hasPermission
import dev.kord.common.entity.Permission import dev.kord.common.entity.Permission
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.extensions.component.EnableOrDisable import net.moonleay.liljudd.extensions.component.EnableOrDisable
import net.moonleay.lilJudd.features.component.FeatureEnum import net.moonleay.liljudd.features.component.FeatureEnum
import net.moonleay.lilJudd.features.component.FeatureManager import net.moonleay.liljudd.features.component.FeatureManager
import net.moonleay.lilJudd.util.EmbedColor import net.moonleay.liljudd.util.EmbedColor
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
import net.moonleay.lilJudd.util.MessageUtil import net.moonleay.liljudd.util.MessageUtil
class FeatureManageExtension : Extension() { class FeatureManageExtension : Extension() {

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,13 +16,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions package net.moonleay.liljudd.extensions
import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.Extension
import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.util.EmbedColor
import net.moonleay.liljudd.build.BuildConstants import net.moonleay.liljudd.build.BuildConstants
import net.moonleay.liljudd.util.EmbedColor
class InfoExtension : Extension() { class InfoExtension : Extension() {
override val name = "info" override val name = "info"

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions package net.moonleay.liljudd.extensions
import com.kotlindiscord.kord.extensions.commands.Arguments import com.kotlindiscord.kord.extensions.commands.Arguments
import com.kotlindiscord.kord.extensions.commands.application.slash.converters.impl.enumChoice import com.kotlindiscord.kord.extensions.commands.application.slash.converters.impl.enumChoice
@ -26,15 +26,15 @@ import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand
import dev.kord.core.behavior.createRole import dev.kord.core.behavior.createRole
import dev.kord.rest.builder.message.actionRow import dev.kord.rest.builder.message.actionRow
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.data.database.entry.MatchPlanningDataData import net.moonleay.liljudd.data.database.entry.MatchPlanningDataData
import net.moonleay.lilJudd.data.database.repository.MatchPlanningDataRepository import net.moonleay.liljudd.data.database.repository.MatchPlanningDataRepository
import net.moonleay.lilJudd.extensions.component.MatchTypes import net.moonleay.liljudd.extensions.component.MatchTypes
import net.moonleay.lilJudd.jobs.MatchJob import net.moonleay.liljudd.jobs.MatchJob
import net.moonleay.lilJudd.jobs.component.JobManager import net.moonleay.liljudd.jobs.component.JobManager
import net.moonleay.lilJudd.util.EmbedColor import net.moonleay.liljudd.util.EmbedColor
import net.moonleay.lilJudd.util.EmbedUtil import net.moonleay.liljudd.util.EmbedUtil
import net.moonleay.lilJudd.util.MessageUtil import net.moonleay.liljudd.util.MessageUtil
import net.moonleay.lilJudd.util.TimeUtil import net.moonleay.liljudd.util.TimeUtil
class MatchExtension : Extension() { class MatchExtension : Extension() {

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions package net.moonleay.liljudd.extensions
import com.kotlindiscord.kord.extensions.commands.Arguments import com.kotlindiscord.kord.extensions.commands.Arguments
import com.kotlindiscord.kord.extensions.commands.application.slash.converters.impl.enumChoice import com.kotlindiscord.kord.extensions.commands.application.slash.converters.impl.enumChoice
@ -25,9 +25,9 @@ import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand
import dev.kord.common.Color import dev.kord.common.Color
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import kotlinx.datetime.Clock import kotlinx.datetime.Clock
import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiDataGrabber import net.moonleay.liljudd.data.api.splatoon3ink.Splatoon3ApiDataGrabber
import net.moonleay.lilJudd.extensions.component.SplatoonOnlineMode import net.moonleay.liljudd.extensions.component.SplatoonOnlineMode
import net.moonleay.lilJudd.util.TimeUtil import net.moonleay.liljudd.util.TimeUtil
class RotationExtension : Extension() { class RotationExtension : Extension() {

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions package net.moonleay.liljudd.extensions
import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.Extension
import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand
@ -26,10 +26,10 @@ import dev.kord.core.behavior.channel.createMessage
import dev.kord.rest.builder.message.actionRow import dev.kord.rest.builder.message.actionRow
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.data.database.entry.TimePlanningMessagesData import net.moonleay.liljudd.data.database.entry.TimePlanningMessagesData
import net.moonleay.lilJudd.data.database.repository.TimePlanningMessagesRepository import net.moonleay.liljudd.data.database.repository.TimePlanningMessagesRepository
import net.moonleay.lilJudd.util.* import net.moonleay.liljudd.util.*
import java.time.ZoneId import java.time.ZoneId
import java.time.ZonedDateTime import java.time.ZonedDateTime

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,17 +16,17 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions package net.moonleay.liljudd.extensions
import com.kotlindiscord.kord.extensions.extensions.Extension import com.kotlindiscord.kord.extensions.extensions.Extension
import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand import com.kotlindiscord.kord.extensions.extensions.publicSlashCommand
import com.kotlindiscord.kord.extensions.utils.hasPermission import com.kotlindiscord.kord.extensions.utils.hasPermission
import dev.kord.common.entity.Permission import dev.kord.common.entity.Permission
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import net.moonleay.lilJudd.features.AvailabilityManager import net.moonleay.liljudd.features.AvailabilityManager
import net.moonleay.lilJudd.util.EmbedColor import net.moonleay.liljudd.util.EmbedColor
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
import net.moonleay.lilJudd.util.MessageUtil import net.moonleay.liljudd.util.MessageUtil
class UpdateRolesExtension : Extension() { class UpdateRolesExtension : Extension() {
override val name = "updateroles" override val name = "updateroles"

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions.component package net.moonleay.liljudd.extensions.component
import com.kotlindiscord.kord.extensions.commands.application.slash.converters.ChoiceEnum import com.kotlindiscord.kord.extensions.commands.application.slash.converters.ChoiceEnum

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions.component package net.moonleay.liljudd.extensions.component
import com.kotlindiscord.kord.extensions.commands.application.slash.converters.ChoiceEnum import com.kotlindiscord.kord.extensions.commands.application.slash.converters.ChoiceEnum

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.extensions.component package net.moonleay.liljudd.extensions.component
import com.kotlindiscord.kord.extensions.commands.application.slash.converters.ChoiceEnum import com.kotlindiscord.kord.extensions.commands.application.slash.converters.ChoiceEnum

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.features package net.moonleay.liljudd.features
import com.kotlindiscord.kord.extensions.utils.isNullOrBot import com.kotlindiscord.kord.extensions.utils.isNullOrBot
import dev.inmo.krontab.buildSchedule import dev.inmo.krontab.buildSchedule
@ -29,22 +29,22 @@ import dev.kord.core.entity.channel.Channel
import dev.kord.core.entity.channel.MessageChannel import dev.kord.core.entity.channel.MessageChannel
import dev.kord.gateway.PrivilegedIntent import dev.kord.gateway.PrivilegedIntent
import dev.kord.rest.builder.message.EmbedBuilder import dev.kord.rest.builder.message.EmbedBuilder
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.data.database.entry.PlanningNotifierRolesData import net.moonleay.liljudd.data.database.entry.PlanningNotifierRolesData
import net.moonleay.lilJudd.data.database.entry.TimePlanningMessagesData import net.moonleay.liljudd.data.database.entry.TimePlanningMessagesData
import net.moonleay.lilJudd.data.database.repository.PlanningNotifierRolesRepository import net.moonleay.liljudd.data.database.repository.PlanningNotifierRolesRepository
import net.moonleay.lilJudd.data.database.repository.TimePlanningMessagesRepository import net.moonleay.liljudd.data.database.repository.TimePlanningMessagesRepository
import net.moonleay.lilJudd.extensions.FeatureManageExtension import net.moonleay.liljudd.extensions.FeatureManageExtension
import net.moonleay.lilJudd.features.component.FeatureEnum import net.moonleay.liljudd.features.component.FeatureEnum
import net.moonleay.lilJudd.features.component.IFeature import net.moonleay.liljudd.features.component.IFeature
import net.moonleay.lilJudd.util.* import net.moonleay.liljudd.util.*
import java.time.ZonedDateTime import java.time.ZonedDateTime
object AvailabilityManager : IFeature { object AvailabilityManager : IFeature {
// This runs during the cronjob. // This runs during the cronjob.
suspend fun runThread() { suspend fun runThread() {
Logger.out("Starting to update roles...") Logger.out("Updating match roles")
// ChannelID, Data // ChannelID, Data
val messages = TimePlanningMessagesRepository.getWeek(TimeUtil.getWeekStamp().toEpochSecond()) val messages = TimePlanningMessagesRepository.getWeek(TimeUtil.getWeekStamp().toEpochSecond())
@ -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) {
@ -162,7 +162,7 @@ object AvailabilityManager : IFeature {
// Register the cronjob to run at 1AM UTC every day // Register the cronjob to run at 1AM UTC every day
override suspend fun registerThread() { override suspend fun registerThread() {
Logger.out("Adding availability scheduler...") Logger.out("Registering daily planning message role update coroutine")
val scheduler = buildSchedule("0 0 2 * * *") // 0 0 4 * * * 0o 1w // 0o is UTC val scheduler = buildSchedule("0 0 2 * * *") // 0 0 4 * * * 0o 1w // 0o is UTC
scheduler.doInfinity { scheduler.doInfinity {
this.runThread() this.runThread()
@ -176,7 +176,7 @@ object AvailabilityManager : IFeature {
ch: Channel, ch: Channel,
args: FeatureManageExtension.FeatureManagerArgs args: FeatureManageExtension.FeatureManagerArgs
): EmbedBuilder { ): EmbedBuilder {
var alreadyExists = PlanningNotifierRolesRepository.existsInChannel(cID) val alreadyExists = PlanningNotifierRolesRepository.existsInChannel(cID)
// Check if the channel and guild already exist in the db // Check if the channel and guild already exist in the db
if (!alreadyExists) { if (!alreadyExists) {
// Create the roles in Discord // Create the roles in Discord

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,19 +16,19 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.features package net.moonleay.liljudd.features
import dev.kord.common.entity.Snowflake import dev.kord.common.entity.Snowflake
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.data.database.entry.MatchPlanningDataData import net.moonleay.liljudd.data.database.entry.MatchPlanningDataData
import net.moonleay.lilJudd.data.database.repository.MatchPlanningDataRepository import net.moonleay.liljudd.data.database.repository.MatchPlanningDataRepository
import net.moonleay.lilJudd.jobs.MatchJob import net.moonleay.liljudd.jobs.MatchJob
import net.moonleay.lilJudd.jobs.component.JobManager import net.moonleay.liljudd.jobs.component.JobManager
import net.moonleay.lilJudd.util.Logger 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) {

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.features package net.moonleay.liljudd.features
import dev.inmo.krontab.buildSchedule import dev.inmo.krontab.buildSchedule
import dev.inmo.krontab.doInfinity import dev.inmo.krontab.doInfinity
@ -29,19 +29,19 @@ import dev.kord.rest.builder.message.EmbedBuilder
import dev.kord.rest.builder.message.actionRow import dev.kord.rest.builder.message.actionRow
import dev.kord.rest.builder.message.embed import dev.kord.rest.builder.message.embed
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.data.database.entry.TimePlanningChannelsData import net.moonleay.liljudd.data.database.entry.TimePlanningChannelsData
import net.moonleay.lilJudd.data.database.entry.TimePlanningMessagesData import net.moonleay.liljudd.data.database.entry.TimePlanningMessagesData
import net.moonleay.lilJudd.data.database.repository.PlanningNotifierRolesRepository import net.moonleay.liljudd.data.database.repository.PlanningNotifierRolesRepository
import net.moonleay.lilJudd.data.database.repository.TimePlanningChannelsRepository import net.moonleay.liljudd.data.database.repository.TimePlanningChannelsRepository
import net.moonleay.lilJudd.data.database.repository.TimePlanningMessagesRepository import net.moonleay.liljudd.data.database.repository.TimePlanningMessagesRepository
import net.moonleay.lilJudd.extensions.FeatureManageExtension import net.moonleay.liljudd.extensions.FeatureManageExtension
import net.moonleay.lilJudd.features.component.FeatureEnum import net.moonleay.liljudd.features.component.FeatureEnum
import net.moonleay.lilJudd.features.component.IFeature import net.moonleay.liljudd.features.component.IFeature
import net.moonleay.lilJudd.util.EmbedColor import net.moonleay.liljudd.util.EmbedColor
import net.moonleay.lilJudd.util.EmbedUtil import net.moonleay.liljudd.util.EmbedUtil
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
import net.moonleay.lilJudd.util.MessageUtil import net.moonleay.liljudd.util.MessageUtil
import java.time.ZoneId import java.time.ZoneId
import java.time.ZonedDateTime import java.time.ZonedDateTime
@ -52,7 +52,7 @@ object TimeManager : IFeature {
// Register the cronjob to run at 0:01 AM UTC every Monday // Register the cronjob to run at 0:01 AM UTC every Monday
override suspend fun registerThread() { override suspend fun registerThread() {
Logger.out("Adding message scheduler...") Logger.out("Registering weekly planning message posting coroutine")
val scheduler = buildSchedule("0 0 1 * * * 0o 1w") // 0 0 4 * * * 0o 1w // 0o is UTC val scheduler = buildSchedule("0 0 1 * * * 0o 1w") // 0 0 4 * * * 0o 1w // 0o is UTC
scheduler.doInfinity { scheduler.doInfinity {
this.runThread() this.runThread()
@ -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,

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.features.component package net.moonleay.liljudd.features.component
import com.kotlindiscord.kord.extensions.commands.application.slash.converters.ChoiceEnum import com.kotlindiscord.kord.extensions.commands.application.slash.converters.ChoiceEnum

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,10 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.features.component package net.moonleay.liljudd.features.component
import net.moonleay.lilJudd.features.AvailabilityManager import net.moonleay.liljudd.features.AvailabilityManager
import net.moonleay.lilJudd.features.TimeManager import net.moonleay.liljudd.features.TimeManager
object FeatureManager { object FeatureManager {
val features = mutableListOf(AvailabilityManager, TimeManager) // Stores all features val features = mutableListOf(AvailabilityManager, TimeManager) // Stores all features

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,12 +16,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.features.component package net.moonleay.liljudd.features.component
import dev.kord.core.behavior.UserBehavior import dev.kord.core.behavior.UserBehavior
import dev.kord.core.entity.channel.Channel import dev.kord.core.entity.channel.Channel
import dev.kord.rest.builder.message.EmbedBuilder import dev.kord.rest.builder.message.EmbedBuilder
import net.moonleay.lilJudd.extensions.FeatureManageExtension import net.moonleay.liljudd.extensions.FeatureManageExtension
interface IFeature { interface IFeature {
val feat: FeatureEnum val feat: FeatureEnum

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,17 +16,17 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.jobs package net.moonleay.liljudd.jobs
import dev.inmo.krontab.KronScheduler import dev.inmo.krontab.KronScheduler
import dev.kord.common.entity.Snowflake import dev.kord.common.entity.Snowflake
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.data.database.repository.MatchPlanningDataRepository import net.moonleay.liljudd.data.database.repository.MatchPlanningDataRepository
import net.moonleay.lilJudd.jobs.component.CronjobType import net.moonleay.liljudd.jobs.component.CronjobType
import net.moonleay.lilJudd.jobs.component.ICronjob import net.moonleay.liljudd.jobs.component.ICronjob
import net.moonleay.lilJudd.jobs.component.JobManager import net.moonleay.liljudd.jobs.component.JobManager
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
class MatchJob( class MatchJob(
override val jobIncoming: String, override val jobIncoming: String,

View file

@ -16,14 +16,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.jobs package net.moonleay.liljudd.jobs
import dev.inmo.krontab.KronScheduler import dev.inmo.krontab.KronScheduler
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3Api import net.moonleay.liljudd.data.api.splatoon3ink.Splatoon3Api
import net.moonleay.lilJudd.jobs.component.CronjobType import net.moonleay.liljudd.jobs.component.CronjobType
import net.moonleay.lilJudd.jobs.component.ICronjob import net.moonleay.liljudd.jobs.component.ICronjob
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
object Splatoon3ApiScheduleUpdateScheduler : ICronjob { object Splatoon3ApiScheduleUpdateScheduler : ICronjob {
override val jobName: String override val jobName: String

View file

@ -16,15 +16,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.jobs package net.moonleay.liljudd.jobs
import dev.inmo.krontab.KronScheduler import dev.inmo.krontab.KronScheduler
import dev.kord.common.entity.PresenceStatus import dev.kord.common.entity.PresenceStatus
import kotlinx.coroutines.Job import kotlinx.coroutines.Job
import net.moonleay.lilJudd.Bot import net.moonleay.liljudd.Bot
import net.moonleay.lilJudd.data.api.splatoon3ink.Splatoon3ApiDataGrabber import net.moonleay.liljudd.data.api.splatoon3ink.Splatoon3ApiDataGrabber
import net.moonleay.lilJudd.jobs.component.CronjobType import net.moonleay.liljudd.jobs.component.CronjobType
import net.moonleay.lilJudd.jobs.component.ICronjob import net.moonleay.liljudd.jobs.component.ICronjob
object StatusUpdater : ICronjob { object StatusUpdater : ICronjob {
override val jobName: String override val jobName: String

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.jobs.component package net.moonleay.liljudd.jobs.component
enum class CronjobType { enum class CronjobType {
INFINITE, INFINITE,

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.jobs.component package net.moonleay.liljudd.jobs.component
import dev.inmo.krontab.KronScheduler import dev.inmo.krontab.KronScheduler
import kotlinx.coroutines.Job import kotlinx.coroutines.Job

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.jobs.component package net.moonleay.liljudd.jobs.component
import dev.inmo.krontab.buildSchedule import dev.inmo.krontab.buildSchedule
import dev.inmo.krontab.doInfinityTz import dev.inmo.krontab.doInfinityTz
@ -25,7 +25,7 @@ import dev.inmo.krontab.doWhileTz
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import net.moonleay.lilJudd.util.Logger import net.moonleay.liljudd.util.Logger
import java.time.LocalDateTime import java.time.LocalDateTime
import java.time.format.DateTimeFormatter import java.time.format.DateTimeFormatter

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.util package net.moonleay.liljudd.util
import dev.kord.common.Color import dev.kord.common.Color

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.util package net.moonleay.liljudd.util
import dev.kord.common.entity.ButtonStyle import dev.kord.common.entity.ButtonStyle
import dev.kord.core.entity.Embed import dev.kord.core.entity.Embed

View file

@ -1,6 +1,6 @@
/* /*
* lilJudd * lilJudd
* Copyright (C) 2023 moonleay * Copyright (C) 2024 moonleay
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
package net.moonleay.lilJudd.util package net.moonleay.liljudd.util
import java.time.LocalDateTime import java.time.LocalDateTime
import java.time.format.DateTimeFormatter import java.time.format.DateTimeFormatter

Some files were not shown because too many files have changed in this diff Show more