Skip to content

Commit

Permalink
linted code
Browse files Browse the repository at this point in the history
  • Loading branch information
FireBall1725 committed Dec 12, 2023
1 parent d22678b commit 58e11ec
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions app/src/main/kotlin/ca/fireball1725/lcs/discordbot/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ import ca.fireball1725.lcs.discordbot.data.config.BotConfig
import ca.fireball1725.lcs.discordbot.mcserver.Pterodactyl
import ca.fireball1725.lcs.discordbot.mcserver.Server
import ca.fireball1725.lcs.discordbot.services.BotPermissions
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory
import com.fasterxml.jackson.module.kotlin.KotlinFeature
import com.fasterxml.jackson.module.kotlin.KotlinModule
import com.google.gson.Gson
import dev.kord.common.annotation.KordPreview
import dev.kord.gateway.Intents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.time.ZoneOffset
import java.time.format.DateTimeFormatter

class DownloadBackup {
fun GetWorldBackup(server: String): String? {
fun getWorldBackup(server: String): String? {
val serverId = ServerHelper().getServerIdFromPrettyName(server) ?: return null
val server = getServer(serverId)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,23 @@ import com.google.gson.annotations.SerializedName
data class BotConfig(
@SerializedName("discord_token")
val discordToken: String,

@SerializedName("pterodactyl_token")
val pterodactylToken: String,

@SerializedName("pterodactyl_url")
val pterodactylUrl: String,

@SerializedName("is_dev_env")
val isDevelopmentEnvironment: Boolean,

@SerializedName("whitelist")
val whitelist: BotConfigConfigWhitelist,

@SerializedName("backup_download")
val backupDownload: BotConfigConfigBackupDownload,
)

data class BotConfigConfigWhitelist(
@SerializedName("enabled")
val enabled: Boolean,

@SerializedName("whitelist_channel_id")
val channelId: Long,

@SerializedName("whitelist_authorized_role_id")
val authorizedRoleId: Long,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ package ca.fireball1725.lcs.discordbot.helpers

import ca.fireball1725.lcs.discordbot.data.MinecraftUser
import com.google.gson.Gson
import okhttp3.*
import okhttp3.OkHttpClient
import okhttp3.Request
import java.util.UUID

class MinecraftUserHelper {
Expand Down
22 changes: 22 additions & 0 deletions app/src/main/kotlin/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module DiscordBot.app.main {
requires java.datatransfer;
requires DiscordKt;
requires annotations;
requires com.fasterxml.jackson.core;
requires com.fasterxml.jackson.databind;
requires com.fasterxml.jackson.dataformat.yaml;
requires com.fasterxml.jackson.kotlin;
requires emoji;
requires gson;
requires kord.common;
requires kord.core;
requires kord.gateway;
requires kord.rest;
requires kotlin.logging.jvm;
requires kotlin.reflect;
requires kotlin.stdlib;
requires kotlinx.coroutines.core.jvm;
requires kotlinx.serialization.core;
requires kotlinx.serialization.json;
requires okhttp3;
}
3 changes: 0 additions & 3 deletions app/src/test/kotlin/ca/fireball1725/lcs/discordbot/AppTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
* See LICENSE.txt for full license information
*/

/*
* This Kotlin source file was generated by the Gradle 'init' task.
*/
package ca.fireball1725.lcs.discordbot

class AppTest {
Expand Down

0 comments on commit 58e11ec

Please sign in to comment.