[AB-106] adding ability to specify deletion duration on ban command

removing banDelete command
updating jda version
This commit is contained in:
Sheldan
2023-09-26 00:56:15 +02:00
parent f12581f322
commit f97fe42e65
12 changed files with 102 additions and 168 deletions

View File

@@ -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;
}

View File

@@ -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);
}