diff --git a/src/Message.mjs b/src/Message.mjs index b3eb04fb2..af7a60447 100644 --- a/src/Message.mjs +++ b/src/Message.mjs @@ -4,6 +4,7 @@ export class Message { // Represents an incoming message from the chat. // // user - A User instance that sent the message. + // done - A boolean indicating if the message has been handled. constructor (user, done) { this.user = user this.done = done || false @@ -50,15 +51,11 @@ export class TextMessage extends Message { // Represents an incoming user entrance notification. // // user - A User instance for the user who entered. -// text - Always null. -// id - A String of the message ID. export class EnterMessage extends Message {} // Represents an incoming user exit notification. // // user - A User instance for the user who left. -// text - Always null. -// id - A String of the message ID. export class LeaveMessage extends Message {} // Represents an incoming topic change notification. @@ -68,6 +65,10 @@ export class LeaveMessage extends Message {} // id - A String of the message ID. export class TopicMessage extends TextMessage {} +// Represents a catch all error message. +// +// user - A User instance that sent the message. +// message - A TextMessage with the message. export class CatchAllMessage extends Message { // Represents a message that no matchers matched. // diff --git a/src/Robot.mjs b/src/Robot.mjs index 3c911e93c..e438ecad2 100644 --- a/src/Robot.mjs +++ b/src/Robot.mjs @@ -40,12 +40,12 @@ class Robot { this.brain = new Brain(this) this.alias = alias this.adapter = null - this.adaptername = 'Shell' + this.adapterName = 'Shell' if (adapter && typeof (adapter) === 'object') { this.adapter = adapter this.adapterName = adapter.name ?? adapter.constructor.name } else { - this.adapterName = adapter ?? this.adaptername + this.adapterName = adapter ?? this.adapterName } this.shouldEnableHttpd = httpd ?? true