#g4slkch_sendMessage
*//////////////////////////////////////////////////////////////*
* #g4slkch_sendMessage - Send Message *
* *
* Input: *
* in_parameter (required) - The parameter name. *
* in_value (required) - The value of the parameter. *
* *
* Output: *
* out_errMsg - The error message (if error exists). *
* *
* Returns: *
* Message timestamp or blank for error. *
* *
* Settable Variables ([r]=required) *
* id - The Slack ID to use [r] *
* team - The Slack Team to use [r] *
* channel - The Channel Name or ID to send a message to [r] *
* message_type - The message type to send. Use *STD to *
* send a standard mesage or *ME to send a "me" message. *
* as_who - Use the value *USER to send the message as your *
* id. Use *BOT to send the message as a bot. *
* user_name - When sending a message as a *BOT, this value *
* can be used to give the bot a name. *
* thread_timestamp - Enter a message thread timestamp to *
* treat this message as a reply to another message. *
* log_directory - Specify the fully qualified path to a *
* directory to store a message log file. This will *
* defaults to /tmp if left blank. *
* ccsid - The CCSID to use (1208) *
* debug - Turn on Debug (*NO, *YES) *
* debug_file - The debug file name. *
* (/tmp/g4g_[id]_sendMessage.txt) *
* *
*//////////////////////////////////////////////////////////////*
D #g4slkch_sendMessage...
D PR 32
D out_errMsg 256 Options(*NOPASS)
#g4slk_send Message is used send a message to a specific channel.
When a message is sent the action will be logged in the file G4SLKMHPF file. The message itself will be stored in the IFS as a stream file named g4slk_log_<id>.txt where <id> is a unique ID. The directory that the log file is placed in can be changed using the log_directory settable variable.
Returns: The message timestamp or blank for error.
Optional Parameters:
- Error Message (output) - Error message
Settable Variables (use #g4slk_setValue)
- id (required) - The Slack ID to use to send a message.
- team (required) - The Slack Team to use to send a message.
- channel (required) - The channel name or ID to send the message to.
- message_type - The type of message to send. The default value of *STD will send a stanard message. The value of *ME will send a "me" message.
- as_who - The default value of *USER will send the message using the ID. The value of *BOT will send the message a "bot".
- user_name - When sending a message as *BOT this will let you give the bot a name.
- thread_timestamp - Enter a thread timestamp value from another message to send this message as a reply to that message.
- log_directory - Specify a fully qualified path to a directory where a message will be stored. This will default to /tmp if left blank.
- ccsid - The CCSID to use. The default is 1208.
- debug - Specify *YES to turn on debug, or *NO to turn off debug. The default is *NO.
- debug_file - Specify the fully qualified file name for the main debug file. The default is /tmp/g4slk_[id]_sendMessage.txt.