I'm trying to make a command, where I can get every guild invite that the bot is currently in
var invite = interaction.guild.invites.create(interaction.channel,{maxAge: 0}); interaction.channel.send(invite.code);
Use this, for discord.js v13!
Replace interaction with var ex. msg (var on command method constructor)