If you have a script that subscribes to an event, eg.
module.exports = (robot) ->
robot.on 'some-event', ->
robot.logger.info 'saw the event'
robot.hear 'test', ->
robot.emit 'some-event'
After you reload then you get this log message twice.
Hubot> test
Hubot> [Thu Aug 17 2023 05:41:13 GMT+0000 (Coordinated Universal Time)] INFO saw the event
Hubot> test
Hubot> [Thu Aug 17 2023 05:41:15 GMT+0000 (Coordinated Universal Time)] INFO saw the event
Hubot> reload
Hubot> hubot reload
Hubot> Invalidate require cache for /hubot/scripts/example.coffee
Invalidate require cache for /hubot/scripts/proxy.coffee
Invalidate require cache for /hubot/scripts/test.coffee
[Thu Aug 17 2023 05:41:22 GMT+0000 (Coordinated Universal Time)] INFO /hubot/scripts/proxy.coffee is using deprecated documentation syntax
[Thu Aug 17 2023 05:41:22 GMT+0000 (Coordinated Universal Time)] INFO /hubot/scripts/test.coffee is using deprecated documentation syntax
Reloaded all scripts
Invalidate require cache for /hubot/node_modules/hubot-auth/src/auth.coffee
Invalidate require cache for /hubot/node_modules/hubot-diagnostics/src/diagnostics.js
Invalidate require cache for /hubot/node_modules/hubot-dice/src/dice.coffee
Invalidate require cache for /hubot/node_modules/hubot-help/src/help.js
Invalidate require cache for /hubot/node_modules/hubot-redis-brain/src/redis-brain.js
Invalidate require cache for /hubot/node_modules/hubot-voting/src/index.coffee
Invalidate require cache for /hubot/node_modules/hubot-voting/src/scripts/voting.coffee
Invalidate require cache for /hubot/node_modules/hubot-reload-scripts/src/reload-scripts.coffee
[Thu Aug 17 2023 05:41:22 GMT+0000 (Coordinated Universal Time)] INFO hubot-redis-brain: Using default redis on localhost:6379
[Thu Aug 17 2023 05:41:22 GMT+0000 (Coordinated Universal Time)] WARNING The HUBOT_AUTH_ADMIN environment variable not set
Hubot> test
Hubot> [Thu Aug 17 2023 05:41:25 GMT+0000 (Coordinated Universal Time)] INFO saw the event
[Thu Aug 17 2023 05:41:25 GMT+0000 (Coordinated Universal Time)] INFO saw the event
Hubot> test
Hubot> [Thu Aug 17 2023 05:41:28 GMT+0000 (Coordinated Universal Time)] INFO saw the event
[Thu Aug 17 2023 05:41:28 GMT+0000 (Coordinated Universal Time)] INFO saw the event
Hubot>