{"size": 714, "ext": "js", "max_stars_repo_path": "package/functions/funcs/cacheMembers.js", "max_stars_repo_name": "Jiwon0001/aoi.js", "max_stars_repo_stars_event_min_datetime": "2021-09-29T22:14:40.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-29T22:14:40.000Z", "max_issues_repo_path": "package/functions/funcs/cacheMembers.js", "max_issues_repo_name": "Jiwon0001/aoi.js", "max_issues_repo_issues_event_min_datetime": "2021-09-13T04:47:32.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-13T04:47:32.000Z", "max_forks_repo_path": "package/functions/funcs/cacheMembers.js", "max_forks_repo_name": "Jiwon0001/aoi.js", "max_forks_repo_forks_event_min_datetime": "2021-10-03T17:15:02.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-03T17:15:02.000Z"}
{"max_stars_count": 1, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 26.4444444444, "max_line_length": 75, "alphanum_fraction": 0.6344537815}
module.exports = async (d) => {
  const code = d.command.code;

  const r = code.split("$cacheMembers").length - 1;
  const inside = code.split("$cacheMembers")[r].after();

  const [guildID = d.message.guild.id, returnCount = "no"] = inside.splits;
  const guild = d.client.guilds.cache.get(guildID);

  if (!guild)
    return d.error(`\`${d.func}: Invalid guildID in ${inside.total}\``);

  const prev = guild.members.cache.size;

  if (guild.members.cache.size !== guild.memberCount)
    await guild.members.fetch();

  const aft = guild.members.cache.size;

  return {
    code: code.replaceLast(
      `$cacheMembers${inside.total}`,
      returnCount.toLowerCase() === "yes" ? aft - prev : ""
    ),
  };
};
