MateBot
  • Welcome to MateBot
  • Why MateBot ?
  • Getting started
  • GUIDES
    • Bots
    • Commands
    • Conversations
    • Debugging
    • Chats
    • Moderations
  • âŒ¨ī¸SCRIPTING
    • â„šī¸Introduction
    • 🚀API
    • đŸ’ŦConversations
    • 🎲Random
    • đŸ“ļHTTP
    • 🧊Resource
    • đŸŦStorage
    • 🎹Keyboard
    • đŸƒâ€â™‚ī¸Run Command
Powered by GitBook
On this page
  • Int
  • Float
  • Picker
  1. SCRIPTING

Random

Generate random values

Int

Generate random integers.

const Random = Utils.Random; ​ 

// generate random integer between 1 to 10 
const int = Random.Int(1, 10); 
Bot.reply(int)

Float

Generate random integers.

const Random = Utils.Random;
​
// generate random float value between 1 to 10
const float = Random.Float(1, 10);
Bot.reply(float)

Picker

Pick any random item from an array

const Random = Utils.Random;
​
const item = Random.Picker(['a', 'b', 'c']);
Bot.reply(item)​
PreviousConversationsNextHTTP

Last updated 1 year ago

âŒ¨ī¸
🎲