How to assign a unique random number for each user?

Asked Jan 19, 2025·1 reply·Last activity 1 year ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I want to create a command "!heigth".

If a user typed it for the first time, it will give them a random number between 50 and 250, centimeters.

If that user typed it again, they will get that exact first height forever

1 reply

At the moment Nightbot doesn't have a mechanism to store this information, so it isn't possible to accomplish this at the moment. It is possible to leverage a custom API to accomplish this though, and you can leverage the url fetch variable alongside that: <https://docs.nightbot.tv/variables/urlfetch>