Skip to content

Instantly share code, notes, and snippets.

@hrishikeshps
Created July 9, 2023 14:54
Show Gist options
  • Save hrishikeshps/927d60948f72b09476ad4e8bfeabbd29 to your computer and use it in GitHub Desktop.
Save hrishikeshps/927d60948f72b09476ad4e8bfeabbd29 to your computer and use it in GitHub Desktop.
const joinSlackChannel = (channel, message = null) => {
return new Promise(async (resolve, reject) => {
try {
const resp = await web.conversations.join({
channel: channel,
});
if (message) {
await sendSlackMessage(message, channel);
}
return resolve(true);
} catch (error) {
return resolve(true);
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment