On the fly randomizer?

OK, I’m still new to this skillset, and I’ve done some searching and returned nothing.

Is there any way to either
a) do a previously unspecified die roll in the chat window (ie, in some systems, /2d13 or /roll2d13 will randomize two numbers between 1 and 13, and add them).
b) have a button that’ll ask for that information and roll it.

I’m working on a game that doesn’t use standardized dice, and I’d rather not need a button for 40+ individual dice boxes.