Riddle Bot
- 2 Devlogs
- 1 Total hours
A bot that can run basic riddles This bot can be ran on the riddle-bot slack channel
A bot that can run basic riddles This bot can be ran on the riddle-bot slack channel
Added the riddle to the bot and made it run 24/7
Ran into a couple bugs today.
Bug 1:
put the wrong working directory for the nest server to reference. Since this directory did not exist, the server could not run the slack bot. To fix this, i simply got the directory of the slack bot and put that in as the working directory
Bug 2:
Issues with correct answer validation
If the answer to one of the riddles was Seven for example, and the user guessed Seven, the slack bot would mark that as incorrect. While debugging, I realised that this issue was caused by the usage of the toLowerCase() string function. I was making the users answers lowercase resulting in the code comparing the correct answer “Seven” with “seven” and deeming that as incorrect. To fix this I simply changed all the answers to lowercase strings
Built a slack bot that can run predefined riddles.
To achieve this i set an array with the riddle questions and their answers. Than, I added two commands, one to display the riddle, and the other to get the users response and display wether the user was correct or not. The bot has not been tested yet, nor have the final riddles been added. All of this will be done once nest application is approved