move field declaration in debug features up

This commit is contained in:
kageru 2019-06-15 22:21:53 +02:00
parent 3890b2bba9
commit 1a8c9fdb6f
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

View File

@ -11,6 +11,8 @@ import java.time.Duration
import java.time.temporal.ChronoUnit
class DebugFeatures(rawDebugFeatures: RawDebugFeatures) {
val enabled: Boolean = rawDebugFeatures.enabled
fun handle(message: MessageCreateEvent) {
if (message.messageAuthor.isBotOwner) {
if (message.readableMessageContent.startsWith("!debugstats")) {
@ -72,6 +74,4 @@ class DebugFeatures(rawDebugFeatures: RawDebugFeatures) {
private fun getOsInfo() = "Running on ${System.getProperty("os.name")} " +
"${System.getProperty("os.version")}-${System.getProperty("os.arch")}.\n"
val enabled: Boolean = rawDebugFeatures.enabled
}