Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 /// <inheritdoc />
 public Task ModifyAsync(Action <SelfUserProperties> func, RequestOptions options = null)
 => SocketSelfUser.ModifyAsync(func, options);
Exemplo n.º 3
0
 /// <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);
Exemplo n.º 4
0
 /// <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)
 {
 }