Conversation
|
Looks like circleCI found an issue: "Code did not pass lint rulesbot/controllers/games.js: line 3, col 7, Error - 'https' is assigned a value but never used. (no-unused-vars)" |
| } | ||
| } | ||
| // makes a simple API request to icanhazdadjoke.com for a random dad joke | ||
| dadJokeAction() { |
There was a problem hiding this comment.
After doing the !dadJoke command the Bot first replies with "I Broke... Beep...Boop...Beep" before posting the Dad Joke. I believe this is fixable by adding a Return Statment.
There was a problem hiding this comment.
I get the same issue when running this. Adding a return statement helps stop this from happening.
| } | ||
| } | ||
| // rolls the dice with the user set sides | ||
| rollDiceAction() { |
There was a problem hiding this comment.
This one is a bit strange, I was able to get the !roleDice command to work but not every time, even though every other command worked. I had to restart the docker container several times until I got one that worked and even then it would just stop after 3-4 goes.
Not sure what is causing this, it may be a local issue.
There was a problem hiding this comment.
I got the rolls dice working. I am a little confused by what you mean by with sides of your choosing
mpeck99
left a comment
There was a problem hiding this comment.
Overall it looks good only things are with the description for the !rollDice I am not sure what you mean choosing sides of your choice, and the !dadJoke sends an error first then the joke but this can be easily fixed
| } | ||
| } | ||
| // makes a simple API request to icanhazdadjoke.com for a random dad joke | ||
| dadJokeAction() { |
There was a problem hiding this comment.
I get the same issue when running this. Adding a return statement helps stop this from happening.
| } | ||
| } | ||
| // rolls the dice with the user set sides | ||
| rollDiceAction() { |
There was a problem hiding this comment.
I got the rolls dice working. I am a little confused by what you mean by with sides of your choosing
mattpezzente
left a comment
There was a problem hiding this comment.
Attempt to solve these small changes before merging into release3.
| .then(body => message.reply(`Here is your joke ${message.author.username}!! ${body}`)); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Possible solution to this would be to use async / await for the fetch, that way the reply waits for the joke to return before posting.
There was a problem hiding this comment.
the function is already an async function
bot/controllers/games.js
Outdated
| '!8ball', | ||
| '!8ball <question>', | ||
| 'Shakes 8 Ball', | ||
| '', |
There was a problem hiding this comment.
Be sure to add a description to this command.
There was a problem hiding this comment.
Thank you for this I overlooked this one fixing now
on the !dadJoke command it throws an error and then send the info it is supposed to. Need help debugging the issue some. Other than that the project is good to go.