Tried doing some work on embed command
This commit is contained in:
parent
ba55956bbf
commit
0e3907645c
2
gradlew
vendored
2
gradlew
vendored
|
|
@ -72,7 +72,7 @@ case "`uname`" in
|
|||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
MSYS* | MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
|
|
|
|||
|
|
@ -57,4 +57,8 @@ public class AltitudeBot {
|
|||
public PermissionManager getPermissionManager() {
|
||||
return permissionManager;
|
||||
}
|
||||
|
||||
public JDA getJDA() {
|
||||
return jda;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
package com.alttd.commandManager.commands;
|
||||
|
||||
public class CommandEmbed {
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.alttd.commandManager.commands.embed;
|
||||
|
||||
import com.alttd.AltitudeBot;
|
||||
import com.alttd.commandManager.DiscordCommand;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.entities.TextChannel;
|
||||
import net.dv8tion.jda.api.entities.User;
|
||||
import net.dv8tion.jda.api.interactions.commands.OptionType;
|
||||
import net.dv8tion.jda.api.interactions.commands.build.CommandData;
|
||||
import net.dv8tion.jda.api.interactions.commands.build.SubcommandData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CommandEmbed extends DiscordCommand {
|
||||
|
||||
CommandEmbed() {
|
||||
CommandData commandData = new CommandData(getName(), "A command to create embeds for polls etc");
|
||||
commandData.setDefaultEnabled(false);
|
||||
commandData.addSubcommands(new SubcommandData("add", "Add a new embed to a channel")
|
||||
.addOption(OptionType.CHANNEL, "target",
|
||||
"The channel to send the new embed in", true)
|
||||
.addOption(OptionType.STRING, "type", "Either `poll` or `default`")
|
||||
.addOption(OptionType.STRING, "text", "The description for your poll, max 1000 characters"));
|
||||
|
||||
AltitudeBot.getInstance().getJDA().upsertCommand(commandData).queue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "embed";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String execute(String[] args, Member commandSource, TextChannel textChannel) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String execute(String[] args, User commandSource, TextChannel textChannel) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpMessage() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAliases() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user