Can't get 'uses' property on fetched invites

Trying to get all the invites from the guild
import { Guild } from 'discord.js';
import { client } from '../client';
import fs from 'node:fs';

export const fetchInvites = async (guild: Guild): Promise<void> => {
  const inv = await guild.invites.fetch();
  fs.writeFile('invites.json', JSON.stringify(inv), (err) => {
    if (err) console.log(err);
  });
  console.log('Invites cached');
};


Invite objects with the 'uses' counter are expected to be received, but none of them have it at all
image.png
Was this page helpful?