Skip to content

Commit

Permalink
Add missing accessor methods to CommandClient
Browse files Browse the repository at this point in the history
Looks like I forgot to expose these. It's very useful when it comes to manual upsertion...
  • Loading branch information
Chew committed Jun 28, 2021
1 parent 68ceb6e commit 70fcb75
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,28 @@ public interface CommandClient
*/
List<Command> getCommands();

/**
* Returns the list of registered {@link com.jagrosh.jdautilities.command.SlashCommand SlashCommand}s
* during this session.
*
* @return A never-null List of Slash Commands registered during this session
*/
List<SlashCommand> getSlashCommands();

/**
* Returns whether manual upsertion is enabled
*
* @return The manual upsertion status
*/
boolean isManualUpsert();

/**
* Returns the forced Guild ID for automatic slash command upserts
*
* @return A possibly-null forcedGuildId set in the builder
*/
String forcedGuildId();

/**
* Gets the time this {@link com.jagrosh.jdautilities.command.CommandClient CommandClient}
* implementation was created.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,24 @@ public List<Command> getCommands()
return commands;
}

@Override
public List<SlashCommand> getSlashCommands()
{
return slashCommands;
}

@Override
public boolean isManualUpsert()
{
return manualUpsert;
}

@Override
public String forcedGuildId()
{
return forcedGuildId;
}

@Override
public OffsetDateTime getStartTime()
{
Expand Down

0 comments on commit 70fcb75

Please sign in to comment.