Sorry folks, I just started contributing to Github in the last few months so I'm a bit new to this, I meant to edit the pull request but ended up accidentally closing it. I'm gonna repost my thoughts from that one.
Addresses issue #210
This code changes the getThings function to check if the response is ok and if not, makes the response null
The formatMice function then checks if the results are null and returns a reply.
async function formatMice(isDM, mouse, opts) {
const results = await findThing('mouse', mouse.id, opts);
if (results === null) {
const reply = 'Looks like I\'m having a bit of trouble finding your mouse right now.' ;
return reply;
}
I wanted to handle this within the findThings function itself but I'm, not sure there's a way for me to do that.
Please let me know if this is too big a change or if you'd like me to change the formatLoot function to match.
Sorry folks, I just started contributing to Github in the last few months so I'm a bit new to this, I meant to edit the pull request but ended up accidentally closing it. I'm gonna repost my thoughts from that one.
Addresses issue #210
This code changes the getThings function to check if the response is ok and if not, makes the response null
The formatMice function then checks if the results are null and returns a reply.
I wanted to handle this within the findThings function itself but I'm, not sure there's a way for me to do that.
Please let me know if this is too big a change or if you'd like me to change the formatLoot function to match.
Thanks so much!