Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity Aplication with discord

Discussion in 'Scripting' started by Kajoken, Feb 13, 2021.

  1. Kajoken

    Kajoken

    Joined:
    Nov 5, 2016
    Posts:
    2
    I would like to ask if it is possible or how difficult it would be to create a program that would display on the desktop, for example, characters that would display texts written by Discord users in order to show what I mean. Let me give you an example of youtuber "Vimlark" who shows on the screen small monkeys writing and representing characters from twitch chat.Any advice on what to look for and which way to go would be a great help.Thank you in advance
     

    Attached Files:

    • 123.png
      123.png
      File size:
      1.1 MB
      Views:
      305
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,756
    Check if discord supports unity integration. If it does, use that. If it does not, then it will be some type of web API and you would need to learn how to use it first.

    Once you unerstand how to use that web API, then you could write code to use it in Unity, almost certainly by using the UnityWebRequest() class.
     
    Joe-Censored likes this.
  3. Kajoken

    Kajoken

    Joined:
    Nov 5, 2016
    Posts:
    2
    Thank you very much and these are the concepts I am start learning about from today :D
     
  4. Cyber-Dog

    Cyber-Dog

    Joined:
    Sep 12, 2018
    Posts:
    352
    Of the back of Kurts message...

    This is the API you are after. You can use that to get message objects, and those message objects will have the associated user ID. From their you can do even more with other web requests...
    https://discord.com/developers/docs/resources/channel#get-channel-messages

    You will also need to work out the authentication side of things. It looks like OAuth2 is of the table as that requires redirects, and unity cant interact with the web browser. So Look into "Implicit Grant" that may be what your after.

    Im guessing your new to APIs, as you would not have asked this question.. So here are some helpful tips to get yourself started.
    • Use an application called Postman to test your API calls prior to building them.
    • Use an online converter to help define your C# classes for returns on your web requests. Will save allot of headaches. https://jsonutils.com/
    • Use Newtonsoft JSON library instead of Unity's built in library.

    Good luck!
     
    Kurt-Dekker likes this.