golangSlackBot

Code for setting up Socket mode and message posting were adapted from multiple tutorials and the slack documentation.
big thank you to 'Tech and beyond with Moss' on youtube and 'Percy Bolmer' for their intuitive articles and videos.
Project Description
This project was created to provide just a tiny bit of relief to those gamers grinding it out for 8+ hours a day. Through this go steam bot, a list of discounted top selling games on steam can be pulled up with just a few characters typed into a designated slack channel. Since most offices expect people to have high utilization rates, we can't have everyone surfing the steam store at work. This bot allows a quick scrape of steam store discounts so my fellow gamers can keep an eye on any deals too good to pass up while on their lunch break, waiting for a build to finish, etc., all while still in the slack workspace.
Install instructions
- Create a new slack app in your slack workspace. (may need admin privileges to do this)
- Under the 'add features and functionality' section, choose Bots.
- Provide permissions to your bot based on the choices and slack documentation. It must at least have the read:write permissions for a channel it is a member of for this application.
- Keep note of the bot token provided to you after creation, this is needed later.
- Enable SocketMode in the app settings in the Slack UI.
- Enable Event Subscriptions in the app settings in the Slack UI. (ensure connections:write permissions are granted)
- An app-level token will be generated, keep note of that as well so we can communicate with the slack events API.
- Clone this repo into a new directory.
- Retrieve the channel ID in which you want this bot to work in. The channel ID can be found by looking at channel details in the slack app, or in the url if using the web ui for slack.
- Invite the bot to the desired channel.
- In the project directory root, create a .env file. within that file, place the following key names with their corresponding tokens.
GOSECRET=botToken
CHANNELID=channelID
STEAMBOT-WEBSOCKET=appToken
How to use
After install instructions have been completed above, navigate to the project directory and run the following commands :
go build
./golangSlackBot
Use @ to mention the bot by name in the same channel whose ID you used in the .env file. Once mentioned, the bot will scrape and serve you the top selling discounted games on the steam store, and print them out to the slack channel.
Gif of working slackbot
