# Chat Integration
# Discord Integration
# Create a Bot Account
- Ensure you're logged on to the Discord website (opens new window).
- Navigate to the application page (opens new window).
- Click on the "New Application" button.
- Give the application a name (for example, "Kitsu") and click "Create".
- Create a Bot User by navigating to the “Bot” tab and clicking “Add Bot”. - Click “Yes, do it!” to continue.
You can add an icon for the bot by clicking the icon next to "Username". It will be the same icon used when the bot chats.
Make sure that Public Bot is ticked if you want others to invite your bot.
- Make sure the server members' intent is ticked to allow the bot to see other members.
Copy the token using the "Copy" button.
Copy the token in Kitsu's "Settings" and enter it in the text field "Discord token (optional)" before clicking on "Save settings."
# Inviting your Bot
So you’ve made a Bot User, but it’s not on any server.
To add the bot to a server, follow these steps:
- Ensure you're logged on to the Discord website (opens new window).
- Navigate to the application page (opens new window).
- Click on your bot’s page.
- Go to the “OAuth2” tab and after "URL Generator".
- In "Scopes", tick only "bot".
- In "Bot permissions," tick only "Send Messages".
- The resulting URL can be used to add your bot to a server. Copy and paste the URL into your browser, choose a server to invite the bot to, and click “Authorize”.
Note: To add the bot, the person needs “Manage Server” permissions.
Note: The users who want notifications enabled have to be on the same server as the bot.
# Enable Discord Notifications
Each user can set in their Profile the notification push to Discord. They have to switch the "Discord notifications enabled". Change the field to "Yes" and enter their "Discord username" (they're in the form username#number).
You're done!
# Slack Integration
The Slack integration is tedious because it requires that you create a dedicated application in your Slack space. But don't worry; we will explain the full process in the following section!
# Create a Kitsu Application in Slack
To start with the integration, we need to create an application in Slack dedicated to sending messages on your Kitsu instance behalf.
For that, let's connect to https://api.slack.com/apps (opens new window)
From here, click on the Create New App button:
Then enter Kitsu as the name and choose the workspace you want to link with your Kitsu instance:
# Set the Right Permissions
When the App is created, go to the app page by clicking on its name in the list and go to the Basic information section. Then click on the Permissions button on the bottom right:
From there, go to the scopes section to add the required permission:
The required permission scope is chat:write:bot
:
# Install the App in your Workspace
We can now proceed to the app installation in the workspace. Go to the Install App section and proceed to installation by clicking on the big green button:
Confirm the installation:
Your Kitsu Slack App is now up and running! You just need to link your Kitsu to the notifications sent to your Slack workspace.
# Get the Token
Now, come back to the Install app section. You should see the token to use to link your Kitsu instance to Slack.
# Link Kitsu to your new Slack Application
Now that you have a valid token for your Slack application go to the settings page. There, you can give the token to your Kitsu instance.
# Enable Slack Notifications in your Profile
The final step requires you to go to your profile section. From there, you can turn on your Slack notifications. It requires a last parameter: the Member ID you use on your Slack.
You can find it in your Slack profile by clicking on More:
Then, In your Kitsu profile, set the Slack notifications on and the Slack nickname:
You can now enjoy pretty notifications right in your Slack workspace!
# Mattermost Integration
# Enable Incoming Webhooks, Custom Username, and Profile Picture for Webhooks
- Ensure you are logged as a system admin account in your Mattermost server.
- You need to check if your Mattermost installation can receive incoming webhooks and set a custom username and profile picture for webhooks. 1. Go to the "System Console" --> "Integrations" --> "Integration Management". 2. Check if the parameters "Enable incoming Webhooks", "Enable integrations to override usernames" and "Enable integrations to override profile picture icons" are set to true (if not, set them to true).
# Set a Webhook in Mattermost
- Ensure you are logged as a system admin account in your Mattermost server.
- Go to the "Integrations" --> "Incoming Webhooks" --> "Add incoming Webhook" section.
- Create the incoming webhook :
- Title: Kitsu
- Description: Kitsu
- Channel: You can create a channel or use any existing ones because the message will be sent to a user.
- Lock to this channel: It must be set to False.
- Username: kitsu / Not important; it will be overridden by Kitsu.
- Profile Picture: Not important; it will be overridden by Kitsu.
After clicking "save", Mattermost proposes a new URL you must copy.
Copy that URL in the "Settings" of Kitsu and the text field "Mattermost Webhooks (optional)" and click on "Save settings".
Note: The users who want notifications enabled have to be on the same Mattermost server as the one you use in these steps.
# Enable Mattermost Notifications
Each user can set in their profile the notification push to Discord. They have to switch the "Mattermost notifications enabled" field to "Yes" and enter their "Mattermost username".
You're done!