Cool beans, registers for bot profile when linked if it didn't already exist.

This commit is contained in:
James Quinley 2023-05-05 20:47:33 -07:00
parent 7b51e481a9
commit c024e6fa9d

View File

@ -2399,6 +2399,26 @@ public class delegationServices {
dCollection.updateOne(searchQuery, updateQuery4);
secureCalls.accountLinked(Email, platform, UserName);
delegationTimer.DeleteTargetRequestByID(Lrequest.get("_id"));
//Make social credit profile if it doesn't exist
if (platform.equals("Discord")) {
Document user = scCollection.find(eq("User", id)).first();
if (user == null)
{ Document document = new Document();
document.append("User", id);
document.append("UserFreindly", accountServer.get("User").toString());
document.append("Credits", 1000);
document.append("npTH","0");
document.append("controlVAR", 0);
document.append("wordRC",3);
document.append("banUntil",3);
document.append("npMUTE", false);
scCollection.insertOne(document);
System.out.println("Created a profile with Obsidian Core Bot Services.");
} else {
System.out.println("User already registered with bot..");
}
}
} else {
System.out.println("Already linked");
@ -2595,6 +2615,7 @@ public class delegationServices {
BasicDBObject clearCL = new BasicDBObject();
clearCL.append("_id", ClientID);
delegationTimer.DeleteTargetRequestByID(Lrequest.get("_id"));
} else {
BasicDBObject searchQuery = new BasicDBObject();
searchQuery.append("_id", ClientID);