REST API that forwards messages from Mattermost to Discord, using a callback.
To use mattermost2discord with Kubernetes, simply declare a kustomization.yml configuration file like so:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/ClubCedille/mattermost2discord?ref=v1.0.0 # Example releaseThen, you can build your kustomize configuration like this:
$ kustomize build
...To run the API, you can use the following command:
$ make docker
...The service will then run on the port 3000.
You can also run the API without Docker, but make sure the PORT environment variable is set on your machine to something like 3000 or any other port available on your computer. You can run it with the following command:
$ make run
...To run the tests, simply execute this command:
$ make test
...To share the same versioned across the team, execute this command:
$ git config core.hooksPath .githooksSet up an outgoing webhook from mattermost with a specified channel that delivers the payload to your web service with the following option selected :
Keep the token generated by the creation of the webhook.
Create your discord bot, invite it to your server and keep the token provided.
Set all of the following env variables :
- DISCORD_TOKEN : Discord bot token
- MATTERMOST_TOKEN : Mattermost Webhook token
- DISCORD_CHANNEL : Discord Channel ID which will foward messages
- TRIGGER_WORD_MATTERMOST : Trigger word to foward your message from mattermost to discord.
- PORT: The port on which the server will listen
