Skip to content

Commit

Permalink
Modified CommandPrivilege
Browse files Browse the repository at this point in the history
  • Loading branch information
TehZombiJesus committed Sep 6, 2021
1 parent 2755d3e commit a34895d
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

public class RoleCommand extends CommandModule {

private final DefinedQuery<Role> STAFF_ROLE = new DefinedQuery<Role>() {
private final DefinedQuery<Role> STAFF_ROLES = new DefinedQuery<Role>() {
@Override
protected Query<Role> newQuery() { return bot.getRoles("Staff"); }
protected Query<Role> newQuery() {
return bot.getRoles("Senior Supporter", "Assistant", "Developer", "\uD83D\uDCBB Coding Wizard");
}
};

private final ArrayList<String> SENIOR_SUPPORTER_ROLES = new ArrayList<String>() {{
Expand Down Expand Up @@ -97,7 +99,7 @@ public String getDescription() {
@Override
public CommandPrivilege[] getCommandPrivileges() {
return new CommandPrivilege[] {
CommandPrivilege.enable(STAFF_ROLE.query().first())
CommandPrivilege.enable(STAFF_ROLES.query().first())
};
}

Expand Down Expand Up @@ -142,9 +144,9 @@ public void onCommand(TextChannel channel, Member m, SlashCommandEvent e) {
if(m.equals(member)) {
e.replyEmbeds(
new TechEmbedBuilder("Role Management - Error")
.error()
.text("You can't edit your own roles!")
.build()
.error()
.text("You can't edit your own roles!")
.build()
).queue();
return;
}
Expand All @@ -158,8 +160,8 @@ public void onCommand(TextChannel channel, Member m, SlashCommandEvent e) {
).queue();

RoleLogs.log(
new TechEmbedBuilder("Role Removed")
.error().text("Removed " + role.getAsMention() + " from " + member.getAsMention())
new TechEmbedBuilder("Role Removed")
.error().text("Removed " + role.getAsMention() + " from " + member.getAsMention())
);
} else {
TechDiscordBot.getGuild().addRoleToMember(member, role).complete();
Expand Down

0 comments on commit a34895d

Please sign in to comment.