title: Connecting Discord Bot with LuaSocket
body: <p>I'm trying to send a message on my Discord Bot using Lua, but I literally have no knowledge where to start.</p>
  <p>Here is my current source code:</p>
  <pre class="lang-lua prettyprint-override"><code>local socket = require(&quot;socket&quot;)
  local host = &quot;wss://gateway.discord.gg/?v=10&amp;encoding=json&quot;
  
  local res, err = socket.connect(host, 6473);
  print(res, err)
  
  </code></pre>
  <p>Executing the code returns null and the error of <code>host or service not provided, or not known</code>.<br>
  Was the url or port is wrong, perhaps It's not the correct way to connect through a url using <a href="https://w3.impa.br/%7Ediego/software/luasocket/home.html" rel="nofollow noreferrer">Luasocket</a>?</p>