title: Is there a way to check if discord bot joins a server?
body: <p>I'm making a discord bot and I want to check if it joins a server so I can set prefixes, send messages etc.<br>
  I tried searching for this but I didn't find anything that could help.</p>
  
  <p>I thought it could be an event so tried something like:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>client.on('join_guild', (guild) =&gt; {
      prefix = "!"
  });
  </code></pre>
  
  <p>But, of course, it didn't work.</p>
  
  <p>Is there something like the code shown above?</p>