v1.0.3 #370
1 changed files with 7 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ package com.bbn.hadder;
|
|||
|
||||
import com.bbn.hadder.core.Config;
|
||||
import com.rethinkdb.RethinkDB;
|
||||
import com.rethinkdb.gen.exc.ReqlNonExistenceError;
|
||||
import com.rethinkdb.gen.exc.ReqlOpFailedError;
|
||||
import com.rethinkdb.net.Connection;
|
||||
import org.json.JSONArray;
|
||||
|
|
@ -154,7 +155,12 @@ public class Rethink {
|
|||
}
|
||||
// TODO
|
||||
public boolean hasStarboardMessage(String message_id) {
|
||||
return this.getByID("stars", message_id, "guild") != null;
|
||||
try {
|
||||
this.getByID("stars", message_id, "guild");
|
||||
return true;
|
||||
} catch (ReqlNonExistenceError e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue