Slack

Add a Slack model with:

$ yarn add @xomlo/xomlo-models-slack

Init the Slack object like this:

import { Slack } from "@xomlo/xomlo-models-slack";

...
const Slack = new Slack(...);

Config object

const Slack = new Slack({
    token: "{my-slack-api-token}"
});

Reference:

Parameter
Type
Description

token

string

.sendMessage()

This method will send your message to a given channel.

Arguments:

Argument
Type
Description

channel

string

Name of the channel you want to send your message in

message

string

Your own message

Returns:

void

Last updated