slack-emoji-uploader
v0.1.1
Published
Upload emoji to Slack in node.
Downloads
3
Readme
slack-emoji-uploader
Upload emoji to Slack in node.
Install
$ npm i slack-emoji-uploader
Usage
SlackTokenGetter
const { SlackTokenGetter } = require("slack-emoji-uploader");
tokenGetter = new SlackTokenGetter("team_name");
tokenGetter.getApiToken("email", "password").then((apiToken) => console.log(apiToken));
// xoxs-xxxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SlakEmojiUploader
const { SlakEmojiUploader } = require("slack-emoji-uploader");
const fs = require("fs");
emojiUploader = new SlakEmojiUploader("team_name", apiToken);
const img = fs.readFileSync("/path/to/image.png")
emojiUploader.upload("emoji_name", img)