Yeah I had trouble responding a couple days ago, but figured I'd make the fix publicly available. The issue was that $nick wasn't referencing what you expected. This was my solution:
Edited about an hour after original post with new link: https://pastebin.com/bAw6cA0j - This should go through all returned results.
You should really cut down this script a bit. Here are a couple examples.
For the last "else" block in the whole script, you randomly select 1-8, and describe as appropriate. With only 8 options, a good method is adding a local alias which just returns a string of possibilities. In this case i would add something like this near the top of my page:
alias -l listSnacks return Boost.Flake.Cherry Ripe.Mars Bar.Snickers Bar.box of Chocolate Hearts.box of Florentins.box of Mont Chocos
Each result is seperated by a dot. The idea is, you can easily add another element to your list, and the code will handle it. If this alias were present within your script, your last else statement could look like this:
else { describe $chan gives $nick a $gettok($listSnacks,$rand(1,$numtok($listSnacks,46)),46) }
Like this, you're simply selecting a random element from your list, using ASCII value 46 (a dot) as your token separator.