// If you have guild defined
// eg, message.guild
guild.leave()
.catch(console.log) // If anything goes wrong
// Or,
client.guilds.cache.get("PUT_GUILD_ID_HERE").leave()
// If guild isn't cached
client.guilds.fetch("GUILD_ID")
.then(guild => guild.leave())