internal static SocketSelfUser Create(DiscordSocketClient discord, ClientState state, Model model) { SocketSelfUser entity = new SocketSelfUser(discord, discord.GetOrCreateSelfUser(state, model)); entity.Update(state, model); return(entity); }
/// <inheritdoc /> public Task ModifyAsync(Action <SelfUserProperties> func, RequestOptions options = null) => SocketSelfUser.ModifyAsync(func, options);
/// <summary> /// Converts an existing <see cref="SocketSelfUser"/> to an abstracted <see cref="ISocketSelfUser"/> value. /// </summary> /// <param name="socketSelfUser">The existing <see cref="SocketSelfUser"/> to be abstracted.</param> /// <exception cref="ArgumentNullException">Throws for <paramref name="socketSelfUser"/>.</exception> /// <returns>An <see cref="ISocketSelfUser"/> that abstracts <paramref name="socketSelfUser"/>.</returns> public static ISocketSelfUser Abstract(this SocketSelfUser socketSelfUser) => new SocketSelfUserAbstraction(socketSelfUser);
/// <summary> /// Constructs a new <see cref="SocketSelfUserAbstraction"/> around an existing <see cref="WebSocket.SocketSelfUser"/>. /// </summary> /// <param name="socketSelfUser">The value to use for <see cref="WebSocket.SocketSelfUser"/>.</param> /// <exception cref="ArgumentNullException">Throws for <paramref name="socketSelfUser"/>.</exception> public SocketSelfUserAbstraction(SocketSelfUser socketSelfUser) : base(socketSelfUser) { }