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

My first slack bot!

  • 2 Devlogs
  • 3 Total hours

This is a slack bot I made called langusteen (based off langoustine, a real sea creature). It gives an automated response to the slash commands given to it. An extension of the base tutorial with fact, pics, and mood commands

Ship #1

This is a slack bot I made called langusteen, a quirky bot based off a real life crustacean (The Langoustine). The most challenging part of this would probably be getting the image API to work and render successfully. Im very proud of the project as a whole but especially the images, which I still think are very cool. Its also a project I made without relying on excessive external help so… Im pretty proud of that too. Check out the readme for how to use the bot!

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

2h 32m 3s logged

Alright, Ive finally completed the bot (version 1 atleast).
Ive added 3 unique commands to the base tutorial bot. /langusteen-fact, /langusteen-mood, and /langusteen-pic. The names are pretty self explanatory, the first brings up a random crustacean fact, the second acts as a sort of mood indicator for what the bot is feeling, and since it ISSS based on a crustacean, i made the moods sound like a real langoustine trying to talk to youuu!!
I learned how to create and import arrays from other files into my project code, since thats what i used to create those two features.
The last command, brings up a random crustacean image. I used the pexels API for this but quickly encountered a problem, it kept spamming the same few images. Thats when i thought, what if i designed an array of search terms just like the first two commands, that way, the images are much more diverse, and it worked. Although the exact search term had to be modified multiple times before i found something that would actually give me nice images.
There was this other issue i ran into where the command only gave me the links to the images instead of the actual image. After a bit of digging, I discovered how to use an image block, which ensures that the image actually gets rendered in slack instead of just spitting out a link.
I also edited the help function to appropriately list the available commands on the bot.
I tested the commands in order in the image below. The pic command is definately my favourite. Just looking at all the cool pics is pretty fun, and knowing i made it makes it feel even better :D.

0
0
9
Open comments for this post

41m 41s logged

Hiii. Just started stardance and decided to go with the slack bot mission. I named my bot Langusteen, why? I dont know either ;), It was honestly a spelling mistake, but I decided to keep it since I thought it would be funny to add a description that makes people know it kept the name intentionally. Following the tutorial was pretty straightforward but thats not the point here. There was this minor problem I encountered where my commands didnt work in slack, i wondered about it for a while, then realized i had forgotten to declare the commands back in the slack API dashboard, silly mistake. After I got comfortable with the tutorial, I started to mess around just a little. I changed the ping commands response, and since my bot ISSS based on a crustacean, I made it respond with “Im gonna pinch you!”. I also changed the error messages too but thats a secret unless you try it (wink), although it shouldnt throw any errors though. Im going to add other custom commands too. Im thinking maybe langoustine (correct spelling btw) and crustacean facts and other useful stuff too. Stay tuneddddd!!! or ill have my little friend crawl into your socks at night (not really, I hope…)

0
0
40

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…