My first slack bot!
- 7 Devlogs
- 6 Total hours
This bot isn't slacking off, it replies to messages 24/7!
This bot isn't slacking off, it replies to messages 24/7!
Okay… I finally finished the project’s README! 🎉
I think it turned out pretty cool; it’s not super professional yet, but I think it does a good job of showing what the bot can do. I might improve it in the future whenever I can shake off the laziness, haha.
I also realized I used Axios quite a bit in this project. Most of the new commands rely on external APIs.
There isn’t much else to add to this devlog; at least I’m happy it’s not just a bot that replies “pong” 😆
New command, wow!! 🎉🎉🎉🎉
Person: “Wait… isn’t that just /koi-say?”
Well… sort of. It’s basically an improved /koi-say.
Meet the new command: /koi-tts.
As the name suggests, TTS stands for Text to Speech. The bot takes the text you send, uses Microsoft Edge’s TTS voices to turn it into an MP3, and then sends the audio back to you. Pretty cool. =)
(I hate path😭)
Today I added a very simple command: /koi-say.
It does exactly what the name suggests: the bot repeats the message you type. Nothing spectacular, but it’s a classic, useful command for testing interactions.
If you don’t type anything, the bot replies by letting you know that text is required. The message might seem a bit blunt… but remember: it’s just a koizinho. 😭
By the way, I was thinking about how to explain the bot’s name in English. I think the closest equivalent would be something like “little koi”. In Portuguese, we use the suffix -zinho to form a diminutive that often conveys affection or cuteness. So, koizinho would be something like a “little koi” or an affectionate way to refer to the bot.
So… continuing the animal saga, I present to you: /koi-sound. 🐾
This command makes the bot send a humble animal selection menu. Then, you just pick one (there are still only a few, hahaha), and the bot replies with an .mp3 file containing the chosen animal’s sound.
The list of animals is still small, but I plan to add many more in future devlogs.
And a quick rant: I hate path. 😭 Who decided that handling file paths had to be done this way?
Today I added 4 new commands to the bot. To be honest, it wasn’t very difficult. It was basically copying the code from the first command, changing the API, and adapting it to the particularities of each one.
(Seriously… who decided that each API would return the data in a different way? 😭 I just wanted to grab a humble image.)
The new commands are:
🦆 /koi-duck — shows a picture of a random duck.
🐱 /koi-cat — shows a picture of a random cat.
🐶 /koi-dog — shows a picture of a random dog.
🦊 /koi-fox — shows a picture of a random fox.
It was a short devlog, but at least now the bot is becoming more fun.