persianpolt.blogg.se

All in one chat program for slack and hipchat
All in one chat program for slack and hipchat








all in one chat program for slack and hipchat

The description to associate with the image. "url" for a URL to an image or "file" for a local file. If image is a URL it will behave like sendUrl, otherwise it will behave like sendFile. SendImage(type, image, description, thread) If url linking is not supported, will behave like sendMessage. The api object contains the following methods: sendMessage(message, thread) A fallback will be provided in this case. Please note that not all methods are gaurenteed to work as described if the platform does not support the feature. Should be used to initialise variables or load files, etc as appropriate. No output module is guaranteed to be running at this point. This method is called once when the program is first starting up. Failure to use this method correctly can prevent a successful restart. Should be used to unload files and cancel any timers. No output module is guaranteed to be available at this point. This method is called once when the program is shutting down. Object.įor example, with a weather module you might call api.sendMessage('The weather is nice here today!', event.thread_id). An object containing information about the message received. The API to output data to the current output module. This method is called whenever the module should be run. String.įor example, with a weather module you might return 'Gets the weather of your current location.'.

all in one chat program for slack and hipchat

This method should return a non-newline terminated string to be used with the /kassy command. Boolean.įor example, if you were creating a weather module that runs whenever the text /weather is written, match would return true if text was /weather some data here and false if it was not what you are wanting. true if the module should run, false otherwise. A handle to the thread the message was received on. The text of the message that has been received. This method is used to test wheather your module should be run on the given message. These are as follows: exports.match(messageText, messageThread, senderName) MethodsĮvery module must provide the same basic methods, which can then be expanded to perform whatever tasks are required. This is so that package.json does not need to be updated for every module and to allow for seemless updating using the built in updator. js files should locate those files within a subdirectory of the modules directory.Īny modules that depend on an npm package should include it using: js file within the modules ( not node_modules) subdirectory. Modules should be created as their own.Prints information about the creators of Kassy.Ĭreating New Modules General Nodes File Locations Responds with version and hostname of machine running the program. Performs a git-pull on the repository this is contained within. Toggles ignoring of commands - will not ignore special commands. Useful if you have made changes to an existing module or have created a new module.

all in one chat program for slack and hipchat

Restarts the program, reloading and searching for new modules. There are a number of special commands that will not be listed by help and cannot be overridden by custom modules. To start in testing mode, run node main.js or node main.js test.Īdditional special commands exist in testing mode that are not in any other mode: It provides a testing ground to experiment with your modules before using them live in one of the service integrations. To start in slack mode, run node main.js slack.

#All in one chat program for slack and hipchat update#

Replace each of the angle bracketed strings ( ) with the respective information written inside the brackets and update your slack team configuration to match.










All in one chat program for slack and hipchat