refactor: Adjust send a message to channel to use slack client

This commit is contained in:
Faruk AYDIN
2022-09-01 23:19:53 +03:00
parent 26eee1bb63
commit e0f055a375
5 changed files with 52 additions and 20 deletions

View File

@@ -1,13 +1,12 @@
import SendMessageToChannel from './actions/send-message-to-channel';
import { IJSONObject } from '@automatisch/types';
import SlackClient from './client';
export default class Actions {
client: SlackClient;
sendMessageToChannel: SendMessageToChannel;
constructor(connectionData: IJSONObject, parameters: IJSONObject) {
this.sendMessageToChannel = new SendMessageToChannel(
connectionData,
parameters
);
constructor(client: SlackClient) {
this.client = client;
this.sendMessageToChannel = new SendMessageToChannel(client);
}
}