From d7ba5edbf5b8da6ef25447dfb8c48bde873db4d5 Mon Sep 17 00:00:00 2001 From: Daniel Bereza Date: Wed, 1 Apr 2020 17:02:07 -0700 Subject: [PATCH] Changes tempacts to use guild ID for storage instead of guild owner ID --- BotCatMaxy/Data.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/BotCatMaxy/Data.cs b/BotCatMaxy/Data.cs index 90fc7d1..9b6a45a 100644 --- a/BotCatMaxy/Data.cs +++ b/BotCatMaxy/Data.cs @@ -59,11 +59,8 @@ public static IMongoCollection GetInfractionsCollection(this IGuil public static IMongoCollection GetActHistoryCollection(this IGuild guild, bool createDir = true) { var db = MainClass.dbClient.GetDatabase("ActHistory"); var guildCollection = db.GetCollection(guild.Id.ToString()); - var ownerCollection = db.GetCollection(guild.OwnerId.ToString()); - if (guildCollection.CountDocuments(new BsonDocument()) > 0) { + if (guildCollection.CountDocuments(new BsonDocument()) > 0 || createDir) { return guildCollection; - } else if (ownerCollection.CountDocuments(new BsonDocument()) > 0 || createDir) { - return ownerCollection; } return null;