discord-kagebot/src/main/kotlin/moe/kageru/kagebot/features/GetConfigFeature.kt
kageru b0d3475469
Add getConfig feature to retrieve the current config file
This implements #11 and is preparation for config reloading at runtime
2019-07-14 17:14:23 +02:00

14 lines
407 B
Kotlin

package moe.kageru.kagebot.features
import moe.kageru.kagebot.config.ConfigParser
import org.javacord.api.event.message.MessageCreateEvent
/**
* Simple message handler to send the current config file via message attachment.
*/
class GetConfigFeature : MessageFeature() {
override fun handleInternal(message: MessageCreateEvent) {
message.channel.sendMessage(ConfigParser.configFile)
}
}