Skip to content

Commit 7543b49

Browse files
authored
Merge pull request #196 from KittyBot-Org/development
emote restriction reset fixes settings command fixes
2 parents 033d4bd + 67567b1 commit 7543b49

File tree

15 files changed

+95
-112
lines changed

15 files changed

+95
-112
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ dependencies {
3434
implementation("com.github.KittyBot-Org:Lavalink-Client:f7842dfdb4") {
3535
exclude group: 'com.sedmelluq', module: 'lavaplayer'
3636
}
37-
implementation 'com.sedmelluq:lavaplayer:1.3.62'
37+
implementation 'com.sedmelluq:lavaplayer:1.3.63'
3838
implementation 'com.sedmelluq:jda-nas:1.1.0'
3939

4040
// database
@@ -49,7 +49,7 @@ dependencies {
4949
implementation 'io.sentry:sentry-logback:3.2.0'
5050

5151
// eval
52-
implementation 'org.codehaus.groovy:groovy-jsr223:3.0.6'
52+
implementation 'org.codehaus.groovy:groovy-jsr223:3.0.7'
5353

5454
// jjwt
5555
implementation 'io.jsonwebtoken:jjwt-api:0.11.2'

src/main/java/de/kittybot/kittybot/commands/neko/BiteCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ public BiteCommand(){
1818

1919
@Override
2020
public void run(CommandContext ctx){
21-
if(ctx.getArgs().length == 0){
22-
sendUsage(ctx);
23-
return;
24-
}
2521
sendReactionImage(ctx, false, "bite", "gif", "bites");
2622
}
2723

src/main/java/de/kittybot/kittybot/commands/neko/CuddleCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ public CuddleCommand(){
1818

1919
@Override
2020
public void run(CommandContext ctx){
21-
if(ctx.getArgs().length == 0){
22-
sendUsage(ctx);
23-
return;
24-
}
2521
sendReactionImage(ctx, false, "cuddle", "gif", "cuddles");
2622
}
2723

src/main/java/de/kittybot/kittybot/commands/neko/FeedCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ public FeedCommand(){
1818

1919
@Override
2020
public void run(CommandContext ctx){
21-
if(ctx.getArgs().length == 0){
22-
sendUsage(ctx);
23-
return;
24-
}
2521
sendReactionImage(ctx, false, "feed", "gif", "feeds");
2622
}
2723

src/main/java/de/kittybot/kittybot/commands/neko/HugCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ public HugCommand(){
1818

1919
@Override
2020
public void run(CommandContext ctx){
21-
if(ctx.getArgs().length == 0){
22-
sendUsage(ctx);
23-
return;
24-
}
2521
sendReactionImage(ctx, false, "hug", "gif", "hugs");
2622
}
2723

src/main/java/de/kittybot/kittybot/commands/neko/KissCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ public KissCommand(){
1818

1919
@Override
2020
public void run(CommandContext ctx){
21-
if(ctx.getArgs().length == 0){
22-
sendUsage(ctx);
23-
return;
24-
}
2521
sendReactionImage(ctx, false, "kiss", "gif", "kisses");
2622
}
2723

src/main/java/de/kittybot/kittybot/commands/neko/LickCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ public LickCommand(){
1818

1919
@Override
2020
public void run(CommandContext ctx){
21-
if(ctx.getArgs().length == 0){
22-
sendUsage(ctx);
23-
return;
24-
}
2521
sendReactionImage(ctx, false, "lick", "gif", "licks");
2622
}
2723

src/main/java/de/kittybot/kittybot/commands/neko/NekoCommand.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package de.kittybot.kittybot.commands.neko;
22

3+
import de.kittybot.kittybot.cache.GuildSettingsCache;
4+
import de.kittybot.kittybot.database.Database;
35
import de.kittybot.kittybot.objects.command.ACommand;
46
import de.kittybot.kittybot.objects.command.Category;
57
import de.kittybot.kittybot.objects.command.CommandContext;
8+
import de.kittybot.kittybot.objects.data.GuildSettings;
69
import de.kittybot.kittybot.objects.requests.Requester;
710

811
import java.util.Arrays;
@@ -23,6 +26,10 @@ public NekoCommand(){
2326

2427
@Override
2528
public void run(CommandContext ctx){
29+
if(!GuildSettingsCache.isNSFWEnabled(ctx.getGuild().getId())){
30+
sendError(ctx, "NSFW commands are disabled in this guild");
31+
return;
32+
}
2633
if(!ctx.getChannel().isNSFW()){
2734
sendError(ctx, "This command is NSFW channel only");
2835
return;

src/main/java/de/kittybot/kittybot/commands/neko/PatCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ public PatCommand(){
1818

1919
@Override
2020
public void run(CommandContext ctx){
21-
if(ctx.getArgs().length == 0){
22-
sendUsage(ctx);
23-
return;
24-
}
2521
sendReactionImage(ctx, false, "pat", "gif", "pats");
2622
}
2723

src/main/java/de/kittybot/kittybot/commands/neko/PokeCommand.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ public PokeCommand(){
1818

1919
@Override
2020
public void run(CommandContext ctx){
21-
if(ctx.getArgs().length == 0){
22-
sendUsage(ctx);
23-
return;
24-
}
2521
sendReactionImage(ctx, false, "poke", "gif", "pokes");
2622
}
2723

0 commit comments

Comments
 (0)