ds
This commit is contained in:
parent
2419033d09
commit
4a878d1b50
2 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue