Implemented a way to check if the discord token is given
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
e2f9ca8b8d
commit
70a075660b
@ -5,8 +5,14 @@ import org.slf4j.LoggerFactory;
|
|||||||
|
|
||||||
public class MovieQuoteBot {
|
public class MovieQuoteBot {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(MovieQuoteBot.class.getCanonicalName());
|
||||||
|
public static final String DISCORD_TOKEN_ENVIRONMENT = "DISCORD_TOKEN";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Logger logger = LoggerFactory.getLogger(MovieQuoteBot.class.getCanonicalName());
|
if (System.getenv(DISCORD_TOKEN_ENVIRONMENT) == null && args.length == 0) {
|
||||||
|
logger.error("Missing token. Exiting.");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
logger.debug("Hello World!");
|
logger.debug("Hello World!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user