Constructor
new Client(options)
Parameters:
Name | Type | Description | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | The options for the client
Properties
|
- Source:
Members
channels :Map
Type:
- Map
- Source:
info :Object
Type:
- Object
- Source:
supported :Object
Information about what the server supports
Type:
- Object
- Source:
Methods
addCTCP(name, value)
Adds a CTCP response to the client
Parameters:
Name | Type | Description |
---|---|---|
name |
String | The ctcp command |
value |
String | What to respond with |
- Source:
connect(address, port)
Connects to a server
Parameters:
Name | Type | Default | Description |
---|---|---|---|
address |
String | null | The address of the server to connect to |
port |
Number | 6667 | The port to connect to |
- Source:
disconnect()
Disconnects from the server
- Source:
join(…channel)
Joins channels
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
channel |
String |
<repeatable> |
The channel to join |
- Source:
mode(mode)
Updates the modes of the client
Parameters:
Name | Type | Description |
---|---|---|
mode |
String | What modes to update |
- Source:
notice(nick, message)
Sends a notice to a user
Parameters:
Name | Type | Description |
---|---|---|
nick |
String | The nick of the user to send the message to |
message |
String | The message to send |
- Source:
quit(messagenullable)
Sends a quit command to the server
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
String |
<nullable> |
The message to quit with |
- Source:
whois(nick) → {Promise.<Object>}
Gets the whois of a user
Parameters:
Name | Type | Description |
---|---|---|
nick |
String | The user to check |
- Source:
Returns:
- Type
- Promise.<Object>
Events
+mode
Emits when the client gets their modes updated
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
modes |
Array.<String> | The modes that were addded |
- Source:
-mode
Emits when the client gets their modes updated
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
modes |
Array.<String> | The modes that were removed |
- Source:
disconnected
Emits when the client is disconnected
Type:
- Object
- Source:
error
Emits when the connection gets an error
Type:
- Object
Parameters:
Name | Type | Description |
---|---|---|
e |
Error | The Error gotten |
- Source:
invite
Emits when a the client recieves an invite
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
channelName |
String | The name of the channel the client was invited to |
from |
String | The nick of the user that sent the invite |
- Source:
message
Emits when the client revieves a private message
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
user |
User | The user that sent the message |
message |
String | The message that was sent |
- Source:
nick
Emits when a the clients nick is changed
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
oldNick |
String | The old nickname of the user |
newNick |
String | The new nickname of the user |
- Source:
part
Emits when the client parts a channel
Type:
- Object
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object | The data emitted
Properties
|
- Source:
ready
Emits when the client is logged in (ready)
Type:
- Object
- Source: