message: executedSlashCommands -> unrepliedSlashCommands
diff: @@ -68,12 +68,14 @@ export function createCache(
  tableCreator?: (bot: Bot, tableName: TableNames) => CacheHandler<any> | AsyncCacheHandler<any>;
  }
  ): Omit<Cache, "execute"> | Omit<AsyncCache, "execute"> {
  + let cache: Cache | AsyncCache;
  +
  if (options.isAsync) {
  if (!options.tableCreator) {
  throw new Error("Async cache requires a tableCreator to be passed.");
  }
  - const cache = {
  + cache = {
  guilds: options.tableCreator(bot, "guilds"),
  users: options.tableCreator(bot, "users"),
  members: options.tableCreator(bot, "members"),
  @@ -85,18 +87,16 @@ export function createCache(
  dispatchedGuildIds: options.tableCreator(bot, "dispatchedGuildIds"),
  dispatchedChannelIds: options.tableCreator(bot, "dispatchedChannelIds"),
  activeGuildIds: options.tableCreator(bot, "activeGuildIds"),
  - executedSlashCommands: new Set(),
  + unrepliedSlashCommands: new Set<bigint>(),
  fetchAllMembersProcessingRequests: new Map(),
  execute: async function () {
  throw new Error("Async Cache requires a custom execute function to be implemented.");
  },
  } as AsyncCache;
  -
  - return cache;
  - }
  + } else {
  if (!options.tableCreator) options.tableCreator = createTable;
  - const cache = {
  + cache = {
  guilds: options.tableCreator(bot, "guilds"),
  users: options.tableCreator(bot, "users"),
  members: options.tableCreator(bot, "members"),
  @@ -108,11 +108,22 @@ export function createCache(
  dispatchedGuildIds: new Set(),
  dispatchedChannelIds: new Set(),
  activeGuildIds: new Set(),
  - executedSlashCommands: new Set(),
  + unrepliedSlashCommands: new Set<bigint>(),
  fetchAllMembersProcessingRequests: new Map(),
  } as Cache;
  cache.execute = createExecute(cache);
  + }
  +
  + setInterval(() => {
  + let values = cache.unrepliedSlashCommands.values();
  + let now = Date.now();
  + for (let val; (val = values.next().value); ) {
  + if ((val >> 22n) + 1420071300000n < now) {
  + cache.unrepliedSlashCommands.delete(val);
  + }
  + }
  + }, 300000);
  return cache;
  }
  @@ -131,7 +142,7 @@ export interface Cache {
  dispatchedGuildIds: Set<bigint>;
  dispatchedChannelIds: Set<bigint>;
  activeGuildIds: Set<bigint>;
  - executedSlashCommands: Set<string>;
  + unrepliedSlashCommands: Set<bigint>;
  fetchAllMembersProcessingRequests: Map<string, Function>;
  execute: CacheExecutor;
  }
  @@ -154,7 +165,7 @@ export interface AsyncCache {
  dispatchedGuildIds: AsyncCacheHandler<bigint>;
  dispatchedChannelIds: AsyncCacheHandler<bigint>;
  activeGuildIds: AsyncCacheHandler<bigint>;
  - executedSlashCommands: Set<string>;
  + unrepliedSlashCommands: Set<bigint>;
  fetchAllMembersProcessingRequests: Map<string, Function>;
  execute: CacheExecutor;
  }
  