Class: Channel

Channel

new Channel()

Source:

Members

mode :String

The mode of the channel
Type:
  • String
Source:

modeParams :Object

The channels mode params
Type:
  • Object
Source:

name :String

The name of the channel
Type:
  • String
Source:

topic :String

The topic of the channel
Type:
  • String
Source:

users :Map

The users in the channel
Type:
  • Map
Source:

Methods

addMode(mode)

Adds a mode
Parameters:
Name Type Description
mode String The mode to add
Source:

mode(nick, mode)

Updates the modes of a user in the channel
Parameters:
Name Type Description
nick String The nickname of the user to update the modes for
mode String What modes to add
Source:

sendAction(message)

Sends an action message to the channel
Parameters:
Name Type Description
message String The message to send
Author:
  • Mackan
Source:

sendMessage(message)

Sends a message to the channel
Parameters:
Name Type Description
message String The message to send
Author:
  • Mackan
Source:

setMode(mode)

Sets the mode of the channel
Parameters:
Name Type Description
mode String The mode to set
Source:

setModeParam(name, value)

Sets a mode param
Parameters:
Name Type Description
name String The name to set
value String The value to set
Source:

Events

+mode

Emits when the a user in the channel gets their modes updated
Type:
  • Object
Properties:
Name Type Description
data Object The data of the event
Properties
Name Type Description
user User The user that was updated
from String The nick of the user that updated the mode
modes Array.<String> The modes that was added
Source:

-mode

Emits when the a user in the channel gets their modes updated
Type:
  • Object
Properties:
Name Type Description
data Object The data of the event
Properties
Name Type Description
user User The user that was updated
from String The nick of the user that updated the mode
modes Array.<String> The modes that was removed
Source:

join

Emits when a user joins the channel
Type:
  • Object
Properties:
Name Type Description
user User The user that joined
Source:

kick

Emits when a user is kicked from the channel
Type:
  • Object
Properties:
Name Type Description
user User The user that was kicked
by User The user who kicked
reason String The reason for the kick
Source:

message

Emits when the channel revieves a 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 user changes their nick
Type:
  • Object
Properties:
Name Type Description
oldNick String The old nickname of the user
newNick String The new nickname of the user
user User The user object
Source:

part

Emits when a user parts the channel
Type:
  • Object
Properties:
Name Type Description
user User The user that parted
message String The message they left with
Source: