Cool beans, registers for bot profile when linked if it didn't already exist.
This commit is contained in:
parent
7b51e481a9
commit
c024e6fa9d
@ -2399,6 +2399,26 @@ public class delegationServices {
|
|||||||
dCollection.updateOne(searchQuery, updateQuery4);
|
dCollection.updateOne(searchQuery, updateQuery4);
|
||||||
secureCalls.accountLinked(Email, platform, UserName);
|
secureCalls.accountLinked(Email, platform, UserName);
|
||||||
delegationTimer.DeleteTargetRequestByID(Lrequest.get("_id"));
|
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 {
|
} else {
|
||||||
System.out.println("Already linked");
|
System.out.println("Already linked");
|
||||||
@ -2595,6 +2615,7 @@ public class delegationServices {
|
|||||||
BasicDBObject clearCL = new BasicDBObject();
|
BasicDBObject clearCL = new BasicDBObject();
|
||||||
clearCL.append("_id", ClientID);
|
clearCL.append("_id", ClientID);
|
||||||
delegationTimer.DeleteTargetRequestByID(Lrequest.get("_id"));
|
delegationTimer.DeleteTargetRequestByID(Lrequest.get("_id"));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
BasicDBObject searchQuery = new BasicDBObject();
|
BasicDBObject searchQuery = new BasicDBObject();
|
||||||
searchQuery.append("_id", ClientID);
|
searchQuery.append("_id", ClientID);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user