Start for editing descriptions for polls
This commit is contained in:
parent
b081a9ef88
commit
9642a80f08
|
|
@ -3,8 +3,12 @@ package com.alttd.commandManager.commands.PollCommand;
|
|||
import com.alttd.commandManager.DiscordCommand;
|
||||
import com.alttd.commandManager.SubCommand;
|
||||
import com.alttd.util.OptionMappingParsing;
|
||||
import com.alttd.util.Util;
|
||||
import net.dv8tion.jda.api.EmbedBuilder;
|
||||
import net.dv8tion.jda.api.entities.GuildMessageChannel;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||
import net.dv8tion.jda.api.interactions.InteractionHook;
|
||||
|
||||
public class SubCommandEditDescription extends SubCommand {
|
||||
protected SubCommandEditDescription(DiscordCommand parent) {
|
||||
|
|
@ -29,6 +33,17 @@ public class SubCommandEditDescription extends SubCommand {
|
|||
return;
|
||||
}
|
||||
|
||||
//Copied over while working on add button
|
||||
private void updatePoll(GuildMessageChannel channel, int rowId, String buttonName, Message message,
|
||||
InteractionHook hook) {
|
||||
EmbedBuilder firstEmbedBuilder = Util.getFirstEmbedBuilder(message);
|
||||
if (firstEmbedBuilder == null) {
|
||||
hook.editOriginalEmbeds(Util.genericErrorEmbed("Error", "Unable to get embed from poll message."))
|
||||
.queue();
|
||||
}
|
||||
message.editMessageEmbeds(firstEmbedBuilder.build());//TODO finish this
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpMessage() {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user