    001package co.aikar.commands;
    002
    003import net.dv8tion.jda.core.JDA;
    004import org.jetbrains.annotations.NotNull;
    005
    006public class JDACommandManagerBuilder {
    007    private JDA jda;
    008    private CommandConfig defaultConfig = null;
    009    private CommandConfigProvider configProvider = null;
    010    private CommandPermissionResolver permissionResolver = null;
    011
    012    public JDACommandManagerBuilder(JDA jda) {
    013        this.jda = jda;
    014    }
    015
    016    public JDACommandManagerBuilder defaultConfig(@NotNull CommandConfig defaultConfig) {
    017        this.defaultConfig = defaultConfig;
    018        return this;
    019    }
    020
    021    public JDACommandManagerBuilder configProvider(@NotNull CommandConfigProvider configProvider) {
    022        this.configProvider = configProvider;
    023        return this;
    024    }
    025
    026    public JDACommandManagerBuilder permissionResolver(@NotNull CommandPermissionResolver permissionResolver) {
    027        this.permissionResolver = permissionResolver;
    028        return this;
    029    }
    030
    031    public JDACommandManager create() {
    032        return new JDACommandManager(jda, defaultConfig, configProvider, permissionResolver);
    033    }
    034}