diff --git a/src/main/java/xyz/vallat/louis/MovieQuoteBot.java b/src/main/java/xyz/vallat/louis/MovieQuoteBot.java index 7e27662..2c7448f 100644 --- a/src/main/java/xyz/vallat/louis/MovieQuoteBot.java +++ b/src/main/java/xyz/vallat/louis/MovieQuoteBot.java @@ -5,8 +5,14 @@ import org.slf4j.LoggerFactory; 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) { - 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!"); }