v1.0.3 #370

Merged
greg6775 merged 18 commits from greg-dev into master 2020-02-15 14:37:33 +01:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 4a878d1b50 - Show all commits

View file

@ -27,7 +27,6 @@ import org.json.JSONObject;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
public class Rethink { public class Rethink {
private RethinkDB r = RethinkDB.r; private RethinkDB r = RethinkDB.r;
private Connection conn; private Connection conn;
@ -191,5 +190,4 @@ public class Rethink {
} }
r.table("user").get(user.getId()).update(object.toMap()).run(conn); r.table("user").get(user.getId()).update(object.toMap()).run(conn);
} }
} }

View file

@ -20,13 +20,17 @@ import com.bbn.hadder.commands.Command;
import com.bbn.hadder.commands.CommandEvent; import com.bbn.hadder.commands.CommandEvent;
import com.bbn.hadder.core.Perm; import com.bbn.hadder.core.Perm;
import com.bbn.hadder.core.Perms; import com.bbn.hadder.core.Perms;
import com.bbn.hadder.utils.MessageEditor;
import net.dv8tion.jda.api.Permission;
@Perms(Perm.MANAGE_ROLES) @Perms(Perm.MANAGE_ROLES)
public class RoleAssignmentCommand implements Command { public class RoleAssignmentCommand implements Command {
@Override @Override
public void executed(String[] args, CommandEvent e) { public void executed(String[] args, CommandEvent e) {
if (e.getGuild().getSelfMember().hasPermission(Permission.MANAGE_ROLES)) {
} else e.getTextChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.NO_SELF_PERMISSION).build()).queue();
} }
@Override @Override