Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldmensch committed Jan 5, 2025
1 parent af2d834 commit 20fb5fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@

import java.util.Collection;


/// The main entry point of the JDA-Commands framework. This class includes methods to manage the overall framework
/// while running.
///
/// Instances of this class can be created by using one of the "start" or "builder" methods.
public final class JDACommands {
private static final Logger log = LoggerFactory.getLogger(JDACommands.class);
private final JDAContext jdaContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.github.kaktushose.jda.commands.permissions.PermissionsProvider;
import com.github.kaktushose.jda.commands.scope.DefaultGuildScopeProvider;
import com.github.kaktushose.jda.commands.scope.GuildScopeProvider;
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.interactions.commands.localization.LocalizationFunction;
import net.dv8tion.jda.api.interactions.commands.localization.ResourceBundleLocalizationFunction;
import net.dv8tion.jda.api.sharding.ShardManager;
Expand Down Expand Up @@ -56,18 +55,14 @@ public class JDACommandsBuilder {
this.context = Objects.requireNonNull(context);
}

public JDACommandsBuilder jda(JDA jda) {
this.context = new JDAContext(jda);
return this;
}

/// Adds instanced of [ClassFinder] to the later used collection
/// @param classFinders The [ClassFinder]s to be added
public JDACommandsBuilder classFinders(ClassFinder... classFinders) {
this.classFinders.addAll(Arrays.asList(classFinders));
return this;
}

/// @param descriptor the [Descriptor] to be used
public JDACommandsBuilder descriptor(Descriptor descriptor) {
this.descriptor = descriptor;
return this;
Expand Down

0 comments on commit 20fb5fc

Please sign in to comment.