2022-03-31 20:08:50 +00:00
|
|
|
package com.alttd.commandManager.commands.PollCommand;
|
|
|
|
|
|
|
|
|
|
import com.alttd.commandManager.DiscordCommand;
|
|
|
|
|
import com.alttd.commandManager.SubCommand;
|
2022-04-01 00:54:33 +00:00
|
|
|
import com.alttd.util.OptionMappingParsing;
|
|
|
|
|
import net.dv8tion.jda.api.entities.GuildMessageChannel;
|
2022-03-31 20:08:50 +00:00
|
|
|
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
|
|
|
|
|
|
|
|
|
public class SubCommandClose extends SubCommand {
|
|
|
|
|
protected SubCommandClose(DiscordCommand parent) {
|
|
|
|
|
super(parent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getName() {
|
|
|
|
|
return "close";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void execute(SlashCommandInteractionEvent event) {
|
2022-04-01 00:54:33 +00:00
|
|
|
GuildMessageChannel channel = OptionMappingParsing.getGuildChannel("channel", event, getName());
|
|
|
|
|
if (channel == null)
|
|
|
|
|
return;
|
|
|
|
|
Long messageId = OptionMappingParsing.getLong("message_id", event, getName());
|
|
|
|
|
if (messageId == null)
|
|
|
|
|
return;
|
2022-03-31 20:08:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String getHelpMessage() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|