title: Invoking HTML code within discord using JavaScript / VB.Net
body: <p>My problem is simple, I'm trying to wright and send text to a person or server using <em>java-script</em> or <em>.Net</em>. Normally when I do this on sites, you can simply invoke the script and enter text inside. For example, the script bellow will enter text in the youtube search box.</p>
  
  <pre><code>Form2.WebBrowser1.Document.GetElementById("search_query").SetAttribute("value", TextBox1.Text)
  </code></pre>
  
  <p>The script bellow will input text in the discord response box but will immediately disappear. Even when changing the values manually in the html explorer then clicking on the response bar to enter it will cause the text to disappear or revert back to what it was originally.</p>
  
  <pre><code>Dim elements2 = Form2.WebBrowser1.Document.GetElementsByTagName("textarea")
  For Each element As HtmlElement In elements2
      If element.GetAttribute("className") = "textArea-2Spzkt textArea-2Spzkt scrollbarGhostHairline-1mSOM1 scrollbar-3dvm_9" Then
          element.Focus()
          element.SetAttribute("value", TextBox1.Text)
      End If
  Next
  </code></pre>
  
  <p><strong>RaW HTML:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/uK1t5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uK1t5.png" alt="enter image description here"></a></p>
  
  <p>From looking around, it appears that discord has javascript that can properly invoke the textbox? I'm a little lost on how to approach this to get a working result. If the solution is a javascript I will take that as a respected response too. Any pointers is much appreciated!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I found this javascript to be able to change the text within the response box, but agian, it disappears/reverts once you click on the textbox to send it.</p>
  
  <pre><code>document.getElementsByClassName("textArea-2Spzkt textArea-2Spzkt scrollbarGhostHairline-1mSOM1 scrollbar-3dvm_9").item("textContent").value="hello"
  </code></pre>