Inherits
Object
Class Client
Represents a connection to the client
Constructors
Client()
Initializes a new instance of the Client class.
Declaration
public Client();
Fields
token
Authentication token
Declaration
public string token;
Field Value
Type | Description |
---|---|
String | Authentication token for the account or Application. |
Properties
Users
Gets a list of all the visible users.
Declaration
public User[] Users {get; }
Property Value
Type | Description |
---|---|
User[] | Array containing all users the ClientUser can see. |
Methods
Login(System.String)
Logs in to the API
Declaration
public bool Login(string token)
Parameters
Type | Name | Description |
---|---|---|
String | token | The authentication token to use for login. |
Returns
Type | Description |
---|---|
Boolean | true if login was successful, false otherwise. |
GetGuild(System.Int32)
Gets a Guild with the specified id.
Declaration
public Guild GetGuild(int guildId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | guildId | The unique id of the guild. |
Returns
Type | Description |
---|---|
Guild | The guild found, or null . |
GetUser(System.Int32)
Gets a User with the specified id.
Declaration
public User GetUser(int userId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | userId | The unique id of the user. |
Returns
Type | Description |
---|---|
User | The user found, or null . |
Events
OnMessageReceived
Event received every time a Message is received on any Channel the client sees.
Declaration
public event OnMessageHandler OnMessageReceived
Event Handler
OnMessageHandler