public void Start() { const long ClientID = 682703198330421250; thisDiscord = new Discord.Discord(ClientID, (System.UInt64)Discord.CreateFlags.Default); userManager = thisDiscord.GetUserManager(); activityManager = thisDiscord.GetActivityManager(); appManager = thisDiscord.GetApplicationManager(); UpdateActivity(); }
// Called when the node enters the scene tree for the first time. public override void _Ready() { //GetTree().SetAutoAcceptQuit(false); rng = new Random(); const long CLIENT_ID = 499069912048992271; discord_instance = new Discord.Discord(CLIENT_ID, (System.UInt64)Discord.CreateFlags.Default); userManager = discord_instance.GetUserManager(); activityManager = discord_instance.GetActivityManager(); appManager = discord_instance.GetApplicationManager(); appManager.GetOAuth2Token((Discord.Result result, ref Discord.OAuth2Token oauth2Token) => { GD.Print(result); GD.Print('"' + oauth2Token.AccessToken + '"'); accessToken = oauth2Token.AccessToken; }); UpdateActivity(); }