fix!: temp. stopped the StatusUpdater and Cache updater from running to make the bot run again, fixed package names

Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
moonleay 2023-10-26 18:53:22 +02:00
parent dac2bdd6d3
commit bf057dd317
Signed by: moonleay
GPG key ID: 82667543CCD715FB
7 changed files with 15 additions and 15 deletions

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
run/ run/
/data/
.gradle .gradle
build/ build/

View file

@ -32,7 +32,7 @@ val ownerID = 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.6.4" ?: "2.6.5"
val kordver = "1.5.9-SNAPSHOT" val kordver = "1.5.9-SNAPSHOT"
val coroutinesver = "1.7.3" val coroutinesver = "1.7.3"

View file

@ -30,23 +30,17 @@ 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.botendo.build.BuildConstants
import net.moonleay.lilJudd.buttons.component.EditButtonManager import net.moonleay.lilJudd.buttons.component.EditButtonManager
import net.moonleay.lilJudd.data.CredentialManager import net.moonleay.lilJudd.data.CredentialManager
import net.moonleay.lilJudd.data.api.Splatoon3ApiCache
import net.moonleay.lilJudd.data.api.type.ApiDataType
import net.moonleay.lilJudd.data.api.type.ApiRequestType
import net.moonleay.lilJudd.data.database.DB import net.moonleay.lilJudd.data.database.DB
import net.moonleay.lilJudd.extensions.* import net.moonleay.lilJudd.extensions.*
import net.moonleay.lilJudd.features.AvailabilityManager import net.moonleay.lilJudd.features.AvailabilityManager
import net.moonleay.lilJudd.features.MatchManager import net.moonleay.lilJudd.features.MatchManager
import net.moonleay.lilJudd.features.TimeManager 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.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
import net.moonleay.liljudd.build.BuildConstants
import kotlin.system.exitProcess import kotlin.system.exitProcess
object Bot { object Bot {
@ -164,17 +158,21 @@ object Bot {
AvailabilityManager.runThread() // Update Availabilities AvailabilityManager.runThread() // Update Availabilities
MatchManager.update() // Update Matches MatchManager.update() // Update Matches
// 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
Splatoon3ApiCache.updateData(ApiDataType.SCHEDULES, ApiRequestType.AUTOMATIC_CACHE_CREATION_AT_STARTUP) // Splatoon3ApiCache.updateData(ApiDataType.SCHEDULES, ApiRequestType.AUTOMATIC_CACHE_CREATION_AT_STARTUP)
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,
which i am using. which i am using.
*/ */
// Had to disable bc of an error.
// Will fix when I have time
//JobManager.addJob(Splatoon3ApiFestivalAndCoopUpdateScheduler) //JobManager.addJob(Splatoon3ApiFestivalAndCoopUpdateScheduler)
//JobManager.addJob(Splatoon3ApiSplatnetGearUpdateScheduler) //JobManager.addJob(Splatoon3ApiSplatnetGearUpdateScheduler)

View file

@ -17,7 +17,8 @@
*/ */
package net.moonleay.lilJudd package net.moonleay.lilJudd
import net.moonleay.botendo.build.BuildConstants import net.moonleay.liljudd.build.BuildConstants
suspend fun main() { suspend fun main() {
println( println(

View file

@ -20,7 +20,6 @@ package net.moonleay.lilJudd.data.api
import io.ktor.http.* import io.ktor.http.*
import kotlinx.serialization.json.* import kotlinx.serialization.json.*
import net.moonleay.botendo.build.BuildConstants
import net.moonleay.lilJudd.data.api.entry.coop.CoopGearData import net.moonleay.lilJudd.data.api.entry.coop.CoopGearData
import net.moonleay.lilJudd.data.api.entry.schedule.* import net.moonleay.lilJudd.data.api.entry.schedule.*
import net.moonleay.lilJudd.data.api.entry.splatfest.SplatfestColor import net.moonleay.lilJudd.data.api.entry.splatfest.SplatfestColor
@ -34,6 +33,7 @@ import net.moonleay.lilJudd.data.api.type.ApiDataType
import net.moonleay.lilJudd.data.api.type.ApiRequestType import net.moonleay.lilJudd.data.api.type.ApiRequestType
import net.moonleay.lilJudd.util.Logger import net.moonleay.lilJudd.util.Logger
import net.moonleay.lilJudd.util.NetUtil import net.moonleay.lilJudd.util.NetUtil
import net.moonleay.liljudd.build.BuildConstants
object Splatoon3ApiCache { object Splatoon3ApiCache {
private val user_agent = private val user_agent =

View file

@ -20,9 +20,9 @@ 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 net.moonleay.botendo.build.BuildConstants
import net.moonleay.lilJudd.util.EmbedColor import net.moonleay.lilJudd.util.EmbedColor
import net.moonleay.lilJudd.util.MessageUtil import net.moonleay.lilJudd.util.MessageUtil
import net.moonleay.liljudd.build.BuildConstants
class InfoExtension : Extension() { class InfoExtension : Extension() {
override val name = "info" override val name = "info"

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.botendo.build package net.moonleay.liljudd.build
internal object BuildConstants { internal object BuildConstants {
const val version = "${version}" const val version = "${version}"