-
-
Notifications
You must be signed in to change notification settings - Fork 28
Slack bot token
a-sync edited this page Aug 22, 2023
·
6 revisions
You can find the official documentation here: https://slack.dev/bolt-js/tutorial/getting-started#create-an-app
- go to slack API apps and create a new app From an app manifest https://api.slack.com/apps/
- Copy and paste the YAML manifest from below:
display_information:
name: Game Server Watcher
description: A simple discord/telegram/slack bot that can be hosted on a free service to monitor your game servers and players in style 😎
background_color: "#440088"
features:
bot_user:
display_name: Game Server Watcher
always_online: false
oauth_config:
scopes:
bot:
- chat:write
- app_mentions:read
- channels:history
- commands
- reactions:read
settings:
event_subscriptions:
bot_events:
- app_mention
- message.channels
interactivity:
is_enabled: true
org_deploy_enabled: false
socket_mode_enabled: true
token_rotation_enabled: false
- hit the Install to workspace button
- go to Basic Information scroll down to App-Level Tokens and hit the Generate Token and Scopes button to generate an app-level token
- give it a name and add the
connection:write
scope, then hit the Generate button and copy your slack app token
- go to OAuth and Permissions and copy the Bot User OAuth Token
Set your app token as the value of the SLACK_APP_TOKEN
env var and your bot token as the value of SLACK_BOT_TOKEN
env var to enable slack bot features.
Each server can have multiple channels to post and update the server status message to. The channels are identified by the channel ID.
The simplest way to get a slack channel ID is to right click on the channel name, then go to View channel details and scroll down to the very bottom where you can copy the Channel ID.