diff --git a/src/cache.ts b/src/cache.ts index 8ef91e4e6..3f8baa146 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -87,12 +87,11 @@ export function createCache( activeGuildIds: new Set(), executedSlashCommands: new Set(), fetchAllMembersProcessingRequests: new Map(), + execute: async function () { + throw new Error("Async Cache requires a custom execute function to be implemented."); + } } as AsyncCache; - cache.execute = async function () { - throw new Error("Async Cache requires a custom execute function to be implemented."); - }; - return cache; } if (!options.tableCreator) options.tableCreator = createTable;