Migrate and disable other over18 commands

This commit is contained in:
SebClem 2022-05-16 18:32:03 +02:00
parent a41b4c76f1
commit 92c30173cb
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
5 changed files with 70 additions and 119 deletions

View File

@ -1,48 +0,0 @@
package net.Broken.Commands;
import net.Broken.Commande;
import net.Broken.Tools.DayListener.DayListener;
import net.dv8tion.jda.api.entities.ChannelType;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* Admin command to manually trigger daily action(s)
*/
public class DayTrigger implements Commande {
Logger logger = LogManager.getLogger();
@Override
public void action(String[] args, MessageReceivedEvent event) {
if (!event.isFromType(ChannelType.PRIVATE))
event.getMessage().delete().queue();
DayListener.getInstance().trigger();
}
@Override
public boolean isPrivateUsable() {
return true;
}
@Override
public boolean isAdminCmd() {
return true;
}
/**
* Determines if the command is usable only by bot level admin user
*
* @return boolean
*/
@Override
public boolean isBotAdminCmd() {
return true;
}
@Override
public boolean isNSFW() {
return false;
}
}

View File

@ -1,47 +0,0 @@
package net.Broken.Commands.Over18;
import net.Broken.Tools.Command.NoDev;
import net.Broken.Tools.Command.NumberedCommande;
import org.apache.logging.log4j.LogManager;
/**
* Ass command, return random picture from les400culs.com
*/
@NoDev()
public class Ass extends NumberedCommande {
public Ass() {
super(LogManager.getLogger(), "http://les400culs.com/", "-2/", "featured-img", "img");
}
@Override
public String toString() {
return "Ass";
}
@Override
public boolean isPrivateUsable() {
return false;
}
@Override
public boolean isAdminCmd() {
return false;
}
/**
* Determines if the command is usable only by bot level admin user
*
* @return boolean
*/
@Override
public boolean isBotAdminCmd() {
return false;
}
@Override
public boolean isNSFW() {
return true;
}
}

View File

@ -0,0 +1,46 @@
package net.Broken.SlashCommands.Over18;
import net.Broken.Tools.Command.Ignore;
import net.Broken.Tools.Command.NoDev;
import net.Broken.Tools.Command.NumberedSlashCommand;
import net.Broken.Tools.FindContentOnWebPage;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.io.IOException;
@NoDev
@Ignore
public class Ass extends NumberedSlashCommand {
Logger logger = LogManager.getLogger();
public Ass() {
super(LogManager.getLogger(), "http://les400culs.com/", "-2/", "featured-img", "img");
}
@Override
public String getDescription() {
return "Return random image from les400culs.com";
}
@Override
public boolean isBotAdminCmd() {
return false;
}
@Override
public boolean isNSFW() {
return true;
}
@Override
public boolean isPrivateUsable() {
return true;
}
@Override
public boolean isDisableByDefault() {
return true;
}
}

View File

@ -1,39 +1,26 @@
package net.Broken.Commands.Over18;
package net.Broken.SlashCommands.Over18;
import net.Broken.Tools.Command.Ignore;
import net.Broken.Tools.Command.NoDev;
import net.Broken.Tools.Command.NumberedCommande;
import net.Broken.Tools.Command.NumberedSlashCommand;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* Boobs command, return random picture from lesaintdesseins.fr
*/
@NoDev()
public class Boobs extends NumberedCommande {
@NoDev
@Ignore
public class Boobs extends NumberedSlashCommand {
Logger logger = LogManager.getLogger();
public Boobs() {
super(LogManager.getLogger(), "http://lesaintdesseins.fr/", "-2/", "featured-img", "img");
}
@Override
public String toString() {
return "Boobs";
}
@Override
public boolean isPrivateUsable() {
return false;
public String getDescription() {
return "Return random image from les400culs.com";
}
@Override
public boolean isAdminCmd() {
return false;
}
/**
* Determines if the command is usable only by bot level admin user
*
* @return boolean
*/
@Override
public boolean isBotAdminCmd() {
return false;
@ -43,4 +30,14 @@ public class Boobs extends NumberedCommande {
public boolean isNSFW() {
return true;
}
@Override
public boolean isPrivateUsable() {
return true;
}
@Override
public boolean isDisableByDefault() {
return true;
}
}

View File

@ -1,5 +1,7 @@
package net.Broken.SlashCommands.Over18;
import net.Broken.Tools.Command.Ignore;
import net.Broken.Tools.Command.NoDev;
import net.Broken.Tools.Command.NumberedSlashCommand;
import net.Broken.Tools.FindContentOnWebPage;
import org.apache.logging.log4j.LogManager;
@ -7,6 +9,7 @@ import org.apache.logging.log4j.Logger;
import java.io.IOException;
@NoDev
public class Madame extends NumberedSlashCommand {
Logger logger = LogManager.getLogger();
@ -88,7 +91,7 @@ public class Madame extends NumberedSlashCommand {
@Override
public boolean isPrivateUsable() {
return false;
return true;
}
@Override