private void Start() { // Create a new discord setup discord = new Discord.Discord(ClientID, (System.UInt64)Discord.CreateFlags.NoRequireDiscord); // Set the activity manager activityManager = discord.GetActivityManager(); // Invoke activity updates InvokeRepeating("UpdateActivity", 0.0f, 5.0f); }
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(); }
public DiscordLobbyManager(DiscordIntegrationClient integrationClient) { _connectedLobbies = new Dictionary <long, DiscordLobby>(); _integrationClient = integrationClient; var client = _integrationClient._discordClient; _lobbyManager = client.GetLobbyManager(); _activityManager = client.GetActivityManager(); _lobbyManager.OnNetworkMessage += OnNetworkMessage; _lobbyManager.OnLobbyMessage += OnLobbyMessage; _lobbyManager.OnLobbyUpdate += OnLobbyUpdate; _lobbyManager.OnMemberConnect += OnMemberConnect; _lobbyManager.OnMemberDisconnect += OnMemberDisconnect; _lobbyManager.OnMemberUpdate += OnMemberUpdate; }
// 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(); }
void Awake() { if (alreadyRunning) { Destroy(this); return; } alreadyRunning = true; discord = new Discord.Discord(600379630427570226, (System.UInt64)Discord.CreateFlags.Default); activityManager = discord.GetActivityManager(); Discord.Activity activity = new Discord.Activity { Details = "Main Menu", Assets = { LargeImage = "icon", LargeText = "Mein cooles Logo", }, }; activityManager.UpdateActivity(activity, (res) => { }); DontDestroyOnLoad(this); }
void GetActivity() { discord = new Discord.Discord(671023511539810305, (System.UInt64)Discord.CreateFlags.Default); activityManager = discord.GetActivityManager(); }
void Start() { _discord = new Discord.Discord(CLIENT_ID, (UInt64)Discord.CreateFlags.Default); _discordActivity = _discord.GetActivityManager(); UpdateActivity(GetDefaultActivity()); }
private void Start() { discord = new Discord.Discord(834754357056634880, (UInt64)Discord.CreateFlags.Default); activityManager = discord.GetActivityManager(); UpdatePresence(); }