Merge branch '3.0' of https://github.com/Rixa/Bot into 3.0
This commit is contained in:
commit
ac505fbe34
@ -6,10 +6,12 @@
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="Bot" />
|
||||
<module name="Rixa" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="Bot" target="1.8" />
|
||||
<module name="Rixa" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
|
||||
import io.rixa.bot.commands.cmds.admin.ConfigCommand;
|
||||
import io.rixa.bot.commands.cmds.admin.PMCommand;
|
||||
import io.rixa.bot.commands.cmds.general.*;
|
||||
import io.rixa.bot.commands.cmds.moderator.BanCommand;
|
||||
import io.rixa.bot.commands.cmds.moderator.ClearCommand;
|
||||
import io.rixa.bot.commands.cmds.moderator.MuteCommand;
|
||||
import io.rixa.bot.commands.cmds.other.ShutdownCommand;
|
||||
@ -113,6 +114,7 @@ public class Rixa {
|
||||
private void registerCommands() {
|
||||
this.commandHandler.registerCommands(
|
||||
new AdviceCommand("advice", RixaPermission.NONE, "Receive advice from the great beyond..."),
|
||||
new BanCommand("ban", RixaPermission.BAN_MEMBER, "Ban a player from your server."),
|
||||
new ClearCommand("clear", RixaPermission.CLEAR_CHAT, "Clear Chat!", Arrays.asList("deleemessages", "cmessages")),
|
||||
new ConfigCommand("config", RixaPermission.ACCESS_CONFIG, "Access the config menu"),
|
||||
new FeaturesCommand("features", RixaPermission.NONE, "List Rixa's official features!"),
|
||||
|
@ -0,0 +1,36 @@
|
||||
package io.rixa.bot.commands.cmds.moderator;
|
||||
|
||||
import io.rixa.bot.Rixa;
|
||||
import io.rixa.bot.commands.Command;
|
||||
import io.rixa.bot.commands.perms.RixaPermission;
|
||||
import io.rixa.bot.guild.RixaGuild;
|
||||
import io.rixa.bot.guild.manager.GuildManager;
|
||||
import io.rixa.bot.utils.MessageFactory;
|
||||
import jdk.nashorn.internal.objects.annotations.Getter;
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
import net.dv8tion.jda.core.entities.Member;
|
||||
import net.dv8tion.jda.core.entities.TextChannel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BanCommand extends Command {
|
||||
|
||||
RixaPermission permission;
|
||||
|
||||
public BanCommand(String command, RixaPermission permission, String descriptopn) {
|
||||
super(command, permission, descriptopn);
|
||||
this.permission = permission;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(String command, Guild guild, Member member, TextChannel channel, String[] args) {
|
||||
RixaGuild rixaGuild = GuildManager.getInstance().getGuild(guild);
|
||||
if (args.length < 1) {
|
||||
MessageFactory.create(
|
||||
String.format("Incorrect Usage! Example: `%s%s @User`", rixaGuild.getSettings().getPrefix(),
|
||||
command)).setColor(member.getColor()).queue(channel);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user