hubot 11.3.1 → 11.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/Hubot.mjs CHANGED
@@ -152,6 +152,7 @@ async function loadExternalScripts () {
152
152
  await robot.receive(new Hubot.TextMessage(new Hubot.User('shell', { room: '#shell' }), `@${robot.name} ${options.execute.trim()}`))
153
153
  robot.shutdown()
154
154
  }
155
+ robot.emit('scripts have loaded', robot)
155
156
  })
156
157
  await robot.run()
157
158
  })()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hubot",
3
- "version": "11.3.1",
3
+ "version": "11.3.3",
4
4
  "author": "hubot",
5
5
  "keywords": [
6
6
  "github",
package/src/Message.mjs CHANGED
@@ -4,6 +4,7 @@ export class Message {
4
4
  // Represents an incoming message from the chat.
5
5
  //
6
6
  // user - A User instance that sent the message.
7
+ // done - A boolean indicating if the message has been handled.
7
8
  constructor (user, done) {
8
9
  this.user = user
9
10
  this.done = done || false
@@ -50,15 +51,11 @@ export class TextMessage extends Message {
50
51
  // Represents an incoming user entrance notification.
51
52
  //
52
53
  // user - A User instance for the user who entered.
53
- // text - Always null.
54
- // id - A String of the message ID.
55
54
  export class EnterMessage extends Message {}
56
55
 
57
56
  // Represents an incoming user exit notification.
58
57
  //
59
58
  // user - A User instance for the user who left.
60
- // text - Always null.
61
- // id - A String of the message ID.
62
59
  export class LeaveMessage extends Message {}
63
60
 
64
61
  // Represents an incoming topic change notification.
@@ -68,6 +65,10 @@ export class LeaveMessage extends Message {}
68
65
  // id - A String of the message ID.
69
66
  export class TopicMessage extends TextMessage {}
70
67
 
68
+ // Represents a catch all error message.
69
+ //
70
+ // user - A User instance that sent the message.
71
+ // message - A TextMessage with the message.
71
72
  export class CatchAllMessage extends Message {
72
73
  // Represents a message that no matchers matched.
73
74
  //
package/src/Robot.mjs CHANGED
@@ -40,12 +40,12 @@ class Robot {
40
40
  this.brain = new Brain(this)
41
41
  this.alias = alias
42
42
  this.adapter = null
43
- this.adaptername = 'Shell'
43
+ this.adapterName = 'Shell'
44
44
  if (adapter && typeof (adapter) === 'object') {
45
45
  this.adapter = adapter
46
46
  this.adapterName = adapter.name ?? adapter.constructor.name
47
47
  } else {
48
- this.adapterName = adapter ?? this.adaptername
48
+ this.adapterName = adapter ?? this.adapterName
49
49
  }
50
50
 
51
51
  this.shouldEnableHttpd = httpd ?? true