Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
feat: 起動時に設定を表示するようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
sya-ri committed Jan 16, 2022
1 parent 43e0c98 commit 79df497
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/kotlin/dev/s7a/sushi/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ import dev.s7a.sushi.properties.PropertiesFile
* コンフィグ
*/
object Config : PropertiesFile("config.properties") {
/**
* 表示する
*/
fun printAll() {
logger.debug("BotToken: ${if (botToken != null) "*****" else ""}")
logger.debug("RuleMessageId: $ruleMessageId")
logger.debug("MemberRoleId: $memberRoleId")
}

/**
* Discord Bot のトークン
*/
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/dev/s7a/sushi/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ lateinit var bot: JDA
val logger: Logger = LoggerFactory.getLogger("Tamago")

fun main() {
Config.printAll()
bot = JDABuilder.createLight(Config.botToken).apply {
addEventListeners(RuleAcceptListener)
}.build()
Expand Down

0 comments on commit 79df497

Please sign in to comment.