Skip to content

Commit

Permalink
Remove jCenter and bintray repositories, add config option for bot st…
Browse files Browse the repository at this point in the history
…atus, remove config from MessageListener
  • Loading branch information
jacoballen1 committed Mar 29, 2021
1 parent 8a88308 commit be36cfa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ version = "0.1.0-SNAPSHOT"

repositories {
mavenCentral()
jcenter()
maven("https://kotlin.bintray.com/kotlinx")
maven("https://m2.dv8tion.net/releases")
maven("https://repo.spongepowered.org/repository/maven-public/")
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/org/anvilpowered/falcon/discord/JDAUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class JDAUtils @Inject constructor(

fun setup() {
bot = JDABuilder.createDefault(config.botToken)
.addEventListeners(MessageListener(config, logger, paste))
.addEventListeners(MessageListener(logger, paste))
.build()
bot.isAutoReconnect = true
bot.presence.activity = EntityBuilder.createActivity("Rule Breakers", null, Activity.ActivityType.WATCHING)
bot.presence.activity = EntityBuilder.createActivity(config.status, null, Activity.ActivityType.WATCHING)
}

fun teardown() = bot.shutdownNow()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import java.nio.file.Paths
import java.util.zip.GZIPInputStream

class MessageListener constructor(
private val config: Config,
private val logger: Logger,
private val paste: Paste,
) : ListenerAdapter() {
Expand Down
3 changes: 3 additions & 0 deletions src/main/kotlin/org/anvilpowered/falcon/util/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ class Config {

@Comment("\nDiscord bot token here")
var botToken: String? = "<token>"

@Comment("\nCurrently playing status")
var status: String? = "Scanning files"
}

0 comments on commit be36cfa

Please sign in to comment.