diff --git a/modules/mongo-wrappers/mongoConfigWrappers.mjs b/modules/mongo-wrappers/mongoConfigWrappers.mjs index 16e348e..cea0bb4 100644 --- a/modules/mongo-wrappers/mongoConfigWrappers.mjs +++ b/modules/mongo-wrappers/mongoConfigWrappers.mjs @@ -60,7 +60,7 @@ export const getGuildConfig = async (guildId, key) => { try { const config = await getDocumentByFields( collectionName, - ["guildId", guildId], + ["guild", Number(guildId)], ["key", key], ); log.DEBUG( @@ -82,7 +82,7 @@ export const setGuildConfig = async (guildId, key, value) => { const result = await upsertDocumentByFields( collectionName, value, - ["guildId", guildId], + ["guild", Number(guildId)], ["key", key], ); log.DEBUG(`Guild ${guildId} configuration for key "${key}" set:`, value); @@ -98,7 +98,7 @@ export const deleteGuildConfig = async (guildId, key) => { try { const result = await deleteDocumentByFields( collectionName, - ["guildId", guildId], + ["guild", Number(guildId)], ["key", key], ); log.DEBUG(