slack-emoji-uploader

Upload emoji to Slack in node.

Usage no npm install needed!

<script type="module">
  import slackEmojiUploader from 'https://cdn.skypack.dev/slack-emoji-uploader';
</script>

README

slack-emoji-uploader

Upload emoji to Slack in node.

npm version

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)