Esempio n. 1
0
 public DiscordNotify(DiscordRPC.Message.JoinRequestMessage args)
 {
     WidgetActive     = true;
     WidgetHasContent = true;
     InitializeComponent();
     requestInfo = args;
     SetInformation();
     timeout = new Timer(_ => RejectRequest(), null, 15000, 0);
 }
Esempio n. 2
0
    public void SetMessage(DiscordRPC.Message.JoinRequestMessage message)
    {
        this.message = message;
        this.user    = message.User;

        Debug.Log("Invite Received for " + message.User);

        //Update the username
        username.text = message.User.Username + "#" + message.User.Discriminator;

        //Update the avatar
        //user.CacheAvatar(this, size: DiscordAvatarSize.x128, callback: (u, texture) =>	//Old depreciated way of doing this
        user.GetAvatar(this, size: DiscordAvatarSize.x128, callback: (u, texture) =>                    //New way of doing this, with clearer function names
        {
            Debug.Log("Downloaded Texture for Invite");
            avatar.texture = texture;
        });

        //Set our ignore start time
        _ignoreStartTime      = Time.time;
        _incrementIgnoreTimer = true;
    }