A mattermost bot for getting information about PKT chain.
- Decide on a trigger word, you can type
/mytrigger
in a chat and if you get the message:Command with a trigger of '/mytrigger' not found. Click here to send as a message.
then that trigger is not being used. - Setup the bot, type
npm install
to install all of the dependencies - Copy config.example.js to config.js and edit it
- Set "trigger" to your chosen trigger word (without the /)
- Set "user" and "pass" based on the rpcuser and rpcpass fields in
~/.pktd/pktd.conf
file - Set "httpPort" to a port which you are not using
- Launch the bot
node ./pktutil.js
- In your mattermost desktop or web client:
- Click the hamburger menu in the upper-left near your avatar
- Click on "Integrations"
- Click on "Slash Commands"
- Click "Add Slash Command"
- Enter a meaningful title and description
- Enter the trigger word which you decided on
- Set the "Request URL" to your http server
- Set the "Response Username" to the name which you would like to use for your bot
- Set the "Response Icon" to an image which you would like to use for your bot's avatar
- Check the Autocomplete box so people can discover your command
- Under "Autocomplete Hint", you probably want to enter
[command]
since your bot has multiple commands - Under "Autocomplete Description", enter the available commands, e.g.
Available commands: diff, mempool, height, help. Type /pkt help for further explanation.
- Test your bot, type
/mytrigger help
in any channel