#19 fix guild specific configs
All checks were successful
release-tag / release-image (push) Successful in 2m24s
Lint JavaScript/Node.js / lint-js (push) Successful in 12s
DRB Tests / drb_mocha_tests (push) Successful in 34s

- Fixed the guild key
- forced guild ID to be a number
This commit is contained in:
Logan Cusano
2024-08-17 17:35:20 -04:00
parent 46989942d8
commit 0be5b059da

View File

@@ -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(