mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-13 19:41:38 +00:00
[AB-106] adding ability to specify deletion duration on ban command
removing banDelete command updating jda version
This commit is contained in:
@@ -7,6 +7,8 @@ import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
import net.dv8tion.jda.api.entities.User;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
|
||||
/**
|
||||
* Used when rendering the notification when a member was banned. The template is: "ban_log_embed"
|
||||
@@ -28,5 +30,5 @@ public class BanLog {
|
||||
*/
|
||||
private User bannedUser;
|
||||
private Message commandMessage;
|
||||
private Integer deletionDays;
|
||||
private Duration deletionDuration;
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ public interface BanService {
|
||||
String BAN_EFFECT_KEY = "ban";
|
||||
String BAN_INFRACTION_TYPE = "ban";
|
||||
String INFRACTION_PARAMETER_DELETION_DAYS_KEY = "DELETION_DAYS";
|
||||
CompletableFuture<BanResult> banUserWithNotification(User user, String reason, Member banningMember, Integer deletionDays);
|
||||
CompletableFuture<BanResult> banUserWithNotification(User user, String reason, Member banningMember, Duration deletionDuration);
|
||||
CompletableFuture<Void> unBanUserWithNotification(User user, Member unBanningUser);
|
||||
CompletableFuture<Void> banUser(Guild guild, User user, Integer deletionDays, String reason);
|
||||
CompletableFuture<Void> banUser(Guild guild, User user, Duration deletionDuration, String reason);
|
||||
CompletableFuture<Void> unbanUser(Guild guild, User user);
|
||||
CompletableFuture<Void> softBanUser(Guild guild, User user, Duration delDays);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user