title: How to get ID from guild.fetch in discord.js v12?
body: <p>I'm trying to get the Guild id when my bot joins the Discord server for the first time. I need the ID so the bot can automatically set up the roles.</p>
  <p>I'm using the <a href="https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=e-guildCreate" rel="nofollow noreferrer"><code>guildCreate</code></a> event, and inside the event, I'm using <a href="https://discord.js.org/#/docs/main/stable/class/Guild?scrollTo=fetch" rel="nofollow noreferrer"><code>guild.fetch()</code></a> to read the data of the collection. Now I only want the value of the <code>id</code>, how do I accomplish that?</p>
  <p>Output of <code>guild.fetch()</code>:</p>
  <pre><code>Guild {
    members: GuildMemberManager {
      cacheType: [Function: Collection],
      cache: Collection(3) [Map] {
        '36489644504160xxxx' =&gt; [GuildMember],
        '53517224246470xxxx' =&gt; [GuildMember],
        '53522344090743xxxx' =&gt; [GuildMember]
      },
      guild: [Circular *1]
    },
    channels: GuildChannelManager {
      cacheType: [Function: Collection],
      cache: Collection(4) [Map] {
        '71558241555944xxxx' =&gt; [CategoryChannel],
        '71558241555944xxxx' =&gt; [CategoryChannel],
        '71558241555944xxxx' =&gt; [TextChannel],
        '71558241555944xxxx' =&gt; [VoiceChannel]
      },
      guild: [Circular *1]
    },
    roles: RoleManager {
      cacheType: [Function: Collection],
      cache: Collection(5) [Map] {
        '71258641511471xxxx' =&gt; [Role],
        '75251159040894xxxx' =&gt; [Role],
        '75253768894955xxxx' =&gt; [Role],
        '75295113917353xxxx' =&gt; [Role],
        '75270698461845xxxx' =&gt; [Role]
      },
      guild: [Circular *1]
    },
    presences: PresenceManager {
      cacheType: [Function: Collection],
      cache: Collection(3) [Map] {
        '36489644504160xxxx' =&gt; [Presence],
        '52517224246470xxxx' =&gt; [Presence],
        '52522344090743xxxx' =&gt; [Presence]
      }
    },
    voiceStates: VoiceStateManager {
      cacheType: [Function: Collection],
      cache: Collection(0) [Map] {},
      guild: [Circular *1]
    },
    deleted: false,
    name: &quot;attrib's server&quot;,
    icon: null,
    splash: null,
    discoverySplash: null,
    region: 'europe',
    memberCount: 3,
    large: false,
    features: [],
    applicationID: null,
    afkTimeout: 300,
    afkChannelID: null,
    systemChannelID: '71558641555944xxxx',
    embedEnabled: false,
    premiumTier: 0,
    premiumSubscriptionCount: 0,
    verificationLevel: 'NONE',
    explicitContentFilter: 'DISABLED',
    mfaLevel: 0,
    joinedTimestamp: 1600721822100,
    defaultMessageNotifications: 'ALL',
    systemChannelFlags: SystemChannelFlags { bitfield: 0 },
    maximumMembers: 250000,
    vanityURLCode: null,
    vanityURLUses: null,
    description: null,
    banner: null,
    id: '71558641511471xxxx',
    available: true,
    etc...
  </code></pre>