You are browsing as a guest. Sign up (or log in) to start making projects!

My first slack bot!

  • 1 Devlogs
  • 1 Total hours

This slack bot allows you to try multiple different features in Slack. There are three different command routes you can follow: - /mk-quote [category] which allows you to get a random quote from the following categories: inspirational, anime, and random - /mk-animal-photo: get a photo a random animal (dog, duck, cat) - /mk-latest-announcement: reads out your latest announcement in the announcement channel - /mk-help: get a list of all available commands and arguments

Ship #1

I just made my first slack bot! This bot has three different commands which each allowed me to explore different ways of using the slack/bolt package

The first command is /mk-quote [category] which responds with a random quote for a given category. This command utilizes different quotes APIs and chooses the API based on the category given. This route allowed me to explore working with Axios and sending the data as a response.

The second command is /mk-animal-photo which returns an image of a random animal (cat, duck, or dog). This route also takes advantage of different APIs (with Axios), but the main thing is that it is able to send an image as an output. Through this command, I learned how to use the blocks argument for the respond method, allowing me to send images as outputs.

Finally, I created the /mk-latest-announcement command which simply reads the latest message from the announcements channel and returns that as the output. This may seem simple at first, but I ran into multiple issues with scopes with this command, allowing me to better understand the level of the scopes and what scopes are used with reading the public channel v.s direct DMs.

I am very proud of having built my first ever slack bot and creating these pretty cool commands with it. I am excited to see if this can inspire others in any way to explore more creative and fun ways to use the slack/bolt package :)

All details about using the bot are listed in the github README.

Try project → See source code →
Open comments for this post

1h 27m 20s logged

Just finished my first slack bot! I added three different commands into the bot, which allowed me to explore a few different capabilities of the slack bolt api.

  • /mk-quote [category]: allows you to get random quote for a category. This allowed me to try out different quotes apis and work with axios

  • /mk-animal-photo: allows you to get random photo/gif of a random animal (dog, duck, cat). This allowed me to learn about blocks as an argument for respond, allowing me to send images in a chat

  • /mk-latest-announcement: reads the latest announcement in the announcements channel and reports it to you. This allowed me to learn about chat reading capabilities and more about the importance of scopes

Just finished my first slack bot! I added three different commands into the bot, which allowed me to explore a few different capabilities of the slack bolt api.

  • /mk-quote [category]: allows you to get random quote for a category. This allowed me to try out different quotes apis and work with axios

  • /mk-animal-photo: allows you to get random photo/gif of a random animal (dog, duck, cat). This allowed me to learn about blocks as an argument for respond, allowing me to send images in a chat

  • /mk-latest-announcement: reads the latest announcement in the announcements channel and reports it to you. This allowed me to learn about chat reading capabilities and more about the importance of scopes

Replying to @MyNose

0
9

Followers

Loading…