-
-
Save nikitabugrovsky/75472fe9dd4b028b559283aaadf0683a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Init | |
# ---- | |
constructor: (msg, serverManager) -> | |
super msg | |
@_querystring = require 'querystring' | |
@_params = @msg.match[3].toString() | |
@_serverManager = serverManager | |
_init: (delayedFunction) => | |
return true if @_serverManager.hasInitialized() | |
@reply "This is the first command run after startup. Please wait while we perform initialization..." | |
@_delayedFunction = delayedFunction | |
@list true | |
false | |
_initComplete: => | |
if @_delayedFunction != null | |
@send "Initialization Complete. Running your request..." | |
setTimeout((() => | |
@_delayedFunction() | |
@_delayedFunction = null | |
), 1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The .toString() fix is throwing ERROR TypeError: Cannot read property 'toString' of undefined.