mirror of
				https://github.com/GayPizzaSpecifications/foundation.git
				synced 2025-11-04 03:39:37 +00:00 
			
		
		
		
	If token is empty (the default now), Bifrost won't do anything.
- Fixes #6.
This commit is contained in:
		@ -42,6 +42,11 @@ class FoundationBifrostPlugin : JavaPlugin(), EventListener, Listener {
 | 
				
			|||||||
    )
 | 
					    )
 | 
				
			||||||
    config = Yaml.default.decodeFromStream(BifrostConfig.serializer(), configPath.inputStream())
 | 
					    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)
 | 
					    server.pluginManager.registerEvents(this, this)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    jda = JDABuilder
 | 
					    jda = JDABuilder
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,8 @@
 | 
				
			|||||||
# Authentication configuration for the bridge.
 | 
					# Authentication configuration for the bridge.
 | 
				
			||||||
authentication:
 | 
					authentication:
 | 
				
			||||||
  # Token from the Discord Bot developer's page.
 | 
					  # Token from the Discord Bot developer's page. If this is empty, the Bifrost plugin will do
 | 
				
			||||||
  token: abc123
 | 
					  # nothing.
 | 
				
			||||||
 | 
					  token: ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Channel configuration for the bridge.
 | 
					# Channel configuration for the bridge.
 | 
				
			||||||
channel:
 | 
					channel:
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user