Skip to content

Commit

Permalink
Refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Sep 24, 2023
1 parent e70b80b commit 57fe8a9
Show file tree
Hide file tree
Showing 36 changed files with 8 additions and 1,144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.datetime.Clock
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.SerializationException
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.*
import mu.KotlinLogging
Expand Down Expand Up @@ -60,7 +59,6 @@ import net.perfectdreams.discordinteraktions.common.commands.MessageCommandDecla
import net.perfectdreams.discordinteraktions.common.commands.SlashCommandDeclaration
import net.perfectdreams.discordinteraktions.common.commands.UserCommandDeclaration
import net.perfectdreams.dreamstorageservice.client.DreamStorageServiceClient
import net.perfectdreams.exposedpowerutils.sql.createOrUpdatePostgreSQLEnum
import net.perfectdreams.gabrielaimageserver.client.GabrielaImageServerClient
import net.perfectdreams.galleryofdreams.common.data.api.GalleryOfDreamsDataResponse
import net.perfectdreams.loritta.cinnamon.discord.gateway.GatewayEventContext
Expand Down Expand Up @@ -89,31 +87,14 @@ import net.perfectdreams.loritta.cinnamon.pudding.entities.PuddingBackground
import net.perfectdreams.loritta.cinnamon.pudding.entities.PuddingUserProfile
import net.perfectdreams.loritta.cinnamon.pudding.services.fromRow
import net.perfectdreams.loritta.cinnamon.pudding.tables.*
import net.perfectdreams.loritta.cinnamon.pudding.tables.servers.GuildProfiles
import net.perfectdreams.loritta.cinnamon.pudding.tables.christmas2022.Christmas2022Drops
import net.perfectdreams.loritta.cinnamon.pudding.tables.christmas2022.Christmas2022Players
import net.perfectdreams.loritta.cinnamon.pudding.tables.christmas2022.CollectedChristmas2022Points
import net.perfectdreams.loritta.cinnamon.pudding.tables.easter2023.CollectedEaster2023Eggs
import net.perfectdreams.loritta.cinnamon.pudding.tables.easter2023.CreatedEaster2023Baskets
import net.perfectdreams.loritta.cinnamon.pudding.tables.easter2023.Easter2023Drops
import net.perfectdreams.loritta.cinnamon.pudding.tables.easter2023.Easter2023Players
import net.perfectdreams.loritta.cinnamon.pudding.tables.raffles.RaffleTickets
import net.perfectdreams.loritta.cinnamon.pudding.tables.raffles.Raffles
import net.perfectdreams.loritta.cinnamon.pudding.tables.raffles.UserAskedRaffleNotifications
import net.perfectdreams.loritta.cinnamon.pudding.tables.servers.*
import net.perfectdreams.loritta.cinnamon.pudding.tables.servers.moduleconfigs.*
import net.perfectdreams.loritta.cinnamon.pudding.tables.transactions.*
import net.perfectdreams.loritta.cinnamon.pudding.utils.PaymentReason
import net.perfectdreams.loritta.common.commands.ApplicationCommandType
import net.perfectdreams.loritta.common.exposed.tables.CachedDiscordWebhooks
import net.perfectdreams.loritta.common.locale.LanguageManager
import net.perfectdreams.loritta.common.locale.LocaleManager
import net.perfectdreams.loritta.common.lorituber.LoriTuberContentGenre
import net.perfectdreams.loritta.common.lorituber.LoriTuberContentLength
import net.perfectdreams.loritta.common.lorituber.LoriTuberContentType
import net.perfectdreams.loritta.common.utils.*
import net.perfectdreams.loritta.common.utils.MediaTypeUtils
import net.perfectdreams.loritta.common.utils.easter2023.EasterEggColor
import net.perfectdreams.loritta.common.utils.extensions.getPathFromResources
import net.perfectdreams.loritta.morenitta.analytics.stats.LorittaStatsCollector
import net.perfectdreams.loritta.morenitta.christmas2022event.listeners.ReactionListener
Expand All @@ -138,7 +119,6 @@ import net.perfectdreams.loritta.morenitta.utils.devious.GatewayExtrasData
import net.perfectdreams.loritta.morenitta.utils.devious.GatewaySessionData
import net.perfectdreams.loritta.morenitta.utils.ecb.ECBManager
import net.perfectdreams.loritta.morenitta.utils.extensions.readImage
import net.perfectdreams.loritta.morenitta.utils.gamersafer.GamerSaferRoleCheckerUpdater
import net.perfectdreams.loritta.morenitta.utils.giveaway.GiveawayManager
import net.perfectdreams.loritta.morenitta.utils.locale.LegacyBaseLocale
import net.perfectdreams.loritta.morenitta.utils.metrics.Prometheus
Expand Down Expand Up @@ -1562,7 +1542,6 @@ class LorittaBot(
scheduleCoroutineAtFixedRateIfMainReplica(LorittaRaffleTask::class.simpleName!!, 1.seconds, action = LorittaRaffleTask(this@LorittaBot))
scheduleCoroutineAtFixedRateIfMainReplica(BotVotesNotifier::class.simpleName!!, 1.minutes, action = BotVotesNotifier(this))
scheduleCoroutineAtFixedRate(ActivityUpdater::class.simpleName!!, 1.minutes, action = activityUpdater)
scheduleCoroutineAtFixedRate(GamerSaferRoleCheckerUpdater::class.simpleName!!, 1.minutes, action = GamerSaferRoleCheckerUpdater(this))

// Update Fan Arts
scheduleCoroutineAtFixedRate("GalleryOfDreamsFanArtsUpdater", 1.minutes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import net.perfectdreams.loritta.common.commands.ApplicationCommandType
import net.perfectdreams.loritta.common.commands.CommandCategory
import net.perfectdreams.loritta.common.locale.BaseLocale
import net.perfectdreams.loritta.common.locale.LanguageManager
import net.perfectdreams.loritta.common.utils.EnvironmentType
import net.perfectdreams.loritta.common.utils.LorittaPermission
import net.perfectdreams.loritta.common.utils.text.TextUtils.shortenWithEllipsis
import net.perfectdreams.loritta.i18n.I18nKeysData
Expand All @@ -61,14 +62,12 @@ import net.perfectdreams.loritta.morenitta.interactions.vanilla.lorituber.LoriTu
import net.perfectdreams.loritta.morenitta.interactions.vanilla.minecraft.MinecraftCommand
import net.perfectdreams.loritta.morenitta.interactions.vanilla.moderation.BanInfoCommand
import net.perfectdreams.loritta.morenitta.interactions.vanilla.moderation.DashboardCommand
import net.perfectdreams.loritta.morenitta.interactions.vanilla.moderation.GamerSaferCommand
import net.perfectdreams.loritta.morenitta.interactions.vanilla.roleplay.RoleplayCommand
import net.perfectdreams.loritta.morenitta.interactions.vanilla.social.ProfileCommand
import net.perfectdreams.loritta.morenitta.interactions.vanilla.social.RepCommand
import net.perfectdreams.loritta.morenitta.interactions.vanilla.social.XpCommand
import net.perfectdreams.loritta.morenitta.interactions.vanilla.utils.*
import net.perfectdreams.loritta.morenitta.utils.*
import net.perfectdreams.loritta.common.utils.EnvironmentType
import net.perfectdreams.loritta.morenitta.utils.extensions.await
import net.perfectdreams.loritta.morenitta.utils.extensions.getLocalizedName
import net.perfectdreams.loritta.morenitta.utils.extensions.referenceIfPossible
Expand Down Expand Up @@ -130,7 +129,6 @@ class UnleashedCommandManager(val loritta: LorittaBot, val languageManager: Lang
register(UserInfoUserCommand())

// ===[ MODERATION ]===
register(GamerSaferCommand(loritta))
register(BanInfoCommand(loritta))
register(DashboardCommand(loritta))

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ data class LorittaConfig(
val openWeatherMap: OpenWeatherMapConfig,
val googleVision: GoogleVisionConfig,
val googleRecaptcha: GoogleRecaptchaConfig,
val gamerSafer: GamerSaferConfig,
val turnstileCaptchas: TurnstileCaptchas,
val voteWebsites: VotingWebsites,
val messageEncryption: MessageEncryptionConfig,
Expand Down Expand Up @@ -204,14 +203,6 @@ data class LorittaConfig(
val reputationToken: String
)

@Serializable
data class GamerSaferConfig(
val provider: String,
val secretKey: String,
val endpointUrl: String,
val webhookSecret: String
)

@Serializable
data class TurnstileCaptchas(
val dailyReward: CloudflareTurnstileConfig
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 57fe8a9

Please sign in to comment.