Ejemplo n.º 1
0
    /// <summary>
    /// Gets the default avatar for the given user. Will check the cache first, and if none are available it will then download the default from discord.
    /// <para>An alias of <see cref="DiscordUser.CacheDefaultAvatarCoroutine(DiscordAvatarSize, DiscordUser.AvatarDownloadCallback)"/> and will return the new <see cref="DiscordUser"/> instance in the callback.</para>
    /// </summary>
    /// <param name="size">The size of the target avatar</param>
    /// <param name="callback">The callback that will be made when the picture finishes downloading.</param>
    /// <returns></returns>
    public static IEnumerator GetDefaultAvatarCoroutine(this DiscordRPC.User user, DiscordAvatarSize size = DiscordAvatarSize.x128, DiscordUser.AvatarDownloadCallback callback = null)
    {
        var du = new DiscordUser(user);

        return(du.GetDefaultAvatarCoroutine(size, callback));
    }