use of com.github.vaerys.commands.setup.SetupNext in project DiscordSailv2 by Vaerys-Dawn.
the class CommandInit method getSetupCommands.
public static ArrayList<Command> getSetupCommands() {
ArrayList<Command> commands = new ArrayList<>();
// step 1
commands.add(new Module());
commands.add(new HelpModules());
// step 2
commands.add(new Toggle());
commands.add(new HelpSettings());
// Setup Traversal Commands
commands.add(new SetupBack());
commands.add(new SetupNext());
commands.add(new SetupQuit());
commands.add(new SetupRepeat());
validate(commands);
return commands;
}
use of com.github.vaerys.commands.setup.SetupNext in project DiscordSailv2 by Vaerys-Dawn.
the class SetupWizard method execute.
@Override
public String execute(String args, CommandObject command) {
if (SetupHandler.isRunningSetup(command.guild)) {
return "> Setup is already running for this guild. I can't run it twice!";
}
// user can only run setup for one guild at a time
UserObject user = command.user;
for (GuildObject guildObject : Globals.getGuilds()) {
if (guildObject.config.setupUser == user.longID) {
return "> You're running setup for a different guild. I can't do more than one at a time.";
}
}
// Handle Setup beginning
String message = "Hi! I'm " + command.client.bot.displayName + " and I'm here to help you get your server set up.\n" + "This guide will walk you through a bunch of commands and things you can do to make your server exactly the way you want it.\n\n" + "You can navigate forwards and backwards in this setup with **" + new SetupBack().getUsage(command) + "** and **" + new SetupNext().getUsage(command) + "**";
if (command.user.sendDm(message) == null) {
return "> **ERROR**: I wasn't able to send you a DM! Check your server privacy settings!";
}
// send first setup stage response
SetupHandler.setSetupStage(command, SetupStage.SETUP_MODULES);
return "> Check your DMs for more instructions.";
}
Aggregations