From 4e44065faead1790fe94231106148dcec47b6f9d Mon Sep 17 00:00:00 2001 From: JoeShimo Date: Thu, 1 Aug 2019 15:45:42 +0100 Subject: [PATCH] made !whitelist command case insensitive --- plugin.yml | 1 - src/main/java/uk/co/angrybee/joe/ServerDiscordClient.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin.yml b/plugin.yml index 9b4ea78..b6e4a16 100755 --- a/plugin.yml +++ b/plugin.yml @@ -3,7 +3,6 @@ version: 1.0.0 author: Joe Shimell main: uk.co.angrybee.joe.DiscordWhitelister description: Discord whitelister bot. -api-version: 1.13 permissions: discordbot: diff --git a/src/main/java/uk/co/angrybee/joe/ServerDiscordClient.java b/src/main/java/uk/co/angrybee/joe/ServerDiscordClient.java index f341bad..193a0b8 100755 --- a/src/main/java/uk/co/angrybee/joe/ServerDiscordClient.java +++ b/src/main/java/uk/co/angrybee/joe/ServerDiscordClient.java @@ -78,7 +78,7 @@ public class ServerDiscordClient extends ListenerAdapter } } - if(messageContents.contains("!whitelist") && userHasPerms) + if(messageContents.toLowerCase().contains("!whitelist") && userHasPerms) { String nameToWhitelist = messageContents; nameToWhitelist = nameToWhitelist.toLowerCase();