Ejemplo n.º 1
0
 public static void updateIDDB(shocky3.Plugin plugin) {
   DBCollection dbc =
       plugin.botApp.collection(String.format("%s.Settings", plugin.pinfo.internalName()));
   dbc.update(
       JSONUtil.toDBObject(new JSONObject()),
       JSONUtil.toDBObject(JSONObject.make("nextID", nextID)),
       true,
       false);
 }
Ejemplo n.º 2
0
 public static void removeDB(shocky3.Plugin plugin, Tell tell) {
   DBCollection dbc = plugin.botApp.collection(plugin.pinfo.internalName());
   dbc.remove(JSONUtil.toDBObject(JSONObject.make("tellid", tell.id)));
 }
Ejemplo n.º 3
0
 public static void writeDB(shocky3.Plugin plugin, Tell tell) {
   DBCollection dbc = plugin.botApp.collection(plugin.pinfo.internalName());
   removeDB(plugin, tell);
   dbc.insert(JSONUtil.toDBObject(write(tell)));
 }