title: How to set server specific variables on a discord bot?
body: <p>So, I'm creating a discord bot using node.js. I need help making server specific variables (that cant be used on other servers or could be differnet)</p>
  
  <p>I searched for something and the only result was to track my variables by guild id. The problem is it uses 'message.guild.id' so that means i can't use it before checking for messages.</p>
  
  <p>This is how the code to setting the prefix should look:</p>
  
  <pre><code>function setPrefix(message, arguments){
      prefix[message.guild.id] = arguments
  }
  </code></pre>
  
  <p>And this is how I wanted to set it at the start of the code:</p>
  
  <pre><code>prefix = {}
  prefix[guild.id] = "@"
  </code></pre>
  
  <p>I tried it, but, of course, i can't get the guild id like that so it would be undefined every time i tried. What could I do? (please note im not very experienced)</p>