If token is empty (the default now), Bifrost won't do anything.

- Fixes #6.
This commit is contained in:
Logan Gorence 2021-12-23 06:31:46 +00:00
parent 139ce551dc
commit 7a30d066ac
No known key found for this signature in database
GPG Key ID: 9743CEF10935949A
2 changed files with 8 additions and 2 deletions

View File

@ -42,6 +42,11 @@ class FoundationBifrostPlugin : JavaPlugin(), EventListener, Listener {
)
config = Yaml.default.decodeFromStream(BifrostConfig.serializer(), configPath.inputStream())
if (config.authentication.token.isEmpty()) {
slF4JLogger.warn("Token empty, will not start Bifrost.")
return
}
server.pluginManager.registerEvents(this, this)
jda = JDABuilder

View File

@ -1,7 +1,8 @@
# Authentication configuration for the bridge.
authentication:
# Token from the Discord Bot developer's page.
token: abc123
# Token from the Discord Bot developer's page. If this is empty, the Bifrost plugin will do
# nothing.
token: ""
# Channel configuration for the bridge.
channel: