This commit is contained in:
Lee
2024-07-07 02:18:10 +01:00
parent 25dd6cb0dc
commit 2a7e2acc88
28 changed files with 56 additions and 122 deletions

View File

@ -34,9 +34,8 @@ public class RemoveSubCommand extends BatCommand {
@Override
public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction event) {
OptionMapping typeOption = event.getOption("type");
if (typeOption == null) {
return;
}
assert typeOption != null;
String type = typeOption.getAsString();
LogProfile profile = guild.getLogProfile();

View File

@ -38,13 +38,10 @@ public class SetSubCommand extends BatCommand {
@Override
public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction event) {
OptionMapping typeOption = event.getOption("type");
if (typeOption == null) {
return;
}
assert typeOption != null;
OptionMapping channelOption = event.getOption("channel");
if (channelOption == null) {
return;
}
assert channelOption != null;
String type = typeOption.getAsString();
TextChannel targetChannel = channelOption.getAsChannel().asTextChannel();
LogProfile profile = guild.getLogProfile();