feat: better start message logging
This commit is contained in:
@@ -12,7 +12,7 @@ plugins {
|
|||||||
val commit = runCommand(arrayListOf("git", "rev-parse", "HEAD"))
|
val commit = runCommand(arrayListOf("git", "rev-parse", "HEAD"))
|
||||||
val changes = runCommand(arrayListOf("git", "diff", "--shortstat"))
|
val changes = runCommand(arrayListOf("git", "diff", "--shortstat"))
|
||||||
|
|
||||||
group = "xyz.brettb.discord.ieeevents"
|
group = "xyz.brettb.discord"
|
||||||
version = "${rootProject.findProperty("major")}.${rootProject.findProperty("minor")}.${rootProject.findProperty("patch")}"
|
version = "${rootProject.findProperty("major")}.${rootProject.findProperty("minor")}.${rootProject.findProperty("patch")}"
|
||||||
|
|
||||||
application {
|
application {
|
||||||
@@ -20,6 +20,7 @@ application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildConfig {
|
buildConfig {
|
||||||
|
packageName("xyz.brettb.discord.ieeevents")
|
||||||
className("IEEEventsBotInfo")
|
className("IEEEventsBotInfo")
|
||||||
buildConfigField("String", "VERSION", "\"${version}\"")
|
buildConfigField("String", "VERSION", "\"${version}\"")
|
||||||
buildConfigField("String", "COMMIT", "\"$commit\"")
|
buildConfigField("String", "COMMIT", "\"$commit\"")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
major=0
|
major=0
|
||||||
minor=3
|
minor=4
|
||||||
patch=0
|
patch=0
|
||||||
|
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import ch.qos.logback.classic.Logger
|
|||||||
import com.sksamuel.hoplite.ConfigLoader
|
import com.sksamuel.hoplite.ConfigLoader
|
||||||
import net.dv8tion.jda.api.JDA
|
import net.dv8tion.jda.api.JDA
|
||||||
import net.dv8tion.jda.api.JDABuilder
|
import net.dv8tion.jda.api.JDABuilder
|
||||||
|
import net.dv8tion.jda.api.JDAInfo
|
||||||
import net.dv8tion.jda.api.Permission
|
import net.dv8tion.jda.api.Permission
|
||||||
import net.dv8tion.jda.api.events.GenericEvent
|
import net.dv8tion.jda.api.events.GenericEvent
|
||||||
import net.dv8tion.jda.api.events.ReadyEvent
|
import net.dv8tion.jda.api.events.ReadyEvent
|
||||||
@@ -39,6 +40,13 @@ val logger = LoggerFactory.getLogger(IEEEventsBot.javaClass)
|
|||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
logger.info("IEEEvents Bot")
|
logger.info("IEEEvents Bot")
|
||||||
|
logger.info(" | Version: ${IEEEventsBotInfo.VERSION}")
|
||||||
|
logger.info(" | Commit: ${IEEEventsBotInfo.COMMIT}")
|
||||||
|
if (IEEEventsBotInfo.LOCAL_CHANGES.isNotBlank()) {
|
||||||
|
println(" * ${IEEEventsBotInfo.LOCAL_CHANGES}")
|
||||||
|
}
|
||||||
|
logger.info(" | JDA Ver: ${JDAInfo.VERSION}")
|
||||||
|
logger.info(" | Commands: ${IEEEventsBot.commands.size}\n")
|
||||||
|
|
||||||
IEEEventsBot.load()
|
IEEEventsBot.load()
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ object Utils {
|
|||||||
) {
|
) {
|
||||||
return body.byteStream()
|
return body.byteStream()
|
||||||
} else {
|
} else {
|
||||||
throw error("failed to download file")
|
throw Exception("failed to download calendar")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user