Add command to stop bot process
All checks were successful
continuous-integration/drone/push Build is passing

Previously, anyone could send the keywords in chat and kill the bot. Now, only the set bot owner can run the command.
This commit is contained in:
2022-11-20 05:57:42 +01:00
parent bd76562bcc
commit dd4ffe252e
4 changed files with 24 additions and 13 deletions

View File

@@ -11,6 +11,9 @@ public class Configuration
private static boolean paused = false;
private static String prefix = ".";
// todo: allow people to set their own user id
private static final long botOwnerId = 979809420714332260L;
/**
* Checks if the bot has been started with the verbose argument.
@@ -61,4 +64,6 @@ public class Configuration
*/
public static void setPaused(boolean p) { paused = p; }
public static long getBotOwnerId() { return botOwnerId; }
}