diff --git a/src/main/java/xyz/vallat/louis/MovieQuoteBot.java b/src/main/java/xyz/vallat/louis/MovieQuoteBot.java index d2d8a5c..4aacf7e 100644 --- a/src/main/java/xyz/vallat/louis/MovieQuoteBot.java +++ b/src/main/java/xyz/vallat/louis/MovieQuoteBot.java @@ -19,6 +19,8 @@ public class MovieQuoteBot { public static final String DISCORD_TOKEN_ENVIRONMENT = "DISCORD_TOKEN"; public static final String PREFIX = "!"; + public static final String VERSION = "0.1-SNAPSHOT"; + private static final Logger logger = LoggerFactory.getLogger(MovieQuoteBot.class.getCanonicalName()); private static final Map commands = new HashMap<>(); @@ -51,6 +53,8 @@ public class MovieQuoteBot { .next())) .subscribe(); + Runtime.getRuntime().addShutdownHook(new Thread(() -> logger.info("Received shut down signal. Bye!"))); + client.onDisconnect().block(); }