Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
1A3Dev committed Dec 19, 2023
1 parent 7c3999c commit 9f1c44d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
public class EffCommandPermission extends Effect {
static {
Vixio.getInstance().registerEffect(EffCommandPermission.class,
"(allow|1¦deny|2¦reset) %roles/users/members% access to %string% in %guild% [with %bot/string%]")
"(allow|1¦deny|2¦reset) %roles/users/members% access to %string% in %guild% [with %bot/string%]")
.setName("Command Permission in Guild")
.setDesc("Allow, or deny a role or a member permissions to a command")
.setExample(
Expand Down Expand Up @@ -61,7 +61,7 @@ protected void execute(Event e) {
Optional<Command> cmdOpt = cmdList.stream().filter(c -> c.getName().equals(cmdName)).findFirst();
// Global Commands
if(!cmdOpt.isPresent()) {
cmdList = bot.getJDA().getShardById(0).retrieveCommands().complete();
cmdList = bot.getJDA().retrieveCommands().complete();
cmdOpt = cmdList.stream().filter(c -> c.getName().equals(cmdName)).findFirst();
}
if(cmdOpt.isPresent()) {
Expand Down

0 comments on commit 9f1c44d

Please sign in to comment.