How to add command

Asked Aug 29, 2021·1 reply·Last activity 4 years 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 have a command that picks a random number from like, 1-20 !pickanumber please help me 😬

1 reply

@Candid Cow Hi, there are already lots of random number generator in the forum, better checking them before asking. Anyways,

!addcom -cd=5 !pickanumber $(eval number=Math.floor(Math.random() * 20) + 1; "@$(user) I pick " + number)

Usage

Ritik: !PickANumber
Nightbot: @Ritik I pick 10

Regards