diff --git a/src/main/java/com/jagrosh/vortex/commands/moderation/BanCmd.java b/src/main/java/com/jagrosh/vortex/commands/moderation/BanCmd.java index f2e4b53..fecb38d 100644 --- a/src/main/java/com/jagrosh/vortex/commands/moderation/BanCmd.java +++ b/src/main/java/com/jagrosh/vortex/commands/moderation/BanCmd.java @@ -36,6 +36,8 @@ */ public class BanCmd extends ModCommand { + protected int daysToDelete = 1; + public BanCmd(Vortex vortex) { super(vortex, Permission.BAN_MEMBERS); @@ -102,7 +104,7 @@ long uid = ids.get(i); String id = Long.toString(uid); boolean last = i+1 == ids.size(); - event.getGuild().getController().ban(id, 1, reason).queue(success -> + event.getGuild().getController().ban(id, daysToDelete, reason).queue(success -> { builder.append("\n").append(event.getClient().getSuccess()).append(" Successfully banned <@").append(id).append(">").append(time); if(minutes>0) diff --git a/src/main/java/com/jagrosh/vortex/commands/moderation/SilentbanCmd.java b/src/main/java/com/jagrosh/vortex/commands/moderation/SilentbanCmd.java new file mode 100644 index 0000000..e59ee70 --- /dev/null +++ b/src/main/java/com/jagrosh/vortex/commands/moderation/SilentbanCmd.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019 John Grosh (john.a.grosh@gmail.com). + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jagrosh.vortex.commands.moderation; + +import com.jagrosh.vortex.Vortex; + +/** + * + * @author John Grosh (john.a.grosh@gmail.com) + */ +public class SilentbanCmd extends BanCmd +{ + public SilentbanCmd(Vortex vortex) + { + super(vortex); + this.name = "silentban"; + this.aliases = new String[]{}; + this.help = "bans users without deleting messages"; + this.daysToDelete = 0; + } +}