stats channels
diff --git a/src/utils/database.ts b/src/utils/database.ts
index c0ae9be..5b1d6d9 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -63,8 +63,13 @@
}
}
- async remove(guild: string, key: string, value: any) {
- if (Array.isArray(value)) {
+ async remove(guild: string, key: string, value: any, innerKey?: string) {
+ if (innerKey) {
+ await this.guilds.updateOne({ id: guild }, {
+ $pull: { [key]: { [innerKey]: { $eq: value } } }
+ }, { upsert: true });
+ }
+ else if (Array.isArray(value)) {
await this.guilds.updateOne({ id: guild }, {
$pullAll: { [key]: value }
}, { upsert: true });
@@ -200,11 +205,7 @@
channel: string | null,
message: string | null,
}
- stats: {
- enabled: boolean,
- channel: string | null,
- text: string | null,
- }[]
+ stats: {}
logging: {
logs: {
enabled: boolean,