title: Programming Discord Bot to link twitch account
body: <p>Im trying to figure out how to make it so that when a user in my discord server types "!link " they can link their account and have their name changed to their account name automatically</p>
  
  <p>This is for a discord streaming community im starting up, this runs Javascript, I am in a bit of a road block trying to figure this out </p>
  
  <pre><code>$.getJSON('https://api.twitch.tv/kraken/streams/' + YOUR_CHANNEL_NAME, function(channel) {
  
    if (channel["stream"] == null) {
  
    } else {
  
  
  
    }
  
  
  
  });
  
  </code></pre>
  
  <p>I still need the command which i haven't quite figured out yet either</p>
  
  <p>I want users in my discord to link their twitch accounts using a command like this "!link "</p>