Пример #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);
 }
Пример #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)));
 }
Пример #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)));
 }